Ë ]k9í-‚8ãó —ddlmZddlmZmZmZmZddlmZd„ZGd„d«Z Gd„de «Z Gd „d e «Z d „Z Gd „d e «Z Gd„de «ZGd„de«ZGd„de«Zdd„ZGd„de «ZGd„de«Zy)é)Úgetattr)ÚencodingÚerrorÚpycompatÚutil)Ú stringutilcóp—tjt|«j«j d«S)Nó_)rÚsysbytesÚtypeÚ__name__Úlstrip)Úos ú6usr/lib/python3.12/site-packages/mercurial/smartset.pyÚ _typenamers(€Ü × Ñ œT !›W×-Ñ-Ó .× 5Ñ 5°dÓ ;Ð;ócóŽ—eZdZd„ZeZd„Zd„ZdZdZd„Z d„Z d„Z d„Z d „Z d „Zd „Zd „Zd „Zdd„Zd„Zd„Zd„Zdd„Zd„Zd„Zy)Úabstractsmartsetcó—t«‚)z!True if the smartset is not empty©ÚNotImplementedError©Úselfs rÚ __nonzero__zabstractsmartset.__nonzero__ó €ä!Ó#Ð#rcó—t«‚)zprovide fast membership testingr)rÚrevs rÚ __contains__zabstractsmartset.__contains__rrcó—t«‚)z:iterate the set in the order it is supposed to be iteratedrrs rÚ__iter__zabstractsmartset.__iter__"rrNcó—t«‚)z/True if the set will iterate in ascending orderrrs rÚ isascendingzabstractsmartset.isascending.rrcó—t«‚)z0True if the set will iterate in descending orderrrs rÚ isdescendingzabstractsmartset.isdescending2rrcó—t«‚)z3True if the set will iterate in topographical orderrrs rÚistopozabstractsmartset.istopo6rrcóއ—|j€ t|«Šn!|j«D]Šn td«‚ˆfd„|_‰S)z%return the minimum element in the setóarg is an empty sequencecó•—‰S©N©©Úvs€rÚz&abstractsmartset.min..Cóø€™1r)ÚfastascÚminÚ ValueError©rr-s @rr1zabstractsmartset.min:sCø€à �<‰<Ð Ü�D“ ‰Aà—\‘\–^�Ùð$ô!Ð!<Ó=Ð=ÛˆŒØˆrc󌇗|j€ t|«S|j«D]Šn td«‚ˆfd„|_‰S)z%return the maximum element in the setr(có•—‰Sr*r+r,s€rr.z&abstractsmartset.max..Or/r)ÚfastdescÚmaxr2r3s @rr7zabstractsmartset.maxFsDø€à �=‰=Ð Ü�t“9Ð à—]‘]–_�Ùð%ô!Ð!<Ó=Ð=ÛˆŒØˆrcó—t«‚)zireturn the first element in the set (user iteration perspective) Return None if the set is emptyrrs rÚfirstzabstractsmartset.firstRó €ô"Ó#Ð#rcó—t«‚)zhreturn the last element in the set (user iteration perspective) Return None if the set is emptyrrs rÚlastzabstractsmartset.lastXr:rcó—t«‚)zkreturn the length of the smartsets This can be expensive on smartset that could be lazy otherwise.rrs rÚ__len__zabstractsmartset.__len__^r:rcó—t«‚)z$reverse the expected iteration orderrrs rÚreversezabstractsmartset.reversedrrcó—t«‚)z:get the set to iterate in an ascending or descending orderr©rr@s rÚsortzabstractsmartset.sorthrrcób—t|t«r|S|j|j|d¬«S)z{Returns a new object with the intersection of the two collections. This is part of the mandatory API for smartset.F©ÚcondreprÚcache)Ú isinstanceÚ fullreposetÚfilterr©rÚothers rÚ__and__zabstractsmartset.__and__ls.€ô �eœ[Ô )؈KØ�{‰{˜5×-Ñ-¸ÀUˆ{ÓKÐKrcó—t||«S)ztReturns a new object with the union of the two collections. This is part of the mandatory API for smartset.)ÚaddsetrKs rÚ__add__zabstractsmartset.__add__ts€ô�d˜EÓ"Ð"rcóN‡—|jŠ|jˆfd„d|fd¬«S)z{Returns a new object with the substraction of the two collections. This is part of the mandatory API for smartset.có•—‰|« Sr*r+)ÚrÚcs €rr.z*abstractsmartset.__sub__..€s ø€™!˜A›$‘hrsFrE)rrJ)rrLrTs @rÚ__sub__zabstractsmartset.__sub__zs2ø€ð × Ñ ˆØ�{‰{Û ¨+°uÐ)=ÀUðó ð rcóv—|r+tj|d«rtj|«}t|||«S)a1Returns this smartset filtered by condition as a new smartset. `condition` is a callable which takes a revision number and returns a boolean. Optional `condrepr` provides a printable representation of the given `condition`. This is part of the mandatory API for smartset.Ú__code__)rÚ safehasattrÚ cachefuncÚ filteredset)rÚ conditionrFrGs rrJzabstractsmartset.filterƒs3€ñ ”T×%Ñ% i°Ô<ÜŸ™ yÓ1ˆIܘ4 ¨HÓ5Ð5rcód—|dks|dkrtjd«‚|j||«S)zAReturn new smartset that contains selected elements from this setésnegative index not allowed)rÚProgrammingErrorÚ_slice)rÚstartÚstops rÚslicezabstractsmartset.slice�s2€à �1Š9˜˜qšÜ×(Ñ(Ð)FÓGÐ GØ�{‰{˜5 $Ó'Ð'rcóæ—g}t|«}t|«D]}t|d«}|�Œnt||z «D]#}t|d«}|€n|j|«Œ%t |d|||f¬«S)Nsslice=%d:%d %r)Údatarepr)ÚiterÚrangeÚnextÚappendÚbaseset)rr`raÚysÚitÚxÚys rr_zabstractsmartset._slice–s€ðˆÜ �$‹ZˆÜ�u–ˆAÜ�R˜“ˆA؉yÙðô�t˜e‘|Ö$ˆAÜ�R˜“ˆA؈yÙØ �I‰I�a�Lð %ô �rÐ%6¸¸tÀTÐ$JÔKÐKr©F©NT)r Ú __module__Ú __qualname__rÚ__bool__rr r0r6r"r$r&r1r7r9r<r>r@rCrMrPrUrJrbr_r+rrrrsv„ò$ð€Hò$ò$ð€GØ€Hò$ò$ò$ò ò ò$ò $ò $ò $ó$òLò#ò  ó 6ò(ó Lrrcó>‡—eZdZdZdd„Zej d„«Zej d„«Zej d„«Z d„Z d„Z d„Z ej d „«Z d „ZeZdd „Zd „Zd „Zd„Zd„Zd„Zd„Zd„Zˆfd„Zd„Zd„Zd„Zej:d„«ZˆxZS)riaÛBasic data structure that represents a revset and contains the basic operation that it should be able to perform. Every method in this class should be implemented by any smartset class. This class could be constructed by an (unordered) set, or an (ordered) list-like object. If a set is provided, it'll be sorted lazily. >>> x = [4, 0, 7, 6] >>> y = [5, 6, 7, 3] Construct by a set: >>> xs = baseset(set(x)) >>> ys = baseset(set(y)) >>> [list(i) for i in [xs + ys, xs & ys, xs - ys]] [[0, 4, 6, 7, 3, 5], [6, 7], [0, 4]] >>> [type(i).__name__ for i in [xs + ys, xs & ys, xs - ys]] ['addset', 'baseset', 'baseset'] Construct by a list-like: >>> xs = baseset(x) >>> ys = baseset(i for i in y) >>> [list(i) for i in [xs + ys, xs & ys, xs - ys]] [[4, 0, 7, 6, 5, 3], [7, 6], [4, 0]] >>> [type(i).__name__ for i in [xs + ys, xs & ys, xs - ys]] ['addset', 'filteredset', 'filteredset'] Populate "_set" fields in the lists so set optimization may be used: >>> [1 in xs, 3 in ys] [False, True] Without sort(), results won't be changed: >>> [list(i) for i in [xs + ys, xs & ys, xs - ys]] [[4, 0, 7, 6, 5, 3], [7, 6], [4, 0]] >>> [type(i).__name__ for i in [xs + ys, xs & ys, xs - ys]] ['addset', 'filteredset', 'filteredset'] With sort(), set optimization could be used: >>> xs.sort(reverse=True) >>> [list(i) for i in [xs + ys, xs & ys, xs - ys]] [[7, 6, 4, 0, 5, 3], [7, 6], [4, 0]] >>> [type(i).__name__ for i in [xs + ys, xs & ys, xs - ys]] ['addset', 'baseset', 'baseset'] >>> ys.sort() >>> [list(i) for i in [xs + ys, xs & ys, xs - ys]] [[7, 6, 4, 0, 3, 5], [7, 6], [4, 0]] >>> [type(i).__name__ for i in [xs + ys, xs & ys, xs - ys]] ['addset', 'baseset', 'baseset'] istopo is preserved across set operations >>> xs = baseset(set(x), istopo=True) >>> rs = xs & ys >>> type(rs).__name__ 'baseset' >>> rs._istopo True có¾—d|_||_t|t«r||_d|_||_yt|t «s t |«}||_||_y)z  datarepr: a tuple of (format, obj, ...), a function or an object that provides a printable representation of the given data. NT)Ú _ascendingÚ_istoporHÚsetÚ_setÚlistÚ_listÚ _datarepr)rÚdatardr&s rÚ__init__zbaseset.__init__ãsV€ð ˆŒØˆŒ Ü �dœCÔ àˆDŒIà"ˆDŒOð "ˆ�ô˜d¤DÔ)ܘD“z�؈DŒJØ!ˆ�rcó,—t|j«Sr*)rwrzrs rrxz baseset._setõs€ä�4—:‘:‹ÐrcóD—|jdd}|j«|Sr*)rzrC)rÚasclists rÚ_asclistzbaseset._asclistùs€à—*‘*™Q�-ˆØ� ‰ ŒØˆrcóL—d|jvsJ‚t|j«S)Nrx)Ú__dict__ryrxrs rrzz baseset._listÿs$€ð˜Ÿ™Ñ&Ð&Ð&Ü�D—I‘I‹Ðrcó°—|j€t|j«S|jrt|j«St |j«Sr*)rurerzr�Úreversedrs rr zbaseset.__iter__s@€Ø �?‰?Ð "ܘŸ ™ Ó#Ð #Ø �_Š_ܘŸ ™ Ó&Ð &ä˜DŸM™MÓ*Ð *rcó,—t|j«Sr*)rer�rs rr0zbaseset.fastasc s€Ü�D—M‘MÓ"Ð"rcó,—t|j«Sr*)r…r�rs rr6zbaseset.fastdescs€Ü˜Ÿ ™ Ó&Ð&rcó.—|jjSr*)rxrrs rrzbaseset.__contains__s€à�y‰y×%Ñ%Ð%rcó*—tt|««Sr*)ÚboolÚlenrs rrzbaseset.__nonzero__s€Ü”C˜“I‹Ðrcó4—t|« |_d|_y©NF)rŠrurvrBs rrCz baseset.sorts€Ü" 7›mÐ+ˆŒØˆ� rcó’—|j€"|jj«d|_y|j |_d|_yr�)rurzr@rvrs rr@zbaseset.reverse s<€Ø �?‰?Ð "Ø �J‰J× Ñ Ô ðˆ� ð#'§/¡/Ð1ˆDŒO؈� rcór—d|jvrt|j«St|j«S)Nrz)rƒr‹rzrxrs rr>zbaseset.__len__'s*€Ø �d—m‘mÑ #Ü�t—z‘z“?Ð "ä�t—y‘y“>Ð !rcóX—t|«dkry|jduxr |jS)zyReturns True if the collection is ascending order, False if not. This is part of the mandatory API for smartset.rTN©r‹rurs rr"zbaseset.isascending-s*€ô ˆt‹9˜Š>ØØ�‰ dÐ*Ò>¨t¯©Ð>rcóZ—t|«dkry|jduxr |j S)zzReturns True if the collection is descending order, False if not. This is part of the mandatory API for smartset.rTNr‘rs rr$zbaseset.isdescending5s-€ô ˆt‹9˜Š>ØØ�‰ dÐ*ÒB°4·?±?Ð/BÐBrcó8—t|«dkry|jS)zlIs the collection is in topographical order or not. This is part of the mandatory API for smartset.rT)r‹rvrs rr&zbaseset.istopo=s€ô ˆt‹9˜Š>ØØ�|‰|Ðrcó’—|rE|j€|jdS|jr|jdS|jdSy)Nr]éÿÿÿÿ©rurzr�rs rr9z baseset.firstEsE€Ù Ø�‰Ð&Ø—z‘z !‘}Ð$Ø—’Ø—}‘} QÑ'Ð'à—}‘} RÑ(Ð(Ørcó’—|rE|j€|jdS|jr|jdS|jdSy)Nr•r]r–rs rr<z baseset.lastOsE€Ù Ø�‰Ð&Ø—z‘z "‘~Ð%Ø—’Ø—}‘} RÑ(Ð(à—}‘} QÑ'Ð'ØrcóV•—t|«turvd|jvrhd|jvrZ|j�Ntt |j |«|j «|j ¬«}|j|_|St tt|«|«|«}|S)Nrx)r|r&)r rirƒrurrxrvÚsuper)rrLÚopÚsÚ __class__s €rÚ _fastsetopzbaseset._fastsetopYs‘ø€ô �‹Kœ7Ñ "ؘ%Ÿ.™.Ñ(ؘ$Ÿ-™-Ñ'Ø—‘Ð+äØ+”W˜TŸY™Y¨Ó+¨E¯J©JÓ7ÀÇ Á ôˆAð Ÿ?™?ˆAŒLðˆð2”œœg tÓ,¨bÓ1°%Ó8ˆA؈rcó&—|j|d«S)Ns__and__©r�rKs rrMzbaseset.__and__ió€Ø�‰˜u jÓ1Ð1rcó&—|j|d«S)Ns__sub__rŸrKs rrUzbaseset.__sub__lr rcóL—|j€$t|j|||j¬«S|j}|js0t t |«|z d«t t |«|z d«}}t||||j¬«}|j|_|S)N)r&r])rurirzrvr�r7r‹)rr`rar|r›s rr_zbaseset._sliceosˆ€à �?‰?Ð "ܘ4Ÿ:™: e¨DÐ1¸$¿,¹,ÔGÐ Gà�}‰}ˆØ�ŠÜœc $›i¨$Ñ.°Ó2´C¼¸D» ÀEÑ8IÈ1Ó4M�4ˆEÜ �D˜˜tÐ$¨T¯\©\Ô :ˆØ—‘ˆŒ ؈rcóþ—ddddœ|j}tj|j«}|s9|j}|j� |j }t j|«}dt|«||fzS)Nró-ó+©NFTs <%s%s %s>) rurÚ buildreprr{rzr�rÚbytereprr)rÚdr›Úls rÚ__repr__zbaseset.__repr__{sr€à˜t¨4Ñ 0°·±Ñ AˆÜ × Ñ  §¡Ó 0ˆÙØ— ‘ ˆAð�‰Ð*Ø—M‘M�Ü×!Ñ! !Ó$ˆAØœy¨›°°1Ð5Ñ5Ð5r)r+NFrn) r rprqÚ__doc__r}rÚ propertycacherxr�rzr r0r6rrrrrCr@r>r"r$r&r9r<r�rMrUr_rÚ strmethodr«Ú __classcell__©rœs@rriri§sèø„ñ9óv"ð$ ×Ññóðð ×Ññóðð  ×Ññóðò +ò#ò'ð ×Ññ&óð&òð€Hóòò"ò ?òCòòòôò 2ò2ò ð×Ññ 6óô 6rricó°—eZdZdZd„dfd„Zd„Zd„Zd„Zed„«Z ed „«Z d „Z e Z d „Z dd „Zd „Zd„Zd„Zd„Zd„Zd„Zej,d„«Zy)rZz Duck type for baseset class which iterates lazily over the revisions in the subset and contains a function which tests for membership in the revset có—yror+)rls rr.zfilteredset.�s€°4rNcó.—||_||_||_y)a! condition: a function that decide whether a revision in the subset belongs to the revset or not. condrepr: a tuple of (format, obj, ...), a function or an object that provides a printable representation of the given condition. N)Ú_subsetÚ _conditionÚ _condrepr)rÚsubsetr[rFs rr}zfilteredset.__init__�s€ðˆŒ Ø#ˆŒØ!ˆ�rcóD—||jvxr|j|«Sr*)r´rµ©rrls rrzfilteredset.__contains__›s€Ø�D—L‘LÐ Ò7 T§_¡_°QÓ%7Ð7rcó8—|j|j«Sr*)Ú _iterfilterr´rs rr zfilteredset.__iter__žs€Ø×Ñ § ¡ Ó-Ð-rc#óLK—|j}|D]}||«sŒ |–—Œy­wr*)rµ)rrkÚcondrls rr»zfilteredset._iterfilter¡s%èø€Ø�‰ˆÛˆAÙ�A�wØ“ñùs‚$�$cóD‡‡—‰jjЉ€yˆˆfd„S)Ncó0•—‰j‰««Sr*©r»©rkrs€€rr.z%filteredset.fastasc..¬óø€�t×'Ñ'©«Ô-r)r´r0©rrks`@rr0zfilteredset.fastasc§s ù€à �\‰\× !Ñ !ˆØ ˆ:ØÜ-Ð-rcóD‡‡—‰jjЉ€yˆˆfd„S)Ncó0•—‰j‰««Sr*rÀrÁs€€rr.z&filteredset.fastdesc..³rÂr)r´r6rÃs`@rr6zfilteredset.fastdesc®s ù€à �\‰\× "Ñ "ˆØ ˆ:ØÜ-Ð-rcóî—d}|j«r |jnd|j«r |jnd|j|jg}|D]}|€Œ|}n|�|«}n|}|D]}yy©NTF)r"r0r$r6)rÚfastÚ candidatesÚ candidaterkrSs rrzfilteredset.__nonzero__µs‚€Øˆà ×,Ñ,Ô.ˆD�LŠL°DØ!×.Ñ.Ô0ˆD�MŠM°dØ �L‰LØ �M‰Mð  ˆ ó $ˆIØÑ$Ø �Ùð$ð Ð Ù“‰BàˆBãˆAÙðàrcó<—td„|D««}t|«S)Nc3ó K—|]}|–—Œy­wr*r+)Ú.0rSs rÚ z&filteredset.__len__..Òsèø€Ð$™t˜!”A™tùs‚ )rir‹)rrªs rr>zfilteredset.__len__Ís€ô Ñ$™tÓ$Ó $ˆÜ�1‹vˆ rcó<—|jj|¬«y)N©r@)r´rCrBs rrCzfilteredset.sortÕs€Ø � ‰ ×Ñ 'ÐÕ*rcó8—|jj«yr*)r´r@rs rr@zfilteredset.reverseØs€Ø � ‰ ×ÑÕrcó6—|jj«Sr*)r´r"rs rr"zfilteredset.isascendingÛs€Ø�|‰|×'Ñ'Ó)Ð)rcó6—|jj«Sr*)r´r$rs rr$zfilteredset.isdescendingÞs€Ø�|‰|×(Ñ(Ó*Ð*rcó6—|jj«Sr*)r´r&rs rr&zfilteredset.istopoás€Ø�|‰|×"Ñ"Ó$Ð$rcó—|D]}|cSyr*r+r¹s rr9zfilteredset.firstäó€ÛˆAØŠHðàrcó²—d}|j«r |j}n|j«r |j}|�|«D]}|cSyd}|D]}Œ|Sr*)r"r6r$r0©rrkrls rr<zfilteredset.lastésa€Ø ˆØ × Ñ Ô Ø—‘‰BØ × Ñ Ô Ø—‘ˆBØ ˆ>Ù–T�Ø’ðààˆAÛ�ØðàˆHrcóä—tj|j«g}tj|j «}|r|j |«dt|«dj|«fzS)Ns<%s %s>s, ) rr¨r´rr§r¶rhrÚjoin)rÚxsr›s rr«zfilteredset.__repr__ùsW€ä×Ñ § ¡ Ó-Ð .ˆÜ × Ñ  §¡Ó 0ˆÙ Ø �I‰I�aŒLØœY t›_¨e¯j©j¸«nÐ=Ñ=Ð=rrn)r rprqr¬r}rr r»Úpropertyr0r6rrrr>rCr@r"r$r&r9r<rr®r«r+rrrZrZŠs˜„ññ *8À$ó "ò8ò.òð ñ.óð.ð ñ.óð.ò ð,€Hòó+òò*ò+ò%òò ð ×Ññ>óñ>rrZc#óôK—t}|rt}d}d} |€ t|«}|€ t|«}|||«}|–—||k(rd}||k(rd}Œ6#t$r|}|�|–—|}n|�|–—|D]}|–—ŒYywxYw­w)z‰produce an ordered iteration from two iterators with the same order The ascending is used to indicated the iteration direction. N)r7r1rgÚ StopIteration) Ú ascendingÚiter1Úiter2ÚchoiceÚval1Úval2ÚnrkÚvals rÚ _iterorderedrçs°èø€ô €FÙÜˆà €DØ €DðàØˆ|ܘE“{�؈|ܘE“{�Ù�t˜TÓ"ˆAØŠGØ�qŠyØ�Ø�qŠyØ�ðøô ò à ˆØ Ð ØŠJ؉BØ Ð àŠJÛˆCØ‹Iòð üs"‚A8–7A Á %A5Á2A8Á4A5Á5A8cóΗeZdZdZdd„Zd„Zd„ZeZejd„«Z d„Z d„Z e d „«Ze d „«Zd „Zdd „Zd „Zd„Zd„Zd„Zd„Zd„Zej2d„«Zy)rOa Represent the addition of two sets Wrapper structure for lazily adding two structures without losing much performance on the __contains__ method If the ascending attribute is set, that means the two structures are ordered in either an ascending or descending way. Therefore, we can add them maintaining the order by iterating over both at the same time >>> xs = baseset([0, 3, 2]) >>> ys = baseset([5, 2, 4]) >>> rs = addset(xs, ys) >>> bool(rs), 0 in rs, 1 in rs, 5 in rs, rs.first(), rs.last() (True, True, False, True, 0, 4) >>> rs = addset(xs, baseset([])) >>> bool(rs), 0 in rs, 1 in rs, rs.first(), rs.last() (True, True, False, 0, 2) >>> rs = addset(baseset([]), baseset([])) >>> bool(rs), 0 in rs, rs.first(), rs.last() (False, False, None, None) iterate unsorted: >>> rs = addset(xs, ys) >>> # (use generator because pypy could call len()) >>> list(x for x in rs) # without _genlist [0, 3, 2, 5, 4] >>> assert not rs._genlist >>> len(rs) 5 >>> [x for x in rs] # with _genlist [0, 3, 2, 5, 4] >>> assert rs._genlist iterate ascending: >>> rs = addset(xs, ys, ascending=True) >>> # (use generator because pypy could call len()) >>> list(x for x in rs), list(x for x in rs.fastasc()) # without _asclist ([0, 2, 3, 4, 5], [0, 2, 3, 4, 5]) >>> assert not rs._asclist >>> len(rs) 5 >>> [x for x in rs], [x for x in rs.fastasc()] ([0, 2, 3, 4, 5], [0, 2, 3, 4, 5]) >>> assert rs._asclist iterate descending: >>> rs = addset(xs, ys, ascending=False) >>> # (use generator because pypy could call len()) >>> list(x for x in rs), list(x for x in rs.fastdesc()) # without _asclist ([5, 4, 3, 2, 0], [5, 4, 3, 2, 0]) >>> assert not rs._asclist >>> len(rs) 5 >>> [x for x in rs], [x for x in rs.fastdesc()] ([5, 4, 3, 2, 0], [5, 4, 3, 2, 0]) >>> assert rs._asclist iterate ascending without fastasc: >>> rs = addset(xs, generatorset(ys), ascending=True) >>> assert rs.fastasc is None >>> [x for x in rs] [0, 2, 3, 4, 5] iterate descending without fastdesc: >>> rs = addset(generatorset(xs), ys, ascending=False) >>> assert rs.fastdesc is None >>> [x for x in rs] [5, 4, 3, 2, 0] NcóX—||_||_d|_||_d|_d|_yr*)Ú_r1Ú_r2Ú_iterruÚ_genlistr�)rÚrevs1Úrevs2rßs rr}zaddset.__init__os,€ØˆŒØˆŒØˆŒ Ø#ˆŒØˆŒ ؈� rcó,—t|j«Sr*)r‹rzrs rr>zaddset.__len__ws€Ü�4—:‘:‹ÐrcóZ—t|j«xst|j«Sr*)rŠrêrërs rrzaddset.__nonzero__zs€Ü�D—H‘H‹~Ò/¤ d§h¡h£Ð/rcód—|jstt|««|_|jSr*)rírirers rrzz addset._lists#€à�}Š}Ü#¤D¨£JÓ/ˆDŒMØ�}‰}Ðrcó<‡—‰j€-‰jrt‰j«Sˆfd„}|«S‰j«‰jrd}nd}t ‰|«}|�|«St ‰j |«}|€,tt ‰j ‰j ¬««}n|«}t ‰j|«}|€,tt ‰j‰j ¬««}n|«}t‰j||«S)a�Iterate over both collections without repeating elements If the ascending attribute is not set, iterate over the first one and then over the second one checking for membership on the first one so we dont yield any duplicates. If the ascending attribute is set, iterate over both collections at the same time, yielding only one value at a time in the given order. c3ó •K—‰jD]}|–—Œ‰jj}‰jD]}||«rŒ |–—Œy­wr*)rêrrë)rSÚinr1rs €rÚarbitraryordergenz*addset.__iter__..arbitraryordergen“sCøèø€ØŸœ�AØ“Gð"à—x‘x×,Ñ,�ØŸœ�AÙ �7Ø›ñ"ùs ƒAAÁAr0r6rÐ) ruríreÚ_trysetasclistrrêÚsortedrërç)rröÚattrrkràrás` rr zaddset.__iter__…sïø€ð �?‰?Ð "Ø�}Š}ܘDŸM™MÓ*Ð*ô ñ%Ó&Ð &à ×ÑÔØ �?Š?؉DàˆDÜ �T˜4Ó ˆØ ˆ>Ù“4ˆKô˜Ÿ™ $Ó'ˆØ ˆ=䜠§¡°d·o±oÐ2EÔFÓG‰Eá“GˆE䘟™ $Ó'ˆØ ˆ=䜠§¡°d·o±oÐ2EÔFÓG‰Eá“GˆEܘDŸO™O¨U°EÓ:Ð:rcól—|j�(|j€t|j«|_yyy)z9populate the _asclist attribute if possible and necessaryN)rír�rørs rr÷zaddset._trysetasclist¶s-€à �=‰=Ð $¨¯©Ð)>Ü" 4§=¡=Ó1ˆD�Mð*?Ð $rcó܇‡—|j«|j�|jjS|jjŠ|j jŠd‰‰fvryˆˆfd„S)Ncó2•—td‰«‰««Sro©rç©ràrás€€rr.z addset.fastasc..Äsø€”| D©%«'±5³7Ô;r)r÷r�r rêr0rë©rràrás @@rr0zaddset.fastasc»s\ù€à ×ÑÔØ �=‰=Ð $Ø—=‘=×)Ñ)Ð )Ø—‘× Ñ ˆØ—‘× Ñ ˆØ �E˜5�>Ñ !ØÜ;Ð;rcó܇‡—|j«|j�|jjS|jjŠ|j jŠd‰‰fvryˆˆfd„S)Ncó2•—td‰«‰««Sr�rýrþs€€rr.z!addset.fastdesc..Ïsø€”| E©5«7±E³GÔÑ !ØÜ<З||jvxs||jvSr*)rêrër¹s rrzaddset.__contains__Ñs€Ø�D—H‘Hˆ}Ò-  T§X¡X  Ð-rcó—| |_y)z»Sort the added set For this we use the cached list with all the generated values and if we know they are ascending or descending we can sort them in a smart way. N©rurBs rrCz addset.sortÔs €ð &˜+ˆ�rcó:—|jduxr |jSr*rrs rr"zaddset.isascendingÜs€Ø�‰ dÐ*Ò>¨t¯©Ð>rcó<—|jduxr |j Sr*rrs rr$zaddset.isdescendingßs€Ø�‰ dÐ*ÒB°4·?±?Ð/BÐBrcó—yr�r+rs rr&z addset.istopoâó€ðrcóv—|j€|jj«y|j |_yr*)rurzr@rs rr@zaddset.reverseès*€Ø �?‰?Ð "Ø �J‰J× Ñ Õ à"&§/¡/Ð1ˆD�Orcó—|D]}|cSyr*r+r¹s rr9z addset.firstîrÖrcóf—|j«|j«}|j«|Sr*)r@r9)rræs rr<z addset.lastós$€Ø � ‰ ŒØ�j‰j‹lˆØ � ‰ ŒØˆ rcót—ddddœ|j}dt|«||j|jfzS)Nrr¤r¥r¦s <%s%s %r, %r>)rurrêrë©rr©s rr«zaddset.__repr__ùs7€à˜t¨4Ñ 0°·±Ñ AˆØ¤9¨T£?°A°t·x±xÀÇÁÐ"JÑJÐJrr*rn)r rprqr¬r}r>rrrrr­rzr r÷rÜr0r6rrCr"r$r&r@r9r<rr®r«r+rrrOrO's¯„ñEóNòò0ð€Hà ×Ññóðò /;òb2ð ñ<óð<ðñ=óð=ò.ó&ò?òCòò 2ò ò ð ×ÑñKóñKrrOc󤇗eZdZdZdˆfd„ Zdd„Zd„ZeZd„Zd„Z d„Z d„Z d „Z dd „Z d „Zd „Zd „Zd„Zd„Zd„Zej*d„«ZˆxZS)Ú generatorseta¤Wrap a generator for lazy iteration Wrapper structure for generators that provides lazy membership and can be iterated more than once. When asked for membership it generates values until either it finds the requested one or has gone through all the elements in the generator >>> xs = generatorset([0, 1, 4], iterasc=True) >>> assert xs.last() == xs.last() >>> xs.last() # cached 4 cóR•—|€|}n|rt}nt}tt|�|«Sr*)Ú_generatorsetascÚ_generatorsetdescr™rÚ__new__)ÚclsÚgenÚiterascÚtyprœs €rrzgeneratorset.__new__ s,ø€Ø ˆ?؉CÙ Ü"‰Cä#ˆCä”\ 3Ñ/°Ó4Ð4rcóX—||_d|_i|_g|_d|_d|_y)zM gen: a generator producing the values for the generatorset. NFT)Ú_genr�Ú_cacheríÚ _finishedru)rrrs rr}zgeneratorset.__init__s.€ðˆŒ ؈Œ ؈Œ ؈Œ ؈ŒØˆ�rcóJ—|jry|j«D]}yyrÇ)ríÚ _consumegen©rrSs rrzgeneratorset.__nonzero__"s'€ð �=Š=ØØ×!Ñ!Ö#ˆAÙð$àrcó”—||jvr|j|S|j«D] }||k(sŒ yd|j|<yrÇ©rr©rrlrªs rrzgeneratorset.__contains__.sM€Ø �— ‘ Ñ Ø—;‘;˜q‘>Ð !ð×!Ñ!Ö#ˆAØ�A‹vÙð$ðˆ� ‰ �A‰Ørcóž—|jr |j}n |j}|�|«S|j«D]}Œt |«Sr*)rur0r6rrerØs rr zgeneratorset.__iter__:sI€Ø �?Š?Ø—‘‰Bà—‘ˆBØ ˆ>Ù“4ˆKà×!Ñ!Ö#ˆAØ ð$ô�D‹zÐrc󼇇‡‡—|jrt|j«S|jŠ|j«Štt cŠŠˆˆˆˆfd„}|«S)Nc3óx•K—d} |‰‰«kr‰|–—n ‰‰«–—|dz }Œ$#t$rYywxYw­w©Nr]r)rÞ)ÚiÚ_lenÚ_nextÚgenlistÚnextgens €€€€rrz#generatorset._iterator..genUsWøèø€ØˆAØØ‘t˜G“}Ò$Ø! !™*Ó$ðÙ# G›nÒ,ð�Q‘�ðøô )òÙðüsƒ:› +¥:« 7´:¶7·:)rrerírr‹rg)rrr(r)r*r+s @@@@rÚ _iteratorzgeneratorset._iteratorGsKû€Ø �>Š>ܘŸ ™ Ó&Ð &ð—-‘-ˆØ×"Ñ"Ó$ˆÜœ4ˆ ˆˆe÷ ñ‹uˆ rc#óLK—|j}|jj}|jD]}d||<||«|–—Œ|jsPd|_|jdd}|j «||_|j|_|j|_ yy­wro) rrírhrrrCr�r r0rr6)rrGr*ÚitemÚascs rrzgeneratorset._consumegencsŒèø€Ø— ‘ ˆØ—-‘-×&Ñ&ˆØ—I”IˆD؈E�$‰KÙ �DŒMØ‹Jðð�~Š~Ø!ˆDŒNØ—-‘-¡Ð"ˆCØ �H‰HŒJ؈DŒMØŸ<™<ˆDŒLØ×,Ñ,ˆD�Mð ùs‚B"B$cóV—|j«D]}Œt|j«Sr*)rr‹rír¹s rr>zgeneratorset.__len__rs'€Ø×!Ñ!Ö#ˆAØ ð$ä�4—=‘=Ó!Ð!rcó—| |_yr*rrBs rrCzgeneratorset.sortwó €Ø%˜+ˆ�rcó(—|j |_yr*rrs rr@zgeneratorset.reversezó€Ø"Ÿo™oÐ-ˆ�rcó—|jSr*rrs rr"zgeneratorset.isascending}ó €Ø�‰Ðrcó—|j Sr*rrs rr$zgeneratorset.isdescending€ó€Ø—?‘?Ð"Ð"rcó—yr�r+rs rr&zgeneratorset.istopoƒr rcó¼—|jr |j}n |j}|€%|j«D]}Œ|j «St |«d«Sr*)rur0r6rr9rgrØs rr9zgeneratorset.first‰sQ€Ø �?Š?Ø—‘‰Bà—‘ˆBØ ˆ:à×%Ñ%Ö'�Øð(à—:‘:“<Ð Ü‘B“D˜$ÓÐrcó¼—|jr |j}n |j}|€%|j«D]}Œ|j «St |«d«Sr*)rur6r0rr<rgrØs rr<zgeneratorset.last•sQ€Ø �?Š?Ø—‘‰Bà—‘ˆBØ ˆ:à×%Ñ%Ö'�Øð(à—9‘9“;Ð Ü‘B“D˜$ÓÐrcóF—dddœ|j}dt|«|fzS)Nr¤r¥©FTs<%s%s>)rurrs rr«zgeneratorset.__repr__¡s)€à Ñ % d§o¡oÑ 6ˆØœI d›O¨QÐ/Ñ/Ð/rr*rn)r rprqr¬rr}rrrrr r,rr>rCr@r"r$r&r9r<rr®r«r¯r°s@rrrÿstø„ñ õ5ó òð€Hò ò òò8 -ò"ó &ò.òò#òò  ò  ð×Ññ0óô0rrcó.—eZdZdZej Zd„Zy)rz@Special case of generatorset optimized for ascending generators.có¢—||jvr|j|S|j«D]}||k(ry||kDsŒnd|j|<yrÇr!r"s rrz_generatorsetasc.__contains__¬óW€Ø �— ‘ Ñ Ø—;‘;˜q‘>Ð !ð×!Ñ!Ö#ˆAØ�AŠvÙØ�1‹uÙð $ð ˆ� ‰ �A‰ØrN)r rprqr¬rr,r0rr+rrrr§s„ÙJà×$Ñ$€Gó rrcó.—eZdZdZej Zd„Zy)rzASpecial case of generatorset optimized for descending generators.có¢—||jvr|j|S|j«D]}||k(ry||ksŒnd|j|<yrÇr!r"s rrz_generatorsetdesc.__contains__Àr@rN)r rprqr¬rr,r6rr+rrrr»s„ÙKà×%Ñ%€Hó rrNcó‚—|€ t|«}||k}|s |dz|dz}}t||||jj«S)z÷Create a spanset that represents a range of repository revisions start: first revision included the set (default to 0) end: first revision excluded (last+1) (default to len(repo)) Spanset will be descending if `end` < `start`. r)r‹Ú_spansetÚ changelogÚ filteredrevs)Úrepor`Úendrßs rÚspansetrIÏsJ€ð €{Ü�$‹iˆØ˜‘ €I٠ؘ1‘W˜e a™iˆsˆÜ �E˜3  ¨4¯>©>×+FÑ+FÓ GÐGrc󦇗eZdZdZd„Zdd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z e Zd „Zd „Zd„Zd„Zd„Zˆfd„Zej,d„«ZˆxZS)rDa[Duck type for baseset class which represents a range of revisions and can work lazily and without having all the range in memory Note that spanset(x, y) behave almost like range(x, y) except for two notable points: - when x < y it will be automatically descending, - revision filtered with this repoview will be skipped. có<—||_||_||_||_yr*)Ú_startÚ_endruÚ _hiddenrevs)rr`rHrßÚ hiddenrevss rr}z_spanset.__init__ês€ØˆŒ ؈Œ Ø#ˆŒØ%ˆÕrcó—| |_yr*rrBs rrCz _spanset.sortðr2rcó(—|j |_yr*rrs rr@z_spanset.reverseór4rcó—yr�r+rs rr&z_spanset.istopoör rc#óDK—|j}|D] }||vsŒ|–—Œ y­wr*)rN)rÚ iterranger›rSs rr»z_spanset._iterfilterüs'èø€Ø × Ñ ˆÛˆAؘŠzØ“ñùs‚ ™ cóZ—|jr|j«S|j«Sr*©rur0r6rs rr z_spanset.__iter__s!€Ø �?Š?Ø—<‘<“>Ð !à—=‘=“?Ð "rcó’—t|j|j«}|jr|j |«St |«Sr*)rfrLrMrNr»re©rrTs rr0z_spanset.fastascs:€Ü˜$Ÿ+™+ t§y¡yÓ1ˆ Ø × Ò Ø×#Ñ# IÓ.Ð .Ü�I‹Ðrcó —t|jdz |jdz d«}|jr|j |«St |«S)Nrr•)rfrMrLrNr»rerXs rr6z_spanset.fastdescsD€Ü˜$Ÿ)™) a™-¨¯©°q©¸"Ó=ˆ Ø × Ò Ø×#Ñ# IÓ.Ð .Ü�I‹Ðrcóx—|j}|j|cxkxr|jkncxr |xr||v Sr*)rNrLrM)rrÚhiddens rrz_spanset.__contains__s=€Ø×!Ñ!ˆØ— ‘ ˜sÖ. T§Y¡YÔ.ò Ø Ò $�s˜f�}ð5 ð rcó—|D]}yyrÇr+rs rrz_spanset.__nonzero__s€ÛˆAÙðàrcó@—|js"t|j|jz «Sd}|j}|j}|jD]#}||cxkr|ksn||cxkr|ksŒnŒ|dz }Œ%t|j|jz «|z Sr&)rNÚabsrMrL)rÚcountr`rHrs rr>z_spanset.__len__!s‹€Ø×ÒÜ�t—y‘y 4§;¡;Ñ.Ó/Ð /àˆEØ—K‘KˆEØ—)‘)ˆCØ×'Ô'�ؘ#Ô& Ô&¨E°SÔ,>¸3Ö,>ؘQ‘J‘Eð(ô�t—y‘y 4§;¡;Ñ.Ó/°%Ñ7Ð 7rcó—|jSr*rrs rr"z_spanset.isascending-r6rcó—|j Sr*rrs rr$z_spanset.isdescending0r8rcól—|jr |j}n |j}|«D]}|cSyr*rVrØs rr9z_spanset.first3s/€Ø �?Š?Ø—‘‰Bà—‘ˆBÙ–ˆAØŠHðàrcól—|jr |j}n |j}|«D]}|cSyr*)rur6r0rØs rr<z _spanset.last<s/€Ø �?Š?Ø—‘‰Bà—‘ˆBÙ–ˆAØŠHðàrc󺕗|jrtt|�||«S|jrGt |j |z|j«}t |j |z|j«}nFt|j|z |j «}t|j|z |j «}t|||j|j«Sr*) rNr™rDr_rur1rLrMr7)rr`rarlrmrœs €rr_z_spanset._sliceEs¦ø€Ø × Ò äœ 4Ñ/°°tÓ<Ð <Ø �?Š?Ü�D—K‘K %Ñ'¨¯©Ó3ˆAÜ�D—K‘K $Ñ&¨¯ © Ó2‰Aä�D—I‘I Ñ$ d§k¡kÓ2ˆAÜ�D—I‘I Ñ% t§{¡{Ó3ˆAܘ˜1˜dŸo™o¨t×/?Ñ/?Ó@Ð@rcór—dddœ|j}dt|«||j|jfzS)Nr¤r¥r=s <%s%s %d:%d>)rurrLrMrs rr«z_spanset.__repr__Qs5€à Ñ % d§o¡oÑ 6ˆØ¤)¨D£/°1°d·k±kÀ4Ç9Á9Ð!MÑMÐMrrn)r rprqr¬r}rCr@r&r»r r0r6rrrrr>r"r$r9r<r_rr®r«r¯r°s@rrDrDßs|ø„ñò&ó &ò.òò ò #ò ò ò  ò ð €Hò 8òò#òòô Að×ÑñNóôNrrDcó(‡—eZdZdZˆfd„Zd„ZˆxZS)rIz�a set containing all revisions in the repo This class exists to host special optimization and magic to handle virtual revisions such as "null". cól•—tt|� dt|«d|jj «y)Nr]T)r™rIr}r‹rErF)rrGrœs €rr}zfullreposet.__init__^s)ø€Ü Œk˜4Ñ)Ø Œs�4‹y˜$ §¡× ;Ñ ;õ rcó¢—tj|d«st||jz «}|j |j «¬«|S)zÁAs self contains the whole repo, all of the other set should also be in self. Therefore `self & other = other`. This boldly assumes the other contains valid revs only. r"rÐ)rrXrirNrCr$rKs rrMzfullreposet.__and__csG€ô×Ñ  }Ô5ô ˜E D×$4Ñ$4Ñ4Ó5ˆEà � ‰ ˜4×,Ñ,Ó.ˆ Ô/؈ r)r rprqr¬r}rMr¯r°s@rrIrIWsø„ñô  ö rrI)r]N)rrÚrrrÚutilsrrrrirZrçrOrrrrIrDrIr+rrÚrks±ðõ÷óõ ò<÷MLñMLô``6Ðô`6ôFu>Ð"ôu>òp"ôJUKÐ ôUKôpe0Ð#ôe0ôP�|ôô(˜ ôó( Hô uNÐôuNôp�(õr