Ë ÞIödsnZüãó„—dZddlZddlmZddlmZmZmZmZm Z ddl m Z m Z ddl mZm Z mZmZmZmZe j&rd„Z?d„Z@d+d„ZAd„ZBd„ZCd„ZDd„ZEd„ZFGd„d«ZGd,d„ZHd„ZId„ZJd „ZKd!„ZLd"„ZMd#„ZNd$„ZOGd%„d&«ZPd'„ZQd(„ZRd)„ZSd*„ZTycc}}wcc}wcc}w)-aä Mercurial phases support code --- Copyright 2011 Pierre-Yves David Logilab SA Augie Fackler This software may be used and distributed according to the terms of the GNU General Public License version 2 or any later version. --- This module implements most phase logic in mercurial. Basic Concept ============= A 'changeset phase' is an indicator that tells us how a changeset is manipulated and communicated. The details of each phase is described below, here we describe the properties they have in common. Like bookmarks, phases are not stored in history and thus are not permanent and leave no audit trail. First, no changeset can be in two phases at once. Phases are ordered, so they can be considered from lowest to highest. The default, lowest phase is 'public' - this is the normal phase of existing changesets. A child changeset can not be in a lower phase than its parents. These phases share a hierarchy of traits: immutable shared public: X X draft: X secret: Local commits are draft by default. Phase Movement and Exchange =========================== Phase data is exchanged by pushkey on pull and push. Some servers have a publish option set, we call such a server a "publishing server". Pushing a draft changeset to a publishing server changes the phase to public. A small list of fact/rules define the exchange of phase: * old client never changes server states * pull never changes server states * publish and old server changesets are seen as public by client * any secret changeset seen in another repository is lowered to at least draft Here is the final table summing up the 49 possible use cases of phase exchange: server old publish non-publish N X N D P N D P old client pull N - X/X - X/D X/P - X/D X/P X - X/X - X/D X/P - X/D X/P push X X/X X/X X/P X/P X/P X/D X/D X/P new client pull N - P/X - P/D P/P - D/D P/P D - P/X - P/D P/P - D/D P/P P - P/X - P/D P/P - P/D P/P push D P/X P/X P/P P/P P/P D/D D/D P/P P P/X P/X P/P P/P P/P P/P P/P P/P Legend: A/B = final state on client / state on server * N = new/not present, * P = public, * D = draft, * X = not tracked (i.e., the old client or server has no internal way of recording the phase.) passive = only pushes A cell here can be read like this: "When a new client pushes a draft changeset (D) to a publishing server where it's not present (N), it's marked public on both sides (P/P)." Note: old client behave as a publishing server with draft only content - other people see it as public - content is pushed as draft éNé)Ú_)ÚbinÚhexÚnullrevÚshortÚwdirrev)ÚgetattrÚsetattr)ÚerrorÚpycompatÚ requirementsÚsmartsetÚtxnutilÚutil)ÚAnyÚCallableÚDictÚIterableÚListÚOptionalÚSetÚTuple)Ú localrepoÚuis>i20séé é`)spublicsdraftssecretsarchivedsinternaló%ic#ó4K—|]}|tzsŒ |–—Œy­w©N)Úinternal)Ú.0Úps ú4usr/lib/python3.12/site-packages/mercurial/phases.pyÚ r&¯sèø€ÐA¡y !°A¼³LœA¡yùs‚‘có:—tj|jvS)z6True if the internal phase can be used on a repository)rÚINTERNAL_PHASE_REQUIREMENT©Úrepos r%Úsupportinternalr+´ó€ô × 2Ñ 2°d×6GÑ6GÐ GÐGócó:—tj|jvS)z6True if the archived phase can be used on a repository)rÚARCHIVED_PHASE_REQUIREMENTr)s r%Úsupportarchivedr0ºr,r-cóê—|j«}d}tD�cic] }|t«“Œ}} tj|j |j d«\}} |D];}|j«\}} |t|«jt| ««Œ= |j« ||fScc}w#|j«wxYw#t$r|r|D] }|||«}Œ d}Y||fSwxYw)aŽRead phase roots from disk phasedefaults is a list of fn(repo, roots) callable, which are executed if the phase roots file does not exist. When phases are being initialized on an existing repository, this could be used to set selected changesets phase to something else than public. Return (roots, dirty) where dirty is true if roots differ from what is being stored. Fó phaserootsT) Ú unfilteredÚ allphasesÚsetrÚ trypendingÚrootÚsvfsÚsplitÚintÚaddrÚcloseÚFileNotFoundError) r*Ú phasedefaultsÚdirtyÚiÚrootsÚfÚpendingÚlineÚphaseÚnhs r%Ú _readrootsrGÀsë€ð �?‰?Ó €DØ €EÝ(Ó )™y˜!ˆQ”“‰X˜y€EÐ )ð Ü×'Ñ'¨¯ © °4·9±9¸mÓL‰ ˆˆ7ð Û�Ø ŸJ™J›L‘ ��rØ”c˜%“jÑ!×%Ñ%¤c¨"£gÕ.ñð �G‰G�Ið �%ˆ<Ðùò *øð �G‰G�IûÜ òÙ Û"�Ù˜$ ›‘ð#à‰Ø �%ˆ<Ðð ús/›B5°.CÁAB: CÂ:C à CÃC2Ã1C2có°—g}|j«D]1\}}|D]'}|jtj||««Œ)Œ3dj |«S)zwencode a 'phase -> nodes' mapping into a binary stream The revision lists are encoded as (phase, root) pairs. r-)ÚitemsÚappendÚ _fphasesentryÚpackÚjoin)Ú phasemappingÚ binarydatarEÚnodesÚheads r%Ú binaryencoderRßsV€ð €JØ$×*Ñ*Ö,‰ ˆˆuÛˆDØ × Ñ œm×0Ñ0°¸Ó=Õ >ñð-ð �8‰8�JÓ Ðr-có4—tD�cic]}|g“Œ}}tj} |j|«}t |«|kr#|rt j td««‚ |Stj|«\}}||j|«Œocc}w)zÂdecode a binary stream into a 'phase -> nodes' mapping The (phase, root) pairs are turned back into a dictionary with the phase as index and the aggregated roots of that phase as value.sbad phase-heads stream) r4rKÚsizeÚreadÚlenr ÚAbortrÚunpackrJ)Ústreamr@Ú headsbyphaseÚ entrysizeÚentryrEÚnodes r%Ú binarydecoder^ìsš€õ $-Ó-¡9˜a�A�r‘E 9€LÐ-Ü×"Ñ"€IØ Ø— ‘ ˜IÓ&ˆÜ ˆu‹:˜ Ò !ÙÜ—k‘k¤!Ð$=Ó">Ó?Ð?Ø ð Ðô$×*Ñ*¨5Ó1‰ ˆˆtØ�UÑ×"Ñ" 4Ô(ð ùò.s‰ Bcó°—d}|r||dz \}}|ddz|k(xr||k(}d}|t|«kr||\}} |d|dzk(xr| |k(}|r1|r/tdddz«|f||dz <|j|«y|rtd|dz«|f||dz <y|rt|ddz«|f||<y|j|t||dz«|f«y)NFréÿÿÿÿr)rVÚrangeÚpopÚinsert) ÚdataÚidxÚrevÚtÚ merge_beforeÚr1Út1Ú merge_afterÚr2Út2s r%Ú_sortedrange_insertrnÿs€Ø€LÙ Ø�c˜A‘g‘‰ˆˆBؘ"‘v ‘z SÑ(Ò4¨R°1©Wˆ Ø€KØ ŒS�‹Y‚Ø�c‘‰ˆˆBؘ‘e˜s Q™wÑ&Ò2¨2°©7ˆ ᙠܘr !™u b¨¡f¨q¡jÓ1°1Ð5ˆˆS�1‰W‰ Ø �‰�� ٠ܘr !™u c¨A¡gÓ.°Ð2ˆˆS�1‰WŠ Ù Ü˜3  2¡¨¡ Ó+¨QÐ/ˆˆSŠ à � ‰ �Cœ%  S¨1¡WÓ-¨qÐ1Õ2r-cóÊ—||\}}||k(ry|d|df}t|«dk(r |j|«t||||«y|d|k(r)t|dz|ddz«|f||<t||||«y|d|k(r&t|d|«|f||<t||dz||«yt|d|«|ft||dz«|ft|dz|ddz«|fg|||dzy)Nrrr`)rVrbrnra)rdrerfrgrirjs r%Ú_sortedrange_splitrps€Ø �#‰Y�F€BˆØˆB‚wØØ ˆA‰��!‘ˆ €AÜ ˆ2ƒw�!‚|Ø �‰�Œ ܘD # s¨AÕ.Ø ˆA‰�#ŠÜ˜3 ™7 B r¡F¨Q¡JÓ/°Ð4ˆˆS‰ ܘD # s¨AÕ.Ø ˆB‰�3ŠÜ˜2˜a™5 #Ó&¨Ð+ˆˆS‰ ܘD #¨¡'¨3°Õ2ô�2�a‘5˜#Ó  Ð #Ü �3˜˜a™Ó  !Ð $Ü �3˜‘7˜B˜r™F Q™JÓ '¨Ð ,𠈈S�3˜‘7Ñr-có,—|€y|s$|jdt||dz«||ff«yd}t|«}||f}||krÐ||zdz}||d}|d} |d} || k\r|| krt||||«y| |dzk(r4|r#||dz dd|k(rt||dz ||«yt ||||«y| |dz k(rF|dzt|«kr#||dzdd|k(rt||dz||«yt ||dz||«y| |kDr|}n|dz}||krŒÐ|t|«k(r!|j t||dz«|f«y||\} } | d|kDr"|j|t||dz«|f«y|j|dzt||dz«|f«y)zYadd a phase move to the list of ranges If data is None, nothing happens. Nrrér`)rcrarVrprnrJ) rdrfÚoldÚnewÚlowÚhighrgÚmidÚrevsÚrevs_lowÚ revs_highrirjs r%Ú_trackphasechanger{*sø€ð  €|Øñ Ø � ‰ �Aœ˜c 3¨¡7Ó+¨c°3¨ZÐ8Ô9Øà €CÜ ˆt‹9€DØ ˆcˆ €AØ �Š*Ø�T‰z˜aшØ�C‰y˜‰|ˆØ˜‘7ˆØ˜‘Hˆ à �(Š?˜s iÒ/Ü ˜t S¨#¨qÔ 1Ø à �s˜Q‘wÒ Ù�t˜C !™G‘} QÑ'¨Ñ+¨sÒ2Ü" 4¨¨q©°#°qÔ9ð ô$ D¨#¨s°AÔ6Ø à ˜˜a™Ò Ø�Q‰wœ˜T›Ò" t¨C°!©G¡}°QÑ'7¸Ñ':¸cÒ'AÜ" 4¨¨q©°#°qÔ9ð ô$ D¨#°©'°3¸Ô:Ø à �cŠ>؉Dà˜‘'ˆCð7 �‹*ð: Œc�$‹iÒØ � ‰ ”U˜3  a¡Ó(¨!Ð,Ô-Øà �#‰Y�F€BˆØ ˆ!�uˆs‚{Ø � ‰ �Cœ%  S¨1¡WÓ-¨qÐ1Õ2à � ‰ �C˜!‘Gœe C¨¨q©Ó1°1Ð5Õ6r-cóˆ—eZdZdd„Zd„Zd„Zdd„Zd„Zd„Zd„Z d „Z d „Z d „Z d „Z d „Zd„Zd„Zd„Z dd„Zd„Zdd„Zd„Zy)Ú phasecachecóœ—|rJt||«\|_|_d|_d|_|j |«|j |_yy©Nr)rGÚ phaserootsr?Ú_loadedrevslenÚ _phasesetsÚ filterunknownr8Úopener)Úselfr*r>Ú_loads r%Ú__init__zphasecache.__init__csG€á ä*4°T¸=Ó*IÑ 'ˆDŒO˜TœZØ"#ˆDÔ Ø"ˆDŒOØ × Ñ ˜tÔ $ØŸ)™)ˆD�Kð r-có—|j«}|j}t|«|jk\r!|j «|j |«t d„|jj«D««S)z3detect if there are revisions with non-public phasec3ó:K—|]\}}|tk7sŒ|–—Œy­wr!)Úpublic)r#rErxs r%r&z0phasecache.hasnonpublicphases..usèø€ð Ù$;‘[�U˜D¸uÌ»ŒDÑ$;ùs‚”) r3Ú changelogrVr�Ú invalidateÚ loadphaserevsÚanyr€rI)r…r*Úcls r%Úhasnonpublicphaseszphasecache.hasnonpublicphasesmsj€ð�‰Ó ˆØ �^‰^ˆÜ ˆr‹7�d×)Ñ)Ò )Ø �O‰OÔ Ø × Ñ ˜tÔ $Üñ Ø$(§O¡O×$9Ñ$9Ô$;ó ó ð r-cóN—|j«}|j}t|«|jk\r!|j «|j |«t «j|jj«D��cgc]\}}|tk7r|‘Œc}}ŽScc}}w)zÃreturns the roots of all non-public phases The roots are not minimized, so if the secret revisions are descendants of draft revisions, their roots will still be present. ) r3r‹rVr�rŒr�r5Úunionr€rIrŠ)r…r*r�rErxs r%Únonpublicphaserootszphasecache.nonpublicphaserootsys’€ð�‰Ó ˆØ �^‰^ˆÜ ˆr‹7�d×)Ñ)Ò )Ø �O‰OÔ Ø × Ñ ˜tÔ $ØŒs‹u�{‰{ð$(§?¡?×#8Ñ#8Ô#:ôá#:‘K�E˜4ØœF’?òØ#:òð ð ùósÂB! NcóÀ‡‡‡‡—|j‰«t‰«Št‰v}|r5tt«j ‰«Š‰st j ‰«SdŠt‰«dk(r‰\}|j|ŠdŠn-tj‰D�cgc]}|j|‘Œc}ŽŠˆˆˆfd„}|sg‰jjr‰‰jjz Š|€t j‰«S||‰«Š|t j‰«zS|€t j ‰«}||‰«Š‰s|S|jˆfd„«Scc}w)z&return a smartset for the given phasesFrTcó�•—t|vr<‰dj«‰vr'‰r|j«}|jt«|Sr!)r rEÚcopyr;)Ú wdirsubsetÚwdirrevsÚphasesr*Ú revsneedscopys €€€r%Ú_addwdirz&phasecache.getrevset.._addwdir¦s@ø€Ü˜*Ñ$¨¨d©×)9Ñ)9Ó);¸vÑ)EÙ Ø'Ÿ}™}›�Hð — ‘ œWÔ%؈Or-có •—|‰vSr!©)Úrrxs €r%Úz&phasecache.getrevset..Âs ø€¨1°D©=r-)r�r5rŠr4Ú differencerÚ fullreposetrVr‚r’r‹Ú filteredrevsÚbasesetÚfilter) r…r*r™ÚsubsetÚ publicphaser$r›rxršs `` @@r%Ú getrevsetzphasecache.getrevset�sHû€ð ×ј4Ô Ü�V“ˆÜ Ð&ˆ á 䜓^×.Ñ.¨vÓ6ˆFÙÜ×+Ñ+¨DÓ1Ð1ðˆ Ü ˆv‹;˜!Ò Ø‰CˆQØ—?‘? 1Ñ%ˆDØ ‰Mô—9‘9¹6ÓB¹6°a˜tŸ™¨qÓ1¸6ÑBÐCˆDö ñØ�~‰~×*Ò*ؘdŸn™n×9Ñ9Ñ9�àˆ~Ü×'Ñ'¨Ó-Ð-á ¨Ó-�Ø¤× 0Ñ 0°Ó 6Ñ6Ð6àˆ~Ü!×-Ñ-¨dÓ3�á˜F DÓ)ˆDáØ� Ø—=‘=Ó!8Ó9Ð 9ùò=CsÂEcóô—|jddd¬«}|jj«|_|j|_|j|_|j |_|j |_|S)NF)r†)Ú __class__r€r–r?r„r�r‚)r…Úphs r%r–zphasecache.copyÄs`€ð�^‰^˜D $¨eˆ^Ó 4ˆØŸ™×,Ñ,Ó.ˆŒ Ø—:‘:ˆŒØ—K‘KˆŒ Ø ×/Ñ/ˆÔØŸ™ˆŒ ؈ r-c ó@—dD]}t||t||««Œy)z4replace all values in 'self' with content of phcache)r€r?r„r�r‚N)r r )r…ÚphcacheÚas r%Úreplacezphasecache.replaceÏs#€ó ˆAô �D˜!œW W¨aÓ0Õ 1ñ r-cól—|j«}|jj|j«Sr!)r3r‹Ú computephasesr€)r…r*s r%Ú_getphaserevsnativezphasecache._getphaserevsnativeÚs'€Ø�‰Ó ˆØ�~‰~×+Ñ+¨D¯O©OÓ<ÐÓ?±Y¨E˜5¤#£%™<°YÑ?ˆŒÜ“Uˆ ÜœmÖ,ˆEÜ×$Ñ$ R§V¡V¨T¯_©_¸UÑ-CÓDˆEÚܘŸ™¨Ó.Ó/�Û!�DØ—F‘F˜4•Lð"à×$Ñ$ ZÔ0Ø×!Ñ! "Ô%Ø)+�—‘ Ò&ð-ô" "›gˆÕùò@s¥Dcó —|j€" |j|«}|\|_|_yy#t$r|j |«YywxYw)z0ensure phase information is loaded in the objectN)r‚r±r�ÚAttributeErrorr»)r…r*Úress r%r�zphasecache.loadphaserevsîsV€ð �?‰?Ð "ð 1Ø×.Ñ.¨tÓ4�Ø7:Ñ4�Ô# T¥_ð #øô"ò 1Ø×*Ñ*¨4Ö0ð 1úsŽ 0°A Á A có —d|_d|_yr)r�r‚)r…s r%rŒzphasecache.invalidateøs€ØˆÔ؈�r-có—|tk(rtS|tkrttd««‚||jk\r!|j «|j |«tD]}||j|vsŒ|cStS)Nscannot lookup negative revision) rrŠÚ ValueErrorrr�rŒr�r´r‚)r…r*rfrEs r%rEzphasecache.phaseüsu€ð ”'Š>܈MØ ”Š=ÜœQÐAÓBÓCÐ CØ �$×%Ñ%Ò %Ø �O‰OÔ Ø × Ñ ˜tÔ $ß"ˆEØ�d—o‘o eÑ,Ò,Ø’ ð#ôˆ r-có¶—|jsy|jdddd¬«} |j|«|j«y#|j«wxYw)Nr2ówT)Ú atomictempÚ checkambig)r?r„Ú_writer<)r…rBs r%Úwritezphasecache.writesE€Ø�zŠzØ Ø �K‰K˜  t¸ÈˆKÓ Nˆð Ø �K‰K˜ŒNà �G‰G�IøˆA�G‰G�Iús ¤AÁAc ó´—|jj«D]4\}}t|«D]!}|jd|t |«fz«Œ#Œ6d|_y)Ns%i %s F)r€rIÚsortedrÇrr?)r…ÚfprErAÚhs r%rÆzphasecache._writesM€Ø ŸO™O×1Ñ1Ö3‰LˆE�5ܘE–]�Ø—‘˜ u¬c°!«f oÑ5Õ6ñ#ð4ðˆ� r-có¨—||j|<|j«d|_|jdd|j«d|j d<y)NTóphase)r2ó1s phases_moved)r€rŒr?ÚaddfilegeneratorrÆÚhookargs)r…rEÚnewrootsÚtrs r%Ú _updaterootszphasecache._updaterootssF€Ø!)ˆ�‰˜ÑØ �‰Ô؈Œ à ×јHÐ&6¸¿ ¹ ÔDØ'+ˆ� ‰ �OÒ$r-có—|j«}|j|||g|¬«|�Pd|jvrB|jd}|j}t |«D]}|||«}t ||d|«Œ|j «y)N)rxóphases)r3Ú_retractboundaryÚchangesrErÉr{Úinvalidatevolatilesets) r…r*rÒÚ targetphaserxÚ phasetrackingrErfÚrevphases r%Ú registernewzphasecache.registernew&s„€Ø�‰Ó ˆØ ×јd B¨ °R¸dÐÔCØ ˆ>˜i¨2¯:©:Ñ5ØŸJ™J yÑ1ˆMØ—J‘JˆEܘd–|�Ù   sÓ+�Ü! -°°d¸HÕEð$ð ×#Ñ#Õ%r-c óP‡—|€g}|€d}n|jjd«}|j«}|D�cgc]}||j«‘Œc}|D� cgc]} | ‘Œc} z}t «} g} ˆfd„t D«D]á} |D� cgc]} |j || «| k\sŒ| ‘Œ}} |sn¸|j| }|jd||«}| j|«|rŒb|D] } t|| |j || «‰«Œ"|j d||«D�chc]}|j«’Œ}}||k7sŒ»|j| ||«| j||z «Œã|s)‰dk7r|j||‰| «|j«| Scc}wcc} wcc} wcc}w)zúSet all 'nodes' to phase 'targetphase' Nodes with a phase lower than 'targetphase' are not affected. If dryrun is True, no actions will be performed Returns a set of revs whose phase is changed or should be changed NrÕc3ó.•K—|] }|‰kDsŒ |–—Œy­wr!r�)r#rErÙs €r%r&z-phasecache.advanceboundary..Jsøèø€ÐJ© °e¸kÓ6I”e©ùsƒ Žó%ln::%ldsroots((%ln::) - %ld)r)r×Úgetr3rfr5r4rEr€rxr¸r{r]rÓÚextendrÖrØ)r…r*rÒrÙrPrxÚdryrunrÚÚnržr×ÚdelrootsrErfÚoldsÚaffectedÚctxrAs ` r%Úadvanceboundaryzphasecache.advanceboundary1s°ø€ð ˆ<؈DØ ˆ:Ø ‰MàŸJ™JŸN™N¨9Ó5ˆMà�‰Ó ˆÙ',Ó-¡u !��Q‘— ‘ •  uÑ-¹DÓ0A¹D°q²¸DÑ0AÑAˆä“%ˆØˆÛJ­ÖJˆEá#'ÓJ¡4˜C¨4¯:©:°d¸CÓ+@ÀEÓ+I’C 4ˆDÐJÙÙà—?‘? 5Ñ)ˆDà—y‘y ¨d°DÓ9ˆHØ �N‰N˜8Ô $ÙØÛ�Ü!Ø! 1 d§j¡j°°qÓ&9¸;õðð Ÿ8™8Ð$;¸TÀ8ÔLóáL�Cð—‘• ØLð ðð�u‹}Ø×!Ñ! %¨°Ô3à—‘  u¡ Õ-ð1Kñ2à˜aÒØ×%Ñ% d¨B° ¸XÔFØ × 'Ñ 'Ô )؈ùòE.ùÒ0Aùò KùòsºFÁ F FÂ%FÄF#cóP—|jj«D��cic] \}}||kr||“Œ}}}|€d}n|jjd«}|j «}|j ||||«rš|�˜|j|} ||} t |jd| | ««} t|dd«D]X}|r4|j|g«} t |jd| | ««}| |z} n| }t|«D]} t|| ||«ŒŒZ|j«ycc}}w)NrÕs(%ln::) - (%ln::)r`rß) r€rIr×ràr3rÖr5rxrarÉr{rØ)r…r*rÒrÙrPrErxÚoldrootsrÚrtrsrærAržs r%Úretractboundaryzphasecache.retractboundaryjs4€ð $Ÿ™×4Ñ4Ô6ô á6‘ ��tؘ Ò#ð �4‰KØ6ð ñ ð ˆ:Ø ‰MàŸJ™JŸN™N¨9Ó5ˆMØ�‰Ó ˆà × !Ñ ! $¨¨K¸Ô ?ØÐ)ð—/‘/ +Ñ.ˆCؘ;Ñ'ˆCܘ4Ÿ9™9Ð%9¸3ÀÓDÓEˆHô˜{¨B°Ö3�ÙØ$ŸL™L¨°Ó3�EܘtŸy™y¨°e¸XÓFÓG�DØ Ñ$‘Hà#�DÜ ž�AÜ% m°Q¸¸{ÕKñ&ð4ð ×#Ñ#Õ%ùó= sžD"c óÒ—|€g}|tk(r t|«r|tk(r.t|«s#t|}d|z}t j |«‚|j«}|jj}|jj} |j|D� chc] } || «’Œ } } t| «x} } |D� cgc] } || «‘Œ c} |D�cgc]}|‘Œc}z}|D�cgc]}|j||«|ksŒ|‘Œ}}|r�t|vrt jt!d««‚| j#|«t%|«}| D�cgc] }||k\sŒ |‘Œ }}|j'd|«}| D�chc] }||ksŒ |’Œ } }| j#|«| | k7r(|j)|| D�chc] }| |«’Œ c}|«yycc} wcc} wcc}wcc}wcc}wcc}wcc}w)Ns-this repository does not support the %s phases!cannot change null revision phases roots(%ld::)TF)r"r+Úarchivedr0Ú phasenamesr ÚProgrammingErrorr3r‹rfr]r€r5rErrWrr¸ÚminrxrÓ)r…r*rÒrÙrPrxÚnameÚmsgÚtorevÚtonoder]Ú currentrootsÚ finalrootsrêržrÑrfÚ minnewrootÚ aboverootsÚ updatedrootss r%rÖzphasecache._retractboundary‹só€ð ˆ<؈Dà œ8Ò #Ü# DÔ)ØœhÒ&Ü# DÔ)ä˜kÑ*ˆDØBÀTÑIˆCÜ×(Ñ(¨Ó-Ð -à�‰Ó ˆØ—‘×"Ñ"ˆØ—‘×$Ñ$ˆØ04·±À Ò0LÓMÑ0L¨™˜d� Ð0Lˆ ÐMÜ # LÓ 1Ð1ˆ �XÙ,1Ó2©E D‘E˜$•K¨EÑ2ÁÓ5FÁ¸A²aÀÑ5FÑFˆá#ó Ù#�C t§z¡z°$¸Ó'<¸{Ó'JŠC˜8ð ð ñ ܘ(Ñ"Ü—k‘k¤!Ð$HÓ"IÓJÐJØ × Ñ  Ô )ô˜X›ˆJÙ)5ÓK© #¸À Ó9Jš#¨ˆJÐKØŸ9™9 _°jÓAˆLá)5ÓJ© #¸¸zÓ9Iš#¨ˆJÐJØ × Ñ ˜lÔ +Ø ˜Ò !Ø × Ñ Ø±ZÓ@±Z¨c™f S�k°ZÑ@À"ô ðØùò3Nùâ2ùÒ5Fùò ùòLùòKùòAs<ÂGÂ?G à GÃ&GÄGÅ GÅGÅ6 GÆGÆ-G$ cót‡—d}|jjjŠ|jj «D]_\}}t ˆfd„|D««}|sŒ|D]+}|j jdt|«|fz«Œ-|j|«d}Œa|rd|_ |j«y)z…remove unknown nodes from the phase boundary Nothing is lost as unknown nodes only hold data for their descendants. Fc3ó4•K—|]}‰|«rŒ |–—Œy­wr!r�)r#r]Úhas_nodes €r%r&z+phasecache.filterunknown..Ásøèø€ÐJ©e d¹8ÀD½>œT©eùsƒ ‘s0removing unknown node %s from %i-phase boundary TN) r‹Úindexrür€rIrÉrÚdebugrÚsymmetric_difference_updater?rŒ)r…r*ÚfilteredrErPÚmissingÚmnoderüs @r%rƒzphasecache.filterunknown¸s¨ø€ð ˆØ—>‘>×'Ñ'×0Ñ0ˆØ ŸO™O×1Ñ1Ö3‰LˆE�5ÜÓJ©eÓJÓJˆGÚÛ$�EØ—G‘G—M‘MØLÜ  ›<¨Ð/ñ0õð%ð ×1Ñ1°'Ô:Ø‘ð4ñ ؈DŒJð �‰Õr-)Tr!©NN)Ú__name__Ú __module__Ú __qualname__r‡r�r“r§r–r®r±r»r�rŒrErÇrÆrÓrÜrèrërÖrƒr�r-r%r}r}bsk„ó$ò  ò ó(5:òn ò 2ò=ò&ò 1òòò&òò ,ò &ð?Có7òr&óB+óZr-r}cóª—|€g}|jj«}|j||||||¬«}|s|jj|«|S)auAdd nodes to a phase changing other nodes phases if necessary. This function move boundary *forward* this means that all nodes are set in the target phase or kept in a *lower* phase. Simplify boundary to contains phase roots only. If dryrun is True, no actions will be performed Returns a set of revs whose phase is changed or should be changed )rxrâ)Ú _phasecacher–rèr®)r*rÒrÙrPrxrâr¬r×s r%rèrè×sb€ð €|؈Ø×Ñ×#Ñ#Ó%€GØ×%Ñ%Ø ˆb�+˜u¨4¸ð&ó€Gñ Ø ×Ñ× Ñ  Ô)Ø €Nr-có–—|jj«}|j||||«|jj|«y)zÿSet nodes back to a phase changing other nodes phases if necessary. This function move boundary *backward* this means that all nodes are set in the target phase or kept in a *higher* phase. Simplify boundary to contains phase roots only.N)rr–rër®)r*rÒrÙrPr¬s r%rërëîs@€ð×Ñ×#Ñ#Ó%€GØ ×јD " k°5Ô9Ø×Ñ×јWÕ%r-có–—|jj«}|j||||«|jj|«y)z¬register a new revision and its phase Code adding revisions to the repository should use this function to set new changeset in their target phase (or higher). N)rr–rÜr®)r*rÒrÙrxr¬s r%rÜrÜûs@€ð ×Ñ×#Ñ#Ó%€GØ ×ј˜b +¨tÔ4Ø×Ñ×јWÕ%r-cód—tj«}dtz}|j«j}|j j tD]C}|j j||j|««tksŒ6||t|«<ŒE|j«rd|d<|S)ú/List phases root for serialization over pushkeyrsTrueó publishing) rÚsortdictÚdraftr3r‹rr€rErfrÚ publishing)r*ÚkeysÚvaluer�r7s r%Ú listphasesrs’€ô �=‰=‹?€DØ ”E‰M€EØ �‰Ó × $Ñ $€BØ× Ñ ×+Ñ+¬EÔ2ˆØ × Ñ × !Ñ ! $¨¯©¨t« Ó 5¼Ó >Ø#ˆD”�T“ŠOð3ð ‡�Ôð"&ˆˆ]ÑØ €Kr-c ó¨—|j«}|j«5||j«}tt |««}tt |««}||k(rA||kr<|j d«5}t |||t|«g«ddd« ddd«y||k(r ddd«y ddd«y#1swYŒ,xYw#1swYyxYw)r s pushkey-phaseNTF)r3ÚlockrEÚabsr:Ú transactionrèr)r*ÚnhexÚ oldphasestrÚ newphasestrÚ currentphaseÚnewphaseÚoldphaserÒs r%Ú pushphaser&s½€ð �?‰?Ó €DØ �‰�ؘD‘z×'Ñ'Ó)ˆ Ü”s˜;Ó'Ó(ˆÜ”s˜;Ó'Ó(ˆØ ˜8Ò #¨°8Ò(;Ø×!Ñ!Ð"2Ô3°rÜ  b¨(´S¸³Y°KÔ@÷4à÷ ˆð˜XÒ %à÷ ˆð÷ ˆ÷ 4Ð3ú÷ ˆús0¡ACÁ8B< CÂ#CÂ2CÂ<C ÃCÃCcóÞ—|j}tD�cic]}|g“Œ}}tD]9}d|z}|j||«D�cgc]}|j|«‘Œc}||<Œ;|Scc}wcc}w)z“Finds the phase heads for a subset of a history Returns a list indexed by phase number where each item is a list of phase head nodes. sheads(%%ln & _phase(%d)))r‹r4rxr])r*r¥r�r@rZrEÚrevsetržs r%Úsubsetphaseheadsr!9sz€ð �‰€Bå#,Ó-¡9˜a�A�r‘E 9€LÐ-߈Ø,¨uÑ4ˆØ37·9±9¸VÀVÔ3LÓMÑ3L¨a˜rŸw™w q�zÐ3LÑMˆ �UÒðð Ðùò .ùòNs • A%ÁA*có¶—tD]K}d}|j||||«D�cgc]}|j«‘Œ}}|sŒ9t||«||«ŒMycc}w)z+Updates the repo with the given phase headss%ln - _phase(%s)N)r4r5r]rè)r*ÚtrgetterrZrEr ÚcÚheadss r%Ú updatephasesr&HsW€÷ˆØ$ˆØ#'§8¡8¨F°LÀÑ4GÈÔ#OÓPÑ#O˜a�—‘•Ð#OˆÐPÚ Ü ˜D¡(£*¨e°UÕ ;ñ ùâPs¤Acó —|j«}g}|jjj}|j «D]¯\}}|dk(rŒ t |«}t |«}|tk(r8||jk7sŒ;|jjtd«|z«Œc|tk(r||«sŒu|j|«Œ‡|jjtd«||fz«Œ±t|||«}||fS)zÒCompute phases heads and root in a subset of node from root dict * subset is heads of the subset * roots is { => phase} mapping. key and value are string. Accept unknown element input r s2ignoring inconsistent public root from remote: %s s,ignoring unexpected root from remote: %i %s )r3r‹rýrürIrr:rŠÚnullidrÚwarnrrrJÚnewheads) r*r¥rAÚ draftrootsrürrEr]Ú publicheadss r%Úanalyzeremotephasesr-Vsó€ð �?‰?Ó €Dà€JØ�~‰~×#Ñ#×,Ñ,€HØ—{‘{–}‰ ˆˆeØ �=Ò Ø Ü�4‹yˆÜ�E“ ˆØ ”FŠ?Ø�t—{‘{Ó"Ø—‘— ‘ Üð.óðñ õð”eŠ^Ù˜�~Ø×!Ñ! $Õ'à �G‰G�L‰LÜÐBÓCؘ$�-ñ õ ð%%ô.˜4 ¨Ó4€KØ ˜ Ð "Ð"r-có—eZdZdZd„Zy)Úremotephasessummaryasummarize phase information on the remote side :publishing: True is the remote is publishing :publicheads: list of remote public phase heads (nodes) :draftheads: list of remote draft phase heads (nodes) :draftroots: list of remote draft phase root (nodes) có"—|j«}||_|jdd«|_t |||«}|\|_|_|jd|j |«}|D�cgc]}|j«‘Œc}|_ ycc}w)Nr Fsheads(%ln::%ln)) r3Ú_allremoterootsràrr-r,r+r5r]Ú draftheads)r…r*Ú remotesubsetÚ remoterootsÚunfiÚanaÚdheadsr$s r%r‡zremotephasessummary.__init__†s{€Ø�‰Ó ˆØ*ˆÔà%Ÿ/™/¨-¸Ó?ˆŒä! $¨ °kÓBˆØ,/Ñ)ˆÔ˜$œ/à—‘Ð,¨d¯o©o¸|ÓLˆÙ-3Ó4©V¨˜1Ÿ6™6�8¨VÑ4ˆ�ùÒ4sÁ,B N)rrrÚ__doc__r‡r�r-r%r/r/}s „ñó 5r-r/cóŠ—ddlm}|j«}|j}|jj }|s|S|r||j gk(rgS|D�chc]}||j k7sŒ||«’Œ}}|D�cgc] }||«‘Œ }}|jd||«}|j|«|jd||«} | |z} |s| rG|j| «|jd|«} |j|| | «} |j| «tj|jt|««Scc}wcc}w)zŽcompute new head of a subset minus another * `heads`: define the first subset * `roots`: define the second we subtract from the firstr)Údagops (%ld::%ld)s-parents(%ld + (%ld and merge())) and not nullsparents(%ld) and not null)Úr:r3r‹rýÚget_revr(rxr·r¸Úreachablerootsr rµr]rÉ) r*r%rAr:r�rfrãÚ new_headsÚ affected_zoneÚ candidatesÚ prunestartÚpruneds r%r*r*“s0€õà �?‰?Ó €DØ �‰€BØ �(‰(× Ñ €C٠؈ Ù �E˜dŸk™k˜]Ò*؈ á!&Ó;¡˜A¨!¨t¯{©{Ó*:‘�Q• €IÐ;Ù"Ó #™U˜‰S��V˜U€EÐ #à—I‘I˜m¨U°IÓ>€Mà ×Ñ  Ô.ð—‘Ø8¸%Àó€Jð�-Ñ€JÙ‘Jà×јÔ$Ø—Y‘YÐ;¸YÓGˆ Ø×%Ñ% d¨J¸ ÓCˆØ×#Ñ# FÔ+ä × Ñ ˜BŸG™G¤V¨IÓ%6Ó 7Ð7ùò'<ùÚ #sÁD;Á* D;Á:Ecó–—|jdd«} t|S#t$r"tjt d«|z«‚wxYw)zuhelper to get the target phase of new commit Handle all possible values for the phases.new-commit options. rÕs new-commits0phases.new-commit: not a valid phase name ('%s'))ÚconfigÚ phasenumber2ÚKeyErrorr Ú ConfigErrorr)rÚvs r%ÚnewcommitphaserIºsS€ð � ‰ �)˜]Ó+€Að ܘA‰ÐøÜ ò Ü×ÑÜ ÐAÓ BÀQÑ Fó ð ð ús ”�+AcóN—t|jjt«S)z@utility function that check if a repo have any secret changeset.)Úboolrr€Úsecretr)s r%Ú hassecretrMÊs €ô �× Ñ ×+Ñ+¬FÑ3Ó 4Ð4r-có8—|€d}n t|}||t|dœS)Nr-)snodesoldphaserÍ)rî)r]rsrts r%ÚpreparehookargsrOÐs&€à €{؉䘉oˆØ¨´zÀ#±Ñ GÐGr-r!r)Ur8ÚstructÚi18nrr]rrrrr r r r r;r rrrrÚ TYPE_CHECKINGÚtypingrrrrrrrrrrÚuimodr:ÚbytesÚ PhaserootsÚlocalrepositoryÚ PhasedefaultsÚStructrKrarŠrrLrír"r4r´Únot_public_phasesÚ cmdphasenamesÚdictÚ enumeraterîrIÚ phasenumberr–rEr¸Ú mutablephasesÚremotehiddenphasesÚlocalhiddenphasesÚtupleÚall_internal_phasesÚno_bundle_phasesr+r0rGrRr^rnrpr{r}rèrërÜrrr!r&r-r/r*rIrMrO)rErñs00r%ÚresHðñdóNå÷õ÷÷÷ð ×Ò÷ ÷ ó ÷ð �c˜3˜u™:�oÑ&€JØØ�)×+Ñ+¨ZÐ8¸*ÐDÑEñ€Mð �— ‘ ˜hÓ'€ ñ˜a›Ñ€ˆˆvØ €Ø €Ø �U˜F H¨hÐ 7€ ؘ ¨(Ð3€ Ø!Ðâ0€ Ù ‘)˜MÓ*Ó +€ Ø"€ ˆ8ÑØ"€ ˆ8Ñà.8×.>Ñ.>Ô.@ÔAÑ.@™{˜u dˆt�U‰{Ð.@ÒA€ ð×ÑÓ!€ Ø ×Ñ©zÓ:©z e�U˜E‘\¨zÑ:Ô;Ø ×ѱzÓB±z¨e�U˜U‘] EÑ)°zÑBÔCà˜ ¨(Ð3€ ؘh¨Ð1ÐØ˜xÐ(ÐáÑA¡yÓAÓAÐà&ÐòHò Hó ò>  òò&3ò* ò,57÷prñrój ò. &ò&òò@ò& ò <ò$#÷N5ñ5ò,$8òN  ò 5ó HùóYBùò;ùÚBsà F2Ä F8Ä+ F=