ó
    6°hø…  ã                  ó  • S SK Jr  SSKJrJrJrJr  SSKJr  S r	 " S S5      r
 " S S	\
5      r " S
 S\
5      rS r " S S\
5      r " S S\
5      r " S S\5      r " S S\5      rSS jr " S S\
5      r " S S\5      rg)é    )Úannotationsé   )ÚencodingÚerrorÚpycompatÚutil)Ú
stringutilc                ór   • [         R                  " [        U 5      R                  5      R	                  S5      $ )Nó   _)r   ÚsysbytesÚtypeÚ__name__Úlstrip)Úos    Ú4/usr/lib/python3/dist-packages/mercurial/smartset.pyÚ	_typenamer      s(   € Ü×ÒœT !›W×-Ñ-Ó.×5Ñ5°dÓ;Ð;ó    c                  óš   • \ rS rSrS r\rS rS rSrSr	S r
S rS rS	 rS
 rS rS rS rS rSS jrS rS rS rSS jrS rS rSrg)Úabstractsmartseté   c                ó   • [        5       e)z!True if the smartset is not empty©ÚNotImplementedError©Úselfs    r   Ú__nonzero__Úabstractsmartset.__nonzero__   ó   € ä!Ó#Ð#r   c                ó   • [        5       e)zprovide fast membership testingr   )r   Úrevs     r   Ú__contains__Úabstractsmartset.__contains__   r   r   c                ó   • [        5       e)z:iterate the set in the order it is supposed to be iteratedr   r   s    r   Ú__iter__Úabstractsmartset.__iter__"   r   r   Nc                ó   • [        5       e)z/True if the set will iterate in ascending orderr   r   s    r   ÚisascendingÚabstractsmartset.isascending.   r   r   c                ó   • [        5       e)z0True if the set will iterate in descending orderr   r   s    r   ÚisdescendingÚabstractsmartset.isdescending2   r   r   c                ó   • [        5       e)z3True if the set will iterate in topographical orderr   r   s    r   ÚistopoÚabstractsmartset.istopo6   r   r   c                ó”   ^• U R                   c  [        U 5      mO"U R                  5        H  m  O   [        S5      eU4S jU l        T$ )z%return the minimum element in the setó   arg is an empty sequencec                 ó   >• T $ ©N© ©Úvs   €r   Ú<lambda>Ú&abstractsmartset.min.<locals>.<lambda>C   ó   ø€ ™1r   )ÚfastascÚminÚ
ValueError©r   r5   s    @r   r:   Úabstractsmartset.min:   sC   ø€ à�<‰<ÑÜ�D“	‰Aà—\‘\–^�Ùñ $ô !Ð!<Ó=Ð=ÜˆŒØˆr   c                ó’   ^• U R                   c  [        U 5      $ U R                  5        H  m  O   [        S5      eU4S jU l        T$ )z%return the maximum element in the setr0   c                 ó   >• T $ r2   r3   r4   s   €r   r6   Ú&abstractsmartset.max.<locals>.<lambda>O   r8   r   )ÚfastdescÚmaxr;   r<   s    @r   rB   Úabstractsmartset.maxF   sD   ø€ à�=‰=Ñ Ü�t“9Ðà—]‘]–_�Ùñ %ô !Ð!<Ó=Ð=ÜˆŒØˆr   c                ó   • [        5       e)zareturn the first element in the set (user iteration perspective)

Return None if the set is emptyr   r   s    r   ÚfirstÚabstractsmartset.firstR   ó   € ô "Ó#Ð#r   c                ó   • [        5       e)z`return the last element in the set (user iteration perspective)

Return None if the set is emptyr   r   s    r   ÚlastÚabstractsmartset.lastX   rG   r   c                ó   • [        5       e)zcreturn the length of the smartsets

This can be expensive on smartset that could be lazy otherwise.r   r   s    r   Ú__len__Úabstractsmartset.__len__^   rG   r   c                ó   • [        5       e)z$reverse the expected iteration orderr   r   s    r   ÚreverseÚabstractsmartset.reversed   r   r   c                ó   • [        5       e)z:get the set to iterate in an ascending or descending orderr   ©r   rO   s     r   ÚsortÚabstractsmartset.sorth   r   r   c                óf   • [        U[        5      (       a  U $ U R                  UR                  USS9$ )zsReturns 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__Úabstractsmartset.__and__l   s1   € ô �eœ[×)Ñ)ØˆKØ�{‰{˜5×-Ñ-¸ÀUˆ{ÐKÐKr   c                ó   • [        X5      $ )zlReturns a new object with the union of the two collections.

This is part of the mandatory API for smartset.)Úaddsetr\   s     r   Ú__add__Úabstractsmartset.__add__t   s   € ô �dÓ"Ð"r   c                óJ   ^• UR                   mU R                  U4S jSU4SS9$ )zsReturns a new object with the substraction of the two collections.

This is part of the mandatory API for smartset.c                ó   >• T" U 5      (       + $ r2   r3   )ÚrÚcs    €r   r6   Ú*abstractsmartset.__sub__.<locals>.<lambda>€   s   ø€ ™!˜A›$•hr   s   <not %r>FrV   )r!   r[   )r   r]   rg   s     @r   Ú__sub__Úabstractsmartset.__sub__z   s2   ø€ ð ×ÑˆØ�{‰{Ü¨+°uÐ)=ÀUð ð 
ð 	
r   c                óv   • U(       a'  [        US5      (       a  [        R                  " U5      n[        XU5      $ )a  Returns 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__)Úhasattrr   Ú	cachefuncÚfilteredset)r   Ú	conditionrW   rX   s       r   r[   Úabstractsmartset.filterƒ   s.   € ö ”W˜Y¨
×3Ñ3ÜŸš yÓ1ˆIÜ˜4¨HÓ5Ð5r   c                óh   • US:  d  US:  a  [         R                  " S5      eU R                  X5      $ )zAReturn new smartset that contains selected elements from this setr   s   negative index not allowed)r   ÚProgrammingErrorÚ_slice)r   ÚstartÚstops      r   ÚsliceÚabstractsmartset.slice�   s0   € à�1‹9˜˜q›Ü×(Ò(Ð)FÓGÐGØ�{‰{˜5Ó'Ð'r   c                óè   • / n[        U 5      n[        U5       H  n[        US 5      nUb  M    O   [        X!-
  5       H%  n[        US 5      nUc    OUR                  U5        M'     [	        USXU 4S9$ )Ns   slice=%d:%d %r)Údatarepr)ÚiterÚrangeÚnextÚappendÚbaseset)r   ru   rv   ÚysÚitÚxÚys          r   rt   Úabstractsmartset._slice–   s{   € ð ˆÜ�$‹ZˆÜ�u–ˆAÜ�R˜“ˆAØ‹yÙñ ô �t‘|Ö$ˆAÜ�R˜“ˆAØ‰yÙØ�I‰I�aŽLñ	 %ô
 �rÐ%6¸ÀTÐ$JÑKÐKr   )rB   r:   ©F©NT)r   Ú
__module__Ú__qualname__Ú__firstlineno__r   Ú__bool__r!   r$   r9   rA   r'   r*   r-   r:   rB   rE   rI   rL   rO   rS   r^   rb   ri   r[   rw   rt   Ú__static_attributes__r3   r   r   r   r      sv   † ò$ð €Hò$ò$ð €GØ€Hò$ò$ò$ò
ò
ò$ò$ò$ò$ô$òLò#ò
ô6ò(õLr   r   c                  óL  ^ • \ rS rSrSrSS jr\R                  S 5       r\R                  S 5       r	\R                  S 5       r
S rS rS	 r\R                  S
 5       rS r\rSS jrS rS rS rS rS rS rS rU 4S jrS rS rS r\R<                  S 5       rSr U =r!$ )r   é§   a  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                ó¼   • SU l         X0l        [        U[        5      (       a  Xl        SU l         O&[        U[
        5      (       d  [        U5      nXl        X l        g)zˆ
datarepr: a tuple of (format, obj, ...), a function or an object that
          provides a printable representation of the given data.
NT)Ú
_ascendingÚ_istoporY   ÚsetÚ_setÚlistÚ_listÚ	_datarepr)r   Údatarz   r-   s       r   Ú__init__Úbaseset.__init__ã   sI   € ð
 ˆŒØŒÜ�dœC× Ñ àŒIà"ˆD�Oä˜d¤D×)Ñ)Ü˜D“z�ØŒJØ!�r   c                ó,   • [        U R                  5      $ r2   )r‘   r”   r   s    r   r’   Úbaseset._setõ   s   € ä�4—:‘:‹Ðr   c                óD   • U R                   S S  nUR                  5         U$ r2   )r”   rS   )r   Úasclists     r   Ú_asclistÚbaseset._asclistù   s   € à—*‘*™Q�-ˆØ�‰ŒØˆr   c                óP   • SU R                   ;   d   e[        U R                  5      $ )Nr’   )Ú__dict__r“   r’   r   s    r   r”   Úbaseset._listÿ   s$   € ð ˜Ÿ™Ó&Ð&Ð&Ü�D—I‘I‹Ðr   c                ó¼   • U R                   c  [        U R                  5      $ U R                   (       a  [        U R                  5      $ [	        U R                  5      $ r2   )r�   r{   r”   r�   Úreversedr   s    r   r$   Úbaseset.__iter__  s@   € Ø�?‰?Ñ"Ü˜Ÿ
™
Ó#Ð#Ø�_�_Ü˜Ÿ™Ó&Ð&ä˜DŸM™MÓ*Ð*r   c                ó,   • [        U R                  5      $ r2   )r{   r�   r   s    r   r9   Úbaseset.fastasc  s   € Ü�D—M‘MÓ"Ð"r   c                ó,   • [        U R                  5      $ r2   )r£   r�   r   s    r   rA   Úbaseset.fastdesc  s   € Ü˜Ÿ™Ó&Ð&r   c                ó.   • U R                   R                  $ r2   )r’   r!   r   s    r   r!   Úbaseset.__contains__  s   € à�y‰y×%Ñ%Ð%r   c                ó*   • [        [        U 5      5      $ r2   )ÚboolÚlenr   s    r   r   Úbaseset.__nonzero__  s   € Ü”C˜“I‹Ðr   c                ó<   • [        U5      (       + U l        SU l        g ©NF)r¬   r�   r�   rR   s     r   rS   Úbaseset.sort  s   € Ü" 7›mÔ+ˆŒØˆ�r   c                óŽ   • U R                   c  U R                  R                  5         OU R                   (       + U l         SU l        g r°   )r�   r”   rO   r�   r   s    r   rO   Úbaseset.reverse   s1   € Ø�?‰?Ñ"Ø�J‰J×ÑÕ à"&§/¡/Ô1ˆDŒOØˆ�r   c                óv   • SU R                   ;   a  [        U R                  5      $ [        U R                  5      $ )Nr”   )r    r­   r”   r’   r   s    r   rL   Úbaseset.__len__'  s*   € Ø�d—m‘mÓ#Ü�t—z‘z“?Ð"ä�t—y‘y“>Ð!r   c                ód   • [        U 5      S::  a  gU R                  SL=(       a    U R                  $ )zqReturns True if the collection is ascending order, False if not.

This is part of the mandatory API for smartset.r   TN©r­   r�   r   s    r   r'   Úbaseset.isascending-  s*   € ô ˆt‹9˜‹>ØØ�‰ dÐ*×>¨t¯©Ð>r   c                ón   • [        U 5      S::  a  gU R                  SL=(       a    U R                  (       + $ )zrReturns True if the collection is descending order, False if not.

This is part of the mandatory API for smartset.r   TNr·   r   s    r   r*   Úbaseset.isdescending5  s-   € ô ˆt‹9˜‹>ØØ�‰ dÐ*×B°4·?±?Ô/BÐBr   c                ó:   • [        U 5      S::  a  gU R                  $ )zdIs the collection is in topographical order or not.

This is part of the mandatory API for smartset.r   T)r­   r�   r   s    r   r-   Úbaseset.istopo=  s   € ô ˆt‹9˜‹>ØØ�|‰|Ðr   c                ó¨   • U (       aK  U R                   c  U R                  S   $ U R                   (       a  U R                  S   $ U R                  S   $ g )Nr   éÿÿÿÿ©r�   r”   r�   r   s    r   rE   Úbaseset.firstE  sE   € ÞØ�‰Ñ&Ø—z‘z !‘}Ð$Ø——Ø—}‘} QÑ'Ð'à—}‘} RÑ(Ð(Ør   c                ó¨   • U (       aK  U R                   c  U R                  S   $ U R                   (       a  U R                  S   $ U R                  S   $ g )Nr¾   r   r¿   r   s    r   rI   Úbaseset.lastO  sE   € ÞØ�‰Ñ&Ø—z‘z "‘~Ð%Ø——Ø—}‘} RÑ(Ð(à—}‘} QÑ'Ð'Ør   c                óP  >• [        U5      [        L ax  SUR                  ;   ah  SU R                  ;   aX  U R                  bK  [        [	        U R
                  U5      " UR
                  5      U R                  S9nU R                  Ul        U$ [	        [        5       U5      " U5      nU$ )Nr’   )r–   r-   )r   r   r    r�   Úgetattrr’   r�   Úsuper)r   r]   ÚopÚsÚ	__class__s       €r   Ú
_fastsetopÚbaseset._fastsetopY  sˆ   ø€ ô �‹Kœ7Ò"Ø˜%Ÿ.™.Ó(Ø˜$Ÿ-™-Ó'Ø—‘Ñ+äÜ˜TŸY™Y¨Ô+¨E¯J©JÓ7ÀÇÁñˆAð  Ÿ?™?ˆAŒLð ˆô œ› Ô$ UÓ+ˆAØˆr   c                ó&   • U R                  US5      $ )Nr^   ©rÉ   r\   s     r   r^   Úbaseset.__and__i  ó   € Ø�‰˜u iÓ0Ð0r   c                ó&   • U R                  US5      $ )Nri   rÌ   r\   s     r   ri   Úbaseset.__sub__l  rÎ   r   c                óF  • U R                   c   [        U R                  X U R                  S9$ U R                  nU R                   (       d/  [        [        U5      U-
  S5      [        [        U5      U-
  S5      p![        X1U U R                  S9nU R                   Ul         U$ )N)r-   r   )r�   r   r”   r�   r�   rB   r­   )r   ru   rv   r–   rÇ   s        r   rt   Úbaseset._sliceo  s‚   € à�?‰?Ñ"Ü˜4Ÿ:™: eÐ1¸$¿,¹,ÑGÐGà�}‰}ˆØ��Üœc $›i¨$Ñ.°Ó2´C¼¸D»	ÀEÑ8IÈ1Ó4M�4Ü�D˜tÐ$¨T¯\©\Ñ:ˆØ—‘ˆŒØˆr   c                ó  • SSSS.U R                      n[        R                  " U R                  5      nU(       d;  U R                  nU R                   b  U R
                  n[        R                  " U5      nS[        U 5      X4-  $ )Nr   ó   -ó   +©NFTs	   <%s%s %s>)	r�   r	   Ú	buildreprr•   r”   r�   r   Úbytereprr   )r   ÚdrÇ   Úls       r   Ú__repr__Úbaseset.__repr__{  sp   € à˜t¨4Ñ0°·±ÑAˆÜ× Ò  §¡Ó0ˆÞØ—
‘
ˆAð �‰Ñ*Ø—M‘M�Ü×!Ò! !Ó$ˆAØœy¨›°Ð5Ñ5Ð5r   )r�   r•   r�   r”   r’   )r3   NFr…   )"r   r‡   rˆ   r‰   Ú__doc__r—   r   Úpropertycacher’   r�   r”   r$   r9   rA   r!   r   rŠ   rS   rO   rL   r'   r*   r-   rE   rI   rÉ   r^   ri   rt   r   Ú	strmethodrÛ   r‹   Ú__classcell__©rÈ   s   @r   r   r   §   sè   ø† ñ9ôv"ð$ 
×Ññó ðð 
×Ññó ðð
 
×Ññó ðò
+ò#ò'ð 
×Ññ&ó ð&òð €Hôòò"ò?òCòòòõò 1ò1ò
ð ×Ññ6ó ö6r   r   c                  ó¼   • \ rS rSrSrS S4S jrS rS rS r\	S	 5       r
\	S
 5       rS r\rS rSS jrS rS rS rS rS rS r\R.                  S 5       rSrg)ro   iŠ  z”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                ó   • gr†   r3   )r‚   s    r   r6   Úfilteredset.<lambda>�  s   € °4r   Nc                ó(   • Xl         X l        X0l        g)zù
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   Úsubsetrp   rW   s       r   r—   Úfilteredset.__init__�  s   € ð ŒØ#ŒØ!�r   c                óN   • XR                   ;   =(       a    U R                  U5      $ r2   )ræ   rç   ©r   r‚   s     r   r!   Úfilteredset.__contains__›  s   € Ø—L‘LÑ ×7 T§_¡_°QÓ%7Ð7r   c                ó8   • U R                  U R                  5      $ r2   )Ú_iterfilterræ   r   s    r   r$   Úfilteredset.__iter__ž  s   € Ø×Ñ §¡Ó-Ð-r   c              #  ó\   #   • U R                   nU H  nU" U5      (       d  M  Uv •  M     g 7fr2   )rç   )r   r�   Úcondr‚   s       r   rï   Úfilteredset._iterfilter¡  s&   é € Ø�‰ˆÛˆAÙ�A�w‹wØ”ò ùs   ‚,£	,c                óH   ^ ^• T R                   R                  mTc  g UU 4S j$ )Nc                 ó0   >• TR                  T " 5       5      $ r2   ©rï   ©r�   r   s   €€r   r6   Ú%filteredset.fastasc.<locals>.<lambda>¬  ó   ø€ �t×'Ñ'©«Ô-r   )ræ   r9   ©r   r�   s   `@r   r9   Úfilteredset.fastasc§  s    ù€ à�\‰\×!Ñ!ˆØ‰:ØÝ-Ð-r   c                óH   ^ ^• T R                   R                  mTc  g UU 4S j$ )Nc                 ó0   >• TR                  T " 5       5      $ r2   rö   r÷   s   €€r   r6   Ú&filteredset.fastdesc.<locals>.<lambda>³  rù   r   )ræ   rA   rú   s   `@r   rA   Úfilteredset.fastdesc®  s    ù€ à�\‰\×"Ñ"ˆØ‰:ØÝ-Ð-r   c                ó  • S nU R                  5       (       a  U R                  OS U R                  5       (       a  U R                  OS U R                  U R                  /nU H
  nUc  M  Un  O   Ub  U" 5       nOU nU H  n  g   g©NTF)r'   r9   r*   rA   )r   ÚfastÚ
candidatesÚ	candidater�   rf   s         r   r   Úfilteredset.__nonzero__µ  sˆ   € Øˆà ×,Ñ,×.Ñ.ˆD�LŠL°DØ!×.Ñ.×0Ñ0ˆD�MŠM°dØ�L‰LØ�M‰Mð	
ˆ
ó $ˆIØÓ$Ø �Ùñ $ð
 ÑÙ“‰BàˆBãˆAÙñ àr   c                ó<   • [        S U  5       5      n[        U5      $ )Nc              3  ó$   #   • U  H  ov •  M     g 7fr2   r3   )Ú.0rf   s     r   Ú	<genexpr>Ú&filteredset.__len__.<locals>.<genexpr>Ò  s   é € Ð$št˜!”Aštùs   ‚)r   r­   )r   rÚ   s     r   rL   Úfilteredset.__len__Í  s   € ô
 Ñ$™tÓ$Ó$ˆÜ�1‹vˆr   c                ó6   • U R                   R                  US9  g )N©rO   )ræ   rS   rR   s     r   rS   Úfilteredset.sortÕ  s   € Ø�‰×Ñ 'ÐÒ*r   c                ó8   • U R                   R                  5         g r2   )ræ   rO   r   s    r   rO   Úfilteredset.reverseØ  s   € Ø�‰×ÑÕr   c                ó6   • U R                   R                  5       $ r2   )ræ   r'   r   s    r   r'   Úfilteredset.isascendingÛ  s   € Ø�|‰|×'Ñ'Ó)Ð)r   c                ó6   • U R                   R                  5       $ r2   )ræ   r*   r   s    r   r*   Úfilteredset.isdescendingÞ  s   € Ø�|‰|×(Ñ(Ó*Ð*r   c                ó6   • U R                   R                  5       $ r2   )ræ   r-   r   s    r   r-   Úfilteredset.istopoá  s   € Ø�|‰|×"Ñ"Ó$Ð$r   c                ó   • U  H  nUs  $    g r2   r3   rì   s     r   rE   Úfilteredset.firstä  ó   € ÛˆAØŠHñ àr   c                óÎ   • S nU R                  5       (       a  U R                  nO!U R                  5       (       a  U R                  nUb  U" 5        H  nUs  $    g S nU  H  nM     U$ r2   )r'   rA   r*   r9   ©r   r�   r‚   s      r   rI   Úfilteredset.lasté  sg   € ØˆØ×Ñ×ÑØ—‘‰BØ×Ñ× Ñ Ø—‘ˆBØ‰>Ù–T�Ø’ñ ààˆAÛ�Ùñ àˆHr   c                óò   • [         R                  " U R                  5      /n[        R                  " U R
                  5      nU(       a  UR                  U5        S[        U 5      SR                  U5      4-  $ )Ns   <%s %s>s   , )	r   rØ   ræ   r	   r×   rè   r~   r   Újoin)r   ÚxsrÇ   s      r   rÛ   Úfilteredset.__repr__ù  sW   € ä×Ò §¡Ó-Ð.ˆÜ× Ò  §¡Ó0ˆÞØ�I‰I�aŒLØœY t›_¨e¯j©j¸«nÐ=Ñ=Ð=r   )rç   rè   ræ   r…   )r   r‡   rˆ   r‰   rÝ   r—   r!   r$   rï   Úpropertyr9   rA   r   rŠ   rL   rS   rO   r'   r*   r-   rE   rI   r   rß   rÛ   r‹   r3   r   r   ro   ro   Š  s˜   † ññ
 *8À$ô 	"ò8ò.òð ñ.ó ð.ð ñ.ó ð.òð, €Hòô+òò*ò+ò%òò
ð  ×Ññ>ó ó>r   ro   c              #  ó  #   • [         nU (       a  [        nSnSn  Uc  [        U5      nUc  [        U5      nU" XE5      nUv •  XF:X  a  SnXV:X  a  SnM8  ! [         a!    UnUb  Uv •  UnOUb  Uv •  U Sh  v•N     gf = f7f)z�produce an ordered iteration from two iterators with the same order

The ascending is used to indicated the iteration direction.
N)rB   r:   r}   ÚStopIteration)Ú	ascendingÚiter1Úiter2ÚchoiceÚval1Úval2Únr�   s           r   Ú_iterorderedr+    s¡   é € ô
 €FÞÜˆà€DØ€DðàØ‰|Ü˜E“{�Ø‰|Ü˜E“{�Ù�tÓ"ˆAØŠGØ‹yØ�Ø‹yØ�ñ øô ó 	àˆØÑØŠJØ‰BØÑàŠJØ�‹ð	üs.   ‚B›9A Á"A?Á6A9Á7A?Á<BÁ>A?Á?Bc                  óÚ   • \ rS rSrSrSS jrS rS r\r\	R                  S 5       rS rS	 r\S
 5       r\S 5       rS rSS jrS rS rS rS rS rS r\R4                  S 5       rSrg)ra   i&  a'  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                óR   • Xl         X l        S U l        X0l        S U l        S U l        g r2   )Ú_r1Ú_r2Ú_iterr�   Ú_genlistr�   )r   Úrevs1Úrevs2r$  s       r   r—   Úaddset.__init__n  s&   € ØŒØŒØˆŒ
Ø#ŒØˆŒØˆ�r   c                ó,   • [        U R                  5      $ r2   )r­   r”   r   s    r   rL   Úaddset.__len__v  s   € Ü�4—:‘:‹Ðr   c                ód   • [        U R                  5      =(       d    [        U R                  5      $ r2   )r¬   r.  r/  r   s    r   r   Úaddset.__nonzero__y  s   € Ü�D—H‘H‹~×/¤ d§h¡h£Ð/r   c                ón   • U R                   (       d  [        [        U 5      5      U l         U R                   $ r2   )r1  r   r{   r   s    r   r”   Úaddset._list~  s#   € à�}�}Ü#¤D¨£JÓ/ˆDŒMØ�}‰}Ðr   c                ó\  ^ • T R                   c3  T R                  (       a  [        T R                  5      $ U 4S jnU" 5       $ T R                  5         T R                   (       a  SnOSn[	        T U5      nUb  U" 5       $ [	        T R
                  U5      nUc-  [        [        T R
                  T R                   (       + S95      nOU" 5       n[	        T R                  U5      nUc-  [        [        T R                  T R                   (       + S95      nOU" 5       n[        T R                   XE5      $ )am  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.
c               3  ó´   >#   • TR                    H  n U v •  M	     TR                   R                  nTR                   H  n U" U 5      (       a  M  U v •  M     g 7fr2   )r.  r!   r/  )rf   Úinr1r   s     €r   ÚarbitraryordergenÚ*addset.__iter__.<locals>.arbitraryordergen’  sD   øé € ØŸœ�AØ”Gñ "à—x‘x×,Ñ,�ØŸœ�AÙ Ÿ7›7Øœò "ùs   ƒAAÁ	Ar9   rA   r  )	r�   r1  r{   Ú_trysetasclistrÄ   r.  Úsortedr/  r+  )r   r>  Úattrr�   r%  r&  s   `     r   r$   Úaddset.__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Ó:Ð:r   c                óp   • U R                   b)  U R                  c  [        U R                   5      U l        ggg)z9populate the _asclist attribute if possible and necessaryN)r1  r�   rA  r   s    r   r@  Úaddset._trysetasclistµ  s-   € à�=‰=Ñ$¨¯©Ñ)>Ü" 4§=¡=Ó1ˆD�Mð *?Ð$r   c                óä   ^^• U R                  5         U R                  b  U R                  R                  $ U R                  R                  mU R
                  R                  mS TT4;   a  g UU4S j$ )Nc                 ó2   >• [        ST " 5       T" 5       5      $ r†   ©r+  ©r%  r&  s   €€r   r6   Ú addset.fastasc.<locals>.<lambda>Ã  s   ø€ ”| D©%«'±5³7Ô;r   )r@  r�   r$   r.  r9   r/  ©r   r%  r&  s    @@r   r9   Úaddset.fastascº  s\   ù€ à×ÑÔØ�=‰=Ñ$Ø—=‘=×)Ñ)Ð)Ø—‘× Ñ ˆØ—‘× Ñ ˆØ�E˜5�>Ó!ØÝ;Ð;r   c                óä   ^^• U R                  5         U R                  b  U R                  R                  $ U R                  R                  mU R
                  R                  mS TT4;   a  g UU4S j$ )Nc                 ó2   >• [        ST " 5       T" 5       5      $ r°   rH  rI  s   €€r   r6   Ú!addset.fastdesc.<locals>.<lambda>Î  s   ø€ ”| E©5«7±E³GÔ<r   )r@  r�   Ú__reversed__r.  rA   r/  rK  s    @@r   rA   Úaddset.fastdescÅ  s\   ù€ à×ÑÔØ�=‰=Ñ$Ø—=‘=×-Ñ-Ð-Ø—‘×!Ñ!ˆØ—‘×!Ñ!ˆØ�E˜5�>Ó!ØÝ<Ð<r   c                óH   • XR                   ;   =(       d    XR                  ;   $ r2   )r.  r/  rì   s     r   r!   Úaddset.__contains__Ð  s   € Ø—H‘H‰}×- §X¡X¡Ð-r   c                ó   • U(       + U l         g)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©r�   rR   s     r   rS   Úaddset.sortÓ  s   € ð &œ+ˆ�r   c                óD   • U R                   S L=(       a    U R                   $ r2   rU  r   s    r   r'   Úaddset.isascendingÛ  s   € Ø�‰ dÐ*×>¨t¯©Ð>r   c                óN   • U R                   S L=(       a    U R                   (       + $ r2   rU  r   s    r   r*   Úaddset.isdescendingÞ  s   € Ø�‰ dÐ*×B°4·?±?Ô/BÐBr   c                ó   • gr°   r3   r   s    r   r-   Úaddset.istopoá  ó   € ð r   c                ó€   • U R                   c  U R                  R                  5         g U R                   (       + U l         g r2   )r�   r”   rO   r   s    r   rO   Úaddset.reverseç  s*   € Ø�?‰?Ñ"Ø�J‰J×ÑÕ à"&§/¡/Ô1ˆD�Or   c                ó   • U  H  nUs  $    g r2   r3   rì   s     r   rE   Úaddset.firstí  r  r   c                óf   • U R                  5         U R                  5       nU R                  5         U$ r2   )rO   rE   )r   Úvals     r   rI   Úaddset.lastò  s$   € Ø�‰ŒØ�j‰j‹lˆØ�‰ŒØˆ
r   c                ór   • SSSS.U R                      nS[        U 5      XR                  U R                  4-  $ )Nr   rÔ   rÕ   rÖ   s   <%s%s %r, %r>)r�   r   r.  r/  ©r   rÙ   s     r   rÛ   Úaddset.__repr__ø  s5   € à˜t¨4Ñ0°·±ÑAˆØ¤9¨T£?°A·x±xÀÇÁÐ"JÑJÐJr   )r�   r�   r1  r0  r.  r/  r2   r…   )r   r‡   rˆ   r‰   rÝ   r—   rL   r   rŠ   r   rÞ   r”   r$   r@  r!  r9   rA   r!   rS   r'   r*   r-   rO   rE   rI   r   rß   rÛ   r‹   r3   r   r   ra   ra   &  s¯   † ñEôNòò0ð €Hà	×Ññó ðò
/;òb2ð
 ñ<ó ð<ð ñ=ó ð=ò.ô&ò?òCòò2òò
ð ×ÑñKó óKr   ra   c                  ó´   ^ • \ rS rSrSrSU 4S jjrSS jrS r\rS r	S r
S rS	 rS
 rSS jrS rS rS rS rS rS r\R,                  S 5       rSrU =r$ )Úgeneratorsetiþ  a€  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                óV   >• Uc  U nOU(       a  [         nO[        n[        TU ]  U5      $ r2   )Ú_generatorsetascÚ_generatorsetdescrÅ   Ú__new__)ÚclsÚgenÚiterascÚtyprÈ   s       €r   rm  Úgeneratorset.__new__  s)   ø€ Ø‰?Ø‰CÞÜ"‰Cä#ˆCä‰w‰˜sÓ#Ð#r   c                óV   • Xl         SU l        0 U l        / U l        SU l        SU l        g)z=
gen: a generator producing the values for the generatorset.
NFT)Ú_genr�   Ú_cacher1  Ú	_finishedr�   )r   ro  rp  s      r   r—   Úgeneratorset.__init__  s,   € ð Œ	ØˆŒØˆŒØˆŒØˆŒØˆ�r   c                óV   • U R                   (       a  gU R                  5        H  n  g   gr  )r1  Ú_consumegen©r   rf   s     r   r   Úgeneratorset.__nonzero__!  s'   € ð �=�=ØØ×!Ñ!Ö#ˆAÙñ $àr   c                óš   • XR                   ;   a  U R                   U   $ U R                  5        H
  nX!:X  d  M
    g   SU R                   U'   gr  ©ru  ry  ©r   r‚   rÚ   s      r   r!   Úgeneratorset.__contains__-  sI   € Ø—‘ÓØ—;‘;˜q‘>Ð!ð ×!Ñ!Ö#ˆAØ�vÙñ $ð ˆ�‰�A‰Ør   c                ó®   • U R                   (       a  U R                  nOU R                  nUb  U" 5       $ U R                  5        H  nM     [	        U 5      $ r2   )r�   r9   rA   ry  r{   r  s      r   r$   Úgeneratorset.__iter__9  sI   € Ø�?�?Ø—‘‰Bà—‘ˆBØ‰>Ù“4ˆKà×!Ñ!Ö#ˆAÙñ $ô �D‹zÐr   c                óÈ   ^^^^• U R                   (       a  [        U R                  5      $ U R                  mU R                  5       m[        [
        smmUUUU4S jnU" 5       $ )Nc               3  ó~   >#   • Sn  U T" T5      :  a  TU    v •  O T" T5      v •  U S-  n M&  ! [          a     g f = f7f©Nr   r   )r#  )ÚiÚ_lenÚ_nextÚgenlistÚnextgens    €€€€r   ro  Ú#generatorset._iterator.<locals>.genT  sV   øé € ØˆAØØ‘t˜G“}Ó$Ø! !™*Ó$ðÙ# G›nÒ,ð �Q‘�ñ øô )ó Ùðüs   ƒ=œ
- ¦=­
:·=¹:º=)rv  r{   r1  ry  r­   r}   )r   ro  r†  r‡  rˆ  r‰  s     @@@@r   Ú	_iteratorÚgeneratorset._iteratorF  sP   û€ Ø�>�>Ü˜Ÿ™Ó&Ð&ð —-‘-ˆØ×"Ñ"Ó$ˆÜœ4ˆˆˆe÷
	ð 
	ñ ‹uˆr   c              #  óV  #   • U R                   nU R                  R                  nU R                   H  nSX'   U" U5        Uv •  M     U R                  (       dO  SU l        U R                  S S  nUR                  5         X@l        UR                  U l        UR                  U l
        g g 7fr†   )ru  r1  r~   rt  rv  rS   r�   r$   r9   rP  rA   )r   rX   rˆ  ÚitemÚascs        r   ry  Úgeneratorset._consumegenb  s‡   é € Ø—‘ˆØ—-‘-×&Ñ&ˆØ—I”IˆDØˆE‰KÙ�DŒMØŒJñ ð �~�~Ø!ˆDŒNØ—-‘-¡Ð"ˆCØ�H‰HŒJØŒMØŸ<™<ˆDŒLØ×,Ñ,ˆD�Mð ùs   ‚B'B)c                óZ   • U R                  5        H  nM     [        U R                  5      $ r2   )ry  r­   r1  rì   s     r   rL   Úgeneratorset.__len__q  s'   € Ø×!Ñ!Ö#ˆAÙñ $ä�4—=‘=Ó!Ð!r   c                ó   • U(       + U l         g r2   rU  rR   s     r   rS   Úgeneratorset.sortv  ó   € Ø%œ+ˆ�r   c                ó0   • U R                   (       + U l         g r2   rU  r   s    r   rO   Úgeneratorset.reversey  ó   € Ø"Ÿo™oÔ-ˆ�r   c                ó   • U R                   $ r2   rU  r   s    r   r'   Úgeneratorset.isascending|  ó   € Ø�‰Ðr   c                ó$   • U R                   (       + $ r2   rU  r   s    r   r*   Úgeneratorset.isdescending  ó   € Ø—?‘?Ô"Ð"r   c                ó   • gr°   r3   r   s    r   r-   Úgeneratorset.istopo‚  r]  r   c                óÌ   • U R                   (       a  U R                  nOU R                  nUc'  U R                  5        H  nM     U R	                  5       $ [        U" 5       S 5      $ r2   )r�   r9   rA   ry  rE   r}   r  s      r   rE   Úgeneratorset.firstˆ  sQ   € Ø�?�?Ø—‘‰Bà—‘ˆBØ‰:à×%Ñ%Ö'�Ùñ (à—:‘:“<ÐÜ‘B“D˜$ÓÐr   c                óÌ   • U R                   (       a  U R                  nOU R                  nUc'  U R                  5        H  nM     U R	                  5       $ [        U" 5       S 5      $ r2   )r�   rA   r9   ry  rI   r}   r  s      r   rI   Úgeneratorset.last”  sQ   € Ø�?�?Ø—‘‰Bà—‘ˆBØ‰:à×%Ñ%Ö'�Ùñ (à—9‘9“;ÐÜ‘B“D˜$ÓÐr   c                óF   • SSS.U R                      nS[        U 5      U4-  $ )NrÔ   rÕ   ©FTs   <%s%s>)r�   r   rf  s     r   rÛ   Úgeneratorset.__repr__   s)   € à Ñ% d§o¡oÑ6ˆØœI d›O¨QÐ/Ñ/Ð/r   )r�   r�   ru  rv  rt  r1  r9   rA   r2   r…   )r   r‡   rˆ   r‰   rÝ   rm  r—   r   rŠ   r!   r$   r‹  ry  rL   rS   rO   r'   r*   r-   rE   rI   r   rß   rÛ   r‹   rà   rá   s   @r   ri  ri  þ  st   ø† ñ÷$ô	òð €Hò
òòò8-ò"ô
&ò.òò#òò
 ò
 ð ×Ññ0ó ö0r   ri  c                  ó6   • \ rS rSrSr\R                  rS rSr	g)rk  i¦  z@Special case of generatorset optimized for ascending generators.c                ó¨   • XR                   ;   a  U R                   U   $ U R                  5        H  nX!:X  a    gX!:”  d  M    O   SU R                   U'   gr  r}  r~  s      r   r!   Ú_generatorsetasc.__contains__«  óQ   € Ø—‘ÓØ—;‘;˜q‘>Ð!ð ×!Ñ!Ö#ˆAØ‹vÙØ�uÙñ	 $ð ˆ�‰�A‰Ør   r3   N)
r   r‡   rˆ   r‰   rÝ   ri  r‹  r9   r!   r‹   r3   r   r   rk  rk  ¦  s   † ÙJà×$Ñ$€Gõr   rk  c                  ó6   • \ rS rSrSr\R                  rS rSr	g)rl  iº  zASpecial case of generatorset optimized for descending generators.c                ó¨   • XR                   ;   a  U R                   U   $ U R                  5        H  nX!:X  a    gX!:  d  M    O   SU R                   U'   gr  r}  r~  s      r   r!   Ú_generatorsetdesc.__contains__¿  r«  r   r3   N)
r   r‡   rˆ   r‰   rÝ   ri  r‹  rA   r!   r‹   r3   r   r   rl  rl  º  s   † ÙKà×%Ñ%€Hõr   rl  Nc                ó†   • Uc  [        U 5      nX:*  nU(       d	  US-   US-   p![        XX0R                  R                  5      $ )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)Úreporu   Úendr$  s       r   Úspansetrµ  Î  sB   € ð �{Ü�$‹iˆØ‘€IÞØ˜1‘W˜e a™iˆsÜ�E 	¯>©>×+FÑ+FÓGÐGr   c                  ó²   ^ • \ rS rSrSrS rSS jrS rS rS r	S r
S	 rS
 rS rS r\rS rS rS rS rS rU 4S jr\R.                  S 5       rSrU =r$ )r°  iÞ  aC  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                ó4   • Xl         X l        X0l        X@l        g r2   )Ú_startÚ_endr�   Ú_hiddenrevs)r   ru   r´  r$  Ú
hiddenrevss        r   r—   Ú_spanset.__init__é  s   € ØŒØŒ	Ø#ŒØ%Õr   c                ó   • U(       + U l         g r2   rU  rR   s     r   rS   Ú_spanset.sortï  r•  r   c                ó0   • U R                   (       + U l         g r2   rU  r   s    r   rO   Ú_spanset.reverseò  r˜  r   c                ó   • gr°   r3   r   s    r   r-   Ú_spanset.istopoõ  r]  r   c              #  óL   #   • U R                   nU H  nX2;  d  M
  Uv •  M     g 7fr2   )rº  )r   Ú	iterrangerÇ   rf   s       r   rï   Ú_spanset._iterfilterû  s$   é € Ø×ÑˆÛˆAØ�zØ”ò ùs   ‚$›	$c                ód   • U R                   (       a  U R                  5       $ U R                  5       $ r2   ©r�   r9   rA   r   s    r   r$   Ú_spanset.__iter__  s!   € Ø�?�?Ø—<‘<“>Ð!à—=‘=“?Ð"r   c                óœ   • [        U R                  U R                  5      nU R                  (       a  U R	                  U5      $ [        U5      $ r2   )r|   r¸  r¹  rº  rï   r{   ©r   rÄ  s     r   r9   Ú_spanset.fastasc  s:   € Ü˜$Ÿ+™+ t§y¡yÓ1ˆ	Ø××Ø×#Ñ# IÓ.Ð.Ü�I‹Ðr   c                óª   • [        U R                  S-
  U R                  S-
  S5      nU R                  (       a  U R	                  U5      $ [        U5      $ )Nr   r¾   )r|   r¹  r¸  rº  rï   r{   rÊ  s     r   rA   Ú_spanset.fastdesc  sD   € Ü˜$Ÿ)™) a™-¨¯©°q©¸"Ó=ˆ	Ø××Ø×#Ñ# IÓ.Ð.Ü�I‹Ðr   c                óž   • U R                   nU R                  Us=:*  =(       a    U R                  :  Os  =(       a    U=(       a    X;   (       + $ r2   )rº  r¸  r¹  )r   r    Úhiddens      r   r!   Ú_spanset.__contains__  s>   € Ø×!Ñ!ˆØ—‘˜s×.Ó. T§Y¡YÔ.÷ 
Ø×$�s‘}ô5
ð 	
r   c                ó   • U  H  n  g   gr  r3   rz  s     r   r   Ú_spanset.__nonzero__  s   € ÛˆAÙñ àr   c                óV  • U R                   (       d"  [        U R                  U R                  -
  5      $ SnU R                  nU R                  nU R                    H(  nX4s=:  a  U::  d  O  X$s=::  a  U:  d  M  O  M#  US-  nM*     [        U R                  U R                  -
  5      U-
  $ r„  )rº  Úabsr¹  r¸  )r   Úcountru   r´  r    s        r   rL   Ú_spanset.__len__   sŠ   € Ø××Ü�t—y‘y 4§;¡;Ñ.Ó/Ð/àˆEØ—K‘KˆEØ—)‘)ˆCØ×'Ô'�ØÕ& Õ&¨EÕ,>¸3×,>Ñ,>Ø˜Q‘J’Eñ (ô �t—y‘y 4§;¡;Ñ.Ó/°%Ñ7Ð7r   c                ó   • U R                   $ r2   rU  r   s    r   r'   Ú_spanset.isascending,  r›  r   c                ó$   • U R                   (       + $ r2   rU  r   s    r   r*   Ú_spanset.isdescending/  rž  r   c                óx   • U R                   (       a  U R                  nOU R                  nU" 5        H  nUs  $    g r2   rÇ  r  s      r   rE   Ú_spanset.first2  s/   € Ø�?�?Ø—‘‰Bà—‘ˆBÙ–ˆAØŠHñ àr   c                óx   • U R                   (       a  U R                  nOU R                  nU" 5        H  nUs  $    g r2   )r�   rA   r9   r  s      r   rI   Ú_spanset.last;  s/   € Ø�?�?Ø—‘‰Bà—‘ˆBÙ–ˆAØŠHñ àr   c                óÂ  >• U R                   (       a  [        TU ]	  X5      $ U R                  (       aG  [	        U R
                  U-   U R                  5      n[	        U R
                  U-   U R                  5      nOF[        U R                  U-
  U R
                  5      n[        U R                  U-
  U R
                  5      n[        X4U R                  U R                   5      $ r2   )	rº  rÅ   rt   r�   r:   r¸  r¹  rB   r°  )r   ru   rv   r‚   rƒ   rÈ   s        €r   rt   Ú_spanset._sliceD  sŸ   ø€ Ø××ä‘7‘> %Ó.Ð.Ø�?�?Ü�D—K‘K %Ñ'¨¯©Ó3ˆAÜ�D—K‘K $Ñ&¨¯	©	Ó2‰Aä�D—I‘I Ñ$ d§k¡kÓ2ˆAÜ�D—I‘I Ñ% t§{¡{Ó3ˆAÜ˜˜dŸo™o¨t×/?Ñ/?Ó@Ð@r   c                óp   • SSS.U R                      nS[        U 5      XR                  U R                  4-  $ )NrÔ   rÕ   r¦  s   <%s%s %d:%d>)r�   r   r¸  r¹  rf  s     r   rÛ   Ú_spanset.__repr__P  s3   € à Ñ% d§o¡oÑ6ˆØ¤)¨D£/°1·k±kÀ4Ç9Á9Ð!MÑMÐMr   )r�   r¹  rº  r¸  r…   )r   r‡   rˆ   r‰   rÝ   r—   rS   rO   r-   rï   r$   r9   rA   r!   r   rŠ   rL   r'   r*   rE   rI   rt   r   rß   rÛ   r‹   rà   rá   s   @r   r°  r°  Þ  s|   ø† ñò&ô&ò.òòò#òòò
òð
 €Hò
8òò#òòõ
Að ×ÑñNó öNr   r°  c                  ó2   ^ • \ rS rSrSrU 4S jrS rSrU =r$ )rZ   iV  z‘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                ód   >• [         TU ]  S[        U5      SUR                  R                  5        g )Nr   T)rÅ   r—   r­   r±  r²  )r   r³  rÈ   s     €r   r—   Úfullreposet.__init__]  s$   ø€ Ü‰Ñ˜œC ›I t¨T¯^©^×-HÑ-HÕIr   c                ó¶   • [        US5      (       d  [        U5      nU R                  (       a  XR                  -
  nUR                  U R	                  5       S9  U$ )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  )rm   r   rº  rS   r*   r\   s     r   r^   Úfullreposet.__and__`  sO   € ô �u˜m×,Ñ,ô ˜E“NˆEà××Ø×,Ñ,Ñ,ˆEà�
‰
˜4×,Ñ,Ó.ˆ
Ñ/Øˆr   r3   )	r   r‡   rˆ   r‰   rÝ   r—   r^   r‹   rà   rá   s   @r   rZ   rZ   V  s   ø† ñõJ÷ð r   rZ   )r   N)Ú
__future__r   Ú r   r   r   r   Úutilsr	   r   r   r   ro   r+  ra   ri  rk  rl  rµ  r°  rZ   r3   r   r   Ú<module>rë     s±   ðõ #÷ó õ ò<÷MLñ MLô``6Ðô `6ôFu>Ð"ô u>òp!ôHUKÐô UKôpe0Ð#ô e0ôP�|ô ô(˜ô ô(Hô uNÐô uNôp�(õ r   