Ë SXA|°Eãó†—ddlZddlmZddlmZmZej d«Zd„Zd„Z Gd„d «Z d „Z Gd „d «Z y) éNé)Únullrev)ÚdagopÚpolicyÚparserscóЗt|t«s t|«}t|vr t«St|«dkr|Sdt|«zdz }dgt |«dzz}t |«D] \}}d|z||<Œddzz}t«}t|«}t|«dz } | dk\rº|r¸| } | dz} || sŒ|| } | |kr'|dz}| |k(r|j | «| |z} | |vr| hS| |kr@|| «D]4} || } | tk(rŒ| dk(r | || <|dz }Œ"| | k7sŒ(|| xx| zcc<Œ6n-|| «D]"} | tk(rŒ || } | r | |kr|dz}| || <Œ$| dk\r|rŒ¸|S)z»Returns a set with the heads of all common ancestors of all nodes, heads(::nodes[0] and ::nodes[1] and ...) . pfunc must return a list of parent vertices for a given vertex. rr)Ú isinstanceÚsetrÚlenÚmaxÚ enumerateÚadd)ÚpfuncÚnodesÚallseenÚseenÚiÚnÚpoisonÚgcaÚ interestingÚnvÚvÚsvÚpÚsps ú6usr/lib/python3.12/site-packages/mercurial/ancestor.pyÚcommonancestorsheadsrs²€ô �eœSÔ !Ü�E“ ˆÜ�%ÑÜ‹uˆ Ü ˆ5ƒz�Q‚؈ à”C˜“J‰ !Ñ#€GØ ˆ3”#�e“*˜q‘.Ñ !€Dܘ%Ö ‰ˆˆ1Ø�q‘&ˆˆQŠð!à �1�q‘5‰\€Fä ‹%€CÜ�e“*€KÜ ˆT‹�Q‰€BØ �Š'‘kØ ˆØ ˆa‰ˆØ�AŠwØ Ø �!‰WˆØ �Š;Ø ˜1Ñ ˆKØ�WŠ}Ø—‘˜” Ø�f‘ �ؘ‘:à˜3�JØ �Š;Ù˜1–X�ؘ!‘W�Øœ’<ØØ˜’7Ø �D˜‘GØ 1Ñ$‘Kؘ2“Xؘ“G˜r‘M”Gññ˜1–X�Øœ’<ØØ˜!‘W�Ù˜"˜vš+Ø 1Ñ$�KØ��Q’ð ð3 �Š'’kð@ €JócóV‡—ˆfd„}t‰g|¢­Ž}t|«dkr|S||«S)z· Returns the common ancestors of a and b that are furthest from a root (as measured by longest path). pfunc must return a list of parent vertices for a given vertex. cód•—i}t|«dz}dg|z}dg|z}g}tt|««D],\}}d||<d|z}|||<d||<|j||f«Œ.|dz } | dk\�rt |«dkDr÷| } | dz} || } | dk(rŒ&|| } ‰| «D]©} | t k(rŒ || }|| }|| kr=| dz|| <|| k7sŒ*|| xxdz cc<| || <|sŒ?||xxdzcc<||dk(sŒU||=ŒY| |dz k(sŒb|| z}||k(rŒm||| <|j |d«||xxdz cc<||xxdzcc<||dk(sŒ§||=Œ«|| xxdzcc<|| dk(r|| =| dk\rt |«dkDrŒ÷t |«dk7rgSd}|D]}||z}Œ |D��chc] \}}||zsŒ |’Œc}}Scc}}w)Nrr)r r ÚsortedÚappendr rÚ setdefault)rrÚcountÚdepthrÚmappingrrÚbrrÚdvrrÚdprÚnspÚkrs €rÚdeepestzancestors..deepestUs3ø€Øˆ Ü�E“ ˜Q‘ˆØ��e‘ ˆØˆs�U‰{ˆØˆÜ¤ u£ Ö.‰FˆQ�؈E�!‰HØ�Q‘ˆA؈D�‰G؈K˜‰NØ �N‰N˜A˜q˜6Õ "ð /ð �Q‰YˆØ�A‹gœ#˜kÓ*¨QÒ.؈AØ �!‰GˆBØ�q‘ˆBØ�QŠwØØ�a‘ˆBÙ˜1–X�Øœ’<ØØ˜1‘X�ؘ!‘W�ؘ’8Ø! A™v�E˜!‘HؘR“xØ# B›¨1Ñ,›Ø"$˜˜Q™ÚØ'¨›O¨qÑ0›OØ*¨2™°!Ó3Ø$/°¡Oؘ2 ™6“\ؘr™'�Cؘb’yØ Ø!�D˜‘GØ×*Ñ*¨3°Ô2Ø Ó$¨Ñ)Ó$Ø “O qÑ(“OØ" 2‘¨!Ó+Ø'¨™Oð/ð0 ˜‹O˜qÑ ‹Oؘ2‰ !Ò#Ø �OðC�AŠgœ#˜kÓ*¨QÓ.ôF ˆ{Ó ˜qÒ ØˆIà ˆÛˆAØ �‰F‰Aðá 'Ô1¡‘f�q˜!¨1¨q«5’ Ò1Ð1ùÓ1s Æ F,Æ$F,r)rr )rÚ orignodesr-rs` rÚ ancestorsr/Ms4ø€ô62ôp ˜uÐ 1 yÒ 1€Cä ˆ3ƒx�1‚}؈ Ù �3‹<Ðrcó4—eZdZdZd„Zd„Zd„Zd„Zd„Zd„Z y) Úincrementalmissingancestorsapersistent state used to calculate missing ancestors incrementally Although similar in spirit to lazyancestors below, this is a separate class because trying to support contains and missingancestors operations with the same internal data structures adds needless complexity.cóˆ—t|«|_|js|jjt«||_y©N)r Úbasesrrr)Úselfrr4s rÚ__init__z$incrementalmissingancestors.__init__›s+€Ü˜“ZˆŒ Ø�zŠzØ �J‰J�N‰Nœ7Ô #؈� rcóF—|jxr|jthk7S)z0whether the common set has any non-trivial bases)r4r©r5s rÚhasbasesz$incrementalmissingancestors.hasbases¡s€à�z‰zÒ5˜dŸj™j¬W¨IÑ5Ð5rcó:—|jj|«y)z)grow the ancestor set by adding new basesN)r4Úupdate)r5Únewbasess rÚaddbasesz$incrementalmissingancestors.addbases¥s€à � ‰ ×ј(Õ#rcóV—tj|j|j«Sr3)rÚheadrevsr4rr8s rÚ basesheadsz&incrementalmissingancestors.basesheads©s€Ü�~‰~˜dŸj™j¨$¯*©*Ó5Ð5rc󚇗|j}|j}|j|«|jt«|syt |«Št ˆfd„|D««}t|«|k(ryt‰t|«dz d«D]?}||vrŒ|j|«|j||««t|«|k(sŒ?yy)z:remove all ancestors of bases from the set revs (in place)Nc3ó.•K—|] }|‰kDsŒ d–—Œy­w)rN©)Ú.0ÚrÚstarts €rÚ zBincrementalmissingancestors.removeancestorsfrom..¸søèø€Ð5¡4˜a¨1¨u«9œ¡4ùsƒ Žréÿÿÿÿ) r4rÚdifference_updateÚdiscardrr Úsumr ÚrangeÚminr;)r5Úrevsr4rÚ keepcountÚcurrrFs @rÚremoveancestorsfromz/incrementalmissingancestors.removeancestorsfrom¬s°ø€à— ‘ ˆØ— ‘ ˆØ ×јuÔ%à � ‰ ”WÔÙØ ô�E“ ˆÜÓ5¡4Ó5Ó5ˆ Ü ˆt‹9˜ Ò !à ä˜%¤ T£¨Q¡°Ö3ˆDؘ5Ñ ØØ �L‰L˜Ô Ø �L‰L™˜t›Ô %Ü�4‹y˜IÓ%áñ4rcó —t|«}|j}|j}|j|«}|j |«|sgSt t |«t |««}g}t |td«D]õ}|snñ||vrR|j|«||«D]5} |j| «|j| «|j| «Œ7Œ]||vr'|j|«|j|«|} |} n ||vr|} |} nŒ’||«D]Y} | tk(rŒ | | vs| |vr4|j| «|j| «|j| «ŒI| j| «Œ[Œ÷|j«|S)areturn all the ancestors of revs that are not ancestors of self.bases This may include elements from revs. Equivalent to the revset (::revs - ::self.bases). Revs are returned in revision number order, which is a topological order.rH) r r4rÚ intersectionrIr rLrÚremoverJrr#Úreverse) r5rNÚ revsvisitÚ basesvisitrÚ bothvisitrFÚmissingrPrÚ thisvisitÚ othervisits rÚmissingancestorsz,incrementalmissingancestors.missingancestorsÆsz€ô˜“Iˆ Ø—Z‘Zˆ Ø— ‘ ˆØ×*Ñ*¨:Ó6ˆ Ø×#Ñ# IÔ.ÙØˆIä”C˜ “N¤C¨ £OÓ4ˆð ˆÜ˜%¤¨"Ö-ˆDÙÙà�yÑ Ø× Ñ  Ô&ñ˜tž�AØ×%Ñ% aÔ(Ø—N‘N 1Ô%Ø—M‘M !Õ$ð%ðà�yÑ Ø—‘˜tÔ$Ø× Ñ  Ô&Ø%� Ø'‘ ؘÑ#Ø&� Ø&‘ ðá˜4–[�Øœ’<ØØ˜*‘_¨¨Y©ð×%Ñ% aÔ(Ø—N‘N 1Ô%Ø—M‘M !Õ$ð—M‘M !Õ$ñ!ð5.ðN �‰Ô؈rN) Ú__name__Ú __module__Ú __qualname__Ú__doc__r6r9r=r@rQr\rCrrr1r1”s&„ñ?ò ò 6ò$ò6òó4Hrr1c#ó„K—th}tj}tj}tj}|j }|r7|D� cgc]} | ‘Œ} } |j |«tj| «nVg} tj| «|D]:} || «\} } | |vr|| | «|| «| |vsŒ)|| | «|| «Œ<| rc| d } | |kry| –—|| «\} } | |vr"| | z dk(r| | d<n || | «|| «n|| «| |vr|| | «|| «| rŒbyycc} w­w)Nrr)rÚheapqÚheappushÚheappopÚ heapreplacerr;Úheapify)Ú parentrevsÚinitrevsÚstoprevÚ inclusiverrcrdreÚseerEÚvisitÚp1Úp2Úcurrents rÚ_lazyancestorsiterrpsLèø€Ü ˆ9€DÜ�~‰~€HÜ�m‰m€GÜ×#Ñ#€KØ �(‰(€CáÙ%Ó&™X˜�!’˜XˆÐ&Ø � ‰ �HÔÜ � ‰ �eÕàˆÜ � ‰ �eÔÛˆAÙ “]‰FˆB�ؘ‰~Ù˜  Ô$Ù�B”ؘŠ~Ù˜  Ô$Ù�B•ðñ ؘ‘8�)ˆØ �WÒ Ø ØŠ ñ˜GÓ$‰ˆˆBØ �T‰>ؘ‰|˜qÒ Ø˜3��a’á˜E B 3Ô'Ù ��Gá �EŒNØ �T‰>Ù �U˜R˜CÔ Ù �ŒGô% ùò'ùs ‚A EÁ D;ÁA*EÃA7EÄ9Ecó*—eZdZdd„Zd„ZeZd„Zd„Zy)Ú lazyancestorscó—||_|D�cgc] }||k\sŒ |‘Œ c}|_||_||_t «|_t |j|j|j|j«|_ycc}w)aÖCreate a new object generating ancestors for the given revs. Does not generate revs lower than stoprev. This is computed lazily starting from revs. The object supports iteration and membership. cl should be a changelog and revs should be an iterable. inclusive is a boolean that indicates whether revs should be included. Revs lower than stoprev will not be generated. Result does not include the null revision.N)Ú _parentrevsÚ _initrevsÚ_stoprevÚ _inclusiver Ú _containsseenrpÚ _containsiter)r5rrNrirjrEs rr6zlazyancestors.__init__?sm€ð!ˆÔÙ%)Ó:¡T ¨Q°'«\š! TÑ:ˆŒØˆŒ Ø#ˆŒä ›UˆÔÜ/Ø × Ñ ˜dŸn™n¨d¯m©m¸T¿_¹_ó ˆÕùò ;s Œ A<—A<cóL— tt|««y#t$rYywxYw)z*False if the set is empty, True otherwise.TF)ÚnextÚiterÚ StopIterationr8s rÚ __nonzero__zlazyancestors.__nonzero__Us(€ð Ü ”�d“Ô ØøÜò Ùð ús ‚— #¢#cón—t|j|j|j|j«S)aGenerate the ancestors of _initrevs in reverse topological order. If inclusive is False, yield a sequence of revision numbers starting with the parents of each revision in revs, i.e., each revision is *not* considered an ancestor of itself. Results are emitted in reverse revision number order. That order is also topological: a child is always emitted before its parent. If inclusive is True, the source revisions are also yielded. The reverse revision number order is still enforced.)rprtrurvrwr8s rÚ__iter__zlazyancestors.__iter___s,€ô"Ø × Ñ ˜dŸn™n¨d¯m©m¸T¿_¹_ó ð rcóЗ|j}||vry|j}|€y|€y|j} t|«}||«||k(ry||kryŒ #t$r d|_YywxYw)z5Test whether target is an ancestor of self._initrevs.TNF)rxryrr{r})r5Útargetrr|rkÚrevs rÚ __contains__zlazyancestors.__contains__nsŒ€à×!Ñ!ˆØ �T‰>ØØ×!Ñ!ˆØ ˆ<àð ˆ>Øà�h‰hˆð ØÜ˜4“j�Ù�C”ؘ&’=ØØ˜’<Ø ð øôò ð"&ˆDÔ Ùð  ús±AÁ AÁAÁA%Á$A%N)rF)r]r^r_r6r~Ú__bool__r€r„rCrrrrrr>s„ó ò,ð€Hò  órrr) rbÚnoderÚrrÚ importmodrrr/r1rprrrCrrÚr‰sRðó å÷ð ˆ&× Ñ ˜9Ó %€ò6òrD÷Nzñzò|)÷XKòKr