HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //proc/self/root/proc/thread-self/root/lib64/python2.7/site-packages/mercurial/smartset.pyc
�
1�3\c@@s-ddlmZddlmZmZmZmZddlmZd�Z	de
fd��YZdefd	��YZd
efd��YZ
d�Zd
efd��YZdefd��YZdefd��YZdefd��YZddd�Zdefd��YZdefd��YZdS(i(tabsolute_importi(tencodingterrortpycompattutil(t
stringutilcC@stjt|�j�jd�S(Nt_(Rtsysbytesttypet__name__tlstrip(to((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt	_typenamestabstractsmartsetcB@s�eZd�ZeZd�Zd�ZdZdZd�Z	d�Z
d�Zd�Zd�Z
d�Zd	�Zd
�Zd�Zed�Zd
�Zd�Zd�Zded�Zd�Zd�ZRS(cC@s
t��dS(s!True if the smartset is not emptyN(tNotImplementedError(tself((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt__nonzero__scC@s
t��dS(sprovide fast membership testingN(R(Rtrev((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt__contains__scC@s
t��dS(s:iterate the set in the order it is supposed to be iteratedN(R(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt__iter__#scC@s
t��dS(s/True if the set will iterate in ascending orderN(R(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pytisascending/scC@s
t��dS(s0True if the set will iterate in descending orderN(R(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pytisdescending3scC@s
t��dS(s3True if the set will iterate in topographical orderN(R(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pytistopo7sc@sX|jdkrt|��n$x!|j�D]�Pq+Wtd���fd�|_�S(s%return the minimum element in the setsarg is an empty sequencec@s�S(N(((tv(s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt<lambda>DtN(tfastasctNonetmint
ValueError(R((Rs8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR;sc@sS|jdkrt|�Sx!|j�D]�Pq&Wtd���fd�|_�S(s%return the maximum element in the setsarg is an empty sequencec@s�S(N(((R(s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRPRN(tfastdescRtmaxR(R((Rs8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRGs
cC@s
t��dS(sireturn the first element in the set (user iteration perspective)

        Return None if the set is emptyN(R(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pytfirstSscC@s
t��dS(shreturn the last element in the set (user iteration perspective)

        Return None if the set is emptyN(R(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pytlastYscC@s
t��dS(skreturn the length of the smartsets

        This can be expensive on smartset that could be lazy otherwise.N(R(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt__len___scC@s
t��dS(s$reverse the expected iteration orderN(R(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pytreverseescC@s
t��dS(s:get the set to iterate in an ascending or descending orderN(R(RR#((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pytsortiscC@s/t|t�r|S|j|jd|dt�S(s{Returns a new object with the intersection of the two collections.

        This is part of the mandatory API for smartset.tcondreprtcache(t
isinstancetfullreposettfilterRtFalse(Rtother((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt__and__mscC@s
t||�S(stReturns a new object with the union of the two collections.

        This is part of the mandatory API for smartset.(taddset(RR+((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt__add__usc@s1|j�|j�fd�dd|fdt�S(s{Returns a new object with the substraction of the two collections.

        This is part of the mandatory API for smartset.c@s�|�S(N((tr(tc(s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�RR%s<not %r>R&(RR)R*(RR+((R0s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt__sub__{s	!cC@s:|r*tj|d�r*tj|�}nt|||�S(s1Returns 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.t__code__(Rtsafehasattrt	cachefunctfilteredset(Rt	conditionR%R&((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR)�s	cC@s:|dks|dkr*tjd��n|j||�S(sAReturn new smartset that contains selected elements from this setisnegative index not allowed(RtProgrammingErrort_slice(Rtstarttstop((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pytslice�scC@s�g}t|�}x6tj|�D]%}t|d�}|dkr"Pq"q"WxGtj||�D]2}t|d�}|dkr�Pn|j|�q_Wt|dd|||f�S(Ntdatareprsslice=%d:%d %r(titerRtxrangetnextRtappendtbaseset(RR9R:tystittxty((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR8�sN(R	t
__module__Rt__bool__RRRRRRRRRRR R!R"R#R*R$R,R.R1tTrueR)R;R8(((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR
s,																
	RAcB@seZdZdded�Zejd��Zejd��Z	ejd��Z
d�Zd�Zd�Z
ejd��Zd	�ZeZed
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zejd��ZRS(s�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
    cC@sjd|_||_t|t�r6||_t|_n't|t�sTt|�}n||_||_	dS(s�
        datarepr: a tuple of (format, obj, ...), a function or an object that
                  provides a printable representation of the given data.
        N(
Rt
_ascendingt_istopoR'tsett_setRHtlistt_listt	_datarepr(RtdataR<R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt__init__�s				cC@s
t|j�S(N(RKRN(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRL�scC@s|j}|j�|S(N(RNR$(Rtasclist((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt_asclist�s

cC@s"d|jkst�t|j�S(NRL(t__dict__tAssertionErrorRMRL(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRN�scC@sC|jdkrt|j�S|jr2t|j�St|j�SdS(N(RIRR=RNRStreversed(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRs

	
cC@s
t|j�S(N(R=RS(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRscC@s
t|j�S(N(RVRS(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRscC@s
|jjS(N(RLR(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRscC@stt|��S(N(tbooltlen(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRscC@st|�|_t|_dS(N(RWRIR*RJ(RR#((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR$scC@s9|jdkr|jj�n
|j|_t|_dS(N(RIRRNR#R*RJ(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR#s
cC@s-d|jkrt|j�St|j�SdS(NRN(RTRXRNRL(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR"%s
cC@s,t|�dkrtS|jdk	o+|jS(syReturns True if the collection is ascending order, False if not.

        This is part of the mandatory API for smartset.iN(RXRHRIR(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR+scC@s-t|�dkrtS|jdk	o,|jS(szReturns True if the collection is descending order, False if not.

        This is part of the mandatory API for smartset.iN(RXRHRIR(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR3scC@st|�dkrtS|jS(slIs the collection is in topographical order or not.

        This is part of the mandatory API for smartset.i(RXRHRJ(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR;scC@sF|rB|jdkr |jdS|jr4|jdS|jdSndS(Nii����(RIRRNRS(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR Cs	cC@sF|rB|jdkr |jdS|jr4|jdS|jdSndS(Ni����i(RIRRNRS(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR!Ms	cC@s�t|�tkr{d|jkr{d|jkr{|jdk	r{tdt|j|�|j�d|j�}|j|_nttt|�|�|�}|S(NRLRPR(	RRARTRIRtgetattrRLRJtsuper(RR+topts((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt
_fastsetopWs$!cC@s|j|d�S(NR,(R](RR+((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR,bscC@s|j|d�S(NR1(R](RR+((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR1escC@s�|jdkr,t|j||!d|j�S|j}|jsttt|�|d�tt|�|d�}}nt|||!d|j�}|j|_|S(NRi(RIRRARNRJRSRRX(RR9R:RPR\((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR8hs		6cC@s�idd6dt6dt6|j}tj|j�}|sp|j}|jdk	r^|j}nt	j
|�}ndt|�||fS(NRt-t+s	<%s%s %s>(RR*RHRIRt	buildreprRORNRSRtbytereprR(RtdR\tl((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt__repr__ts"	(N( R	RFt__doc__RR*RQRt
propertycacheRLRSRNRRRRRRGR$R#R"RRRR R!R]R,R1R8Rt	strmethodRd(((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRA�s0:										
	
				R5cB@s�eZdZd�dd�Zd�Zd�Zd�Zed��Z	ed��Z
d�ZeZd	�Z
ed
�Zd�Zd�Zd
�Zd�Zd�Zd�Zejd��ZRS(s�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
    cC@stS(N(RH(RD((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�RcC@s||_||_||_dS(s!
        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(t_subsett
_conditiont	_condrepr(RtsubsetR6R%((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRQ�s		cC@s||jko|j|�S(N(RhRi(RRD((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�scC@s|j|j�S(N(t_iterfilterRh(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�scc@s2|j}x"|D]}||�r|VqqWdS(N(Ri(RRCtcondRD((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRl�s	
c@s,�jj��dkrdS��fd�S(Nc@s�j���S(N(Rl((RCR(s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�R(RhRR(R((RCRs8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�sc@s,�jj��dkrdS��fd�S(Nc@s�j���S(N(Rl((RCR(s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�R(RhRR(R((RCRs8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�scC@s�d}|j�r|jnd|j�r3|jnd|j|jg}x$|D]}|dk	rO|}PqOqOW|dk	r�|�}n|}x|D]}tSWtS(N(RRRRRRHR*(Rtfastt
candidatest	candidateRCR/((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�s

cC@s td�|D��}t|�S(Ncs@s|]}|VqdS(N((t.0R/((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pys	<genexpr>�s(RARX(RRc((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR"�scC@s|jjd|�dS(NR#(RhR$(RR#((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR$�scC@s|jj�dS(N(RhR#(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR#�scC@s
|jj�S(N(RhR(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�scC@s
|jj�S(N(RhR(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�scC@s
|jj�S(N(RhR(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�scC@sx|D]}|SWdS(N(R(RRD((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR �s
cC@szd}|j�r|j}n|j�r6|j}n|dk	r[x|�D]}|SWdSd}x|D]}qhW|SdS(N(RRRRR(RRCRD((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR!�s
cC@sZtj|j�g}tj|j�}|r=|j|�ndt|�dj|�fS(Ns<%s %s>s, (	RRaRhRR`RjR@Rtjoin(RtxsR\((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRd�s
N(R	RFReRRQRRRltpropertyRRRRGR"R*R$R#RRRR R!RRgRd(((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR5�s$											c	c@st}|rt}nd}d}y�x~tr�|dkrHt|�}n|dkrct|�}n|||�}|V||kr�d}n||kr'd}q'q'WWn[tk
r|}|dk	r�|V|}n|dk	r�|Vnx|D]}|Vq�WnXdS(s�produce an ordered iteration from two iterators with the same order

    The ascending is used to indicated the iteration direction.
    N(RRRRHR?t
StopIteration(	t	ascendingtiter1titer2tchoicetval1tval2tnRCtval((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt_iterordered�s4			
	
R-cB@s�eZdZdd�Zd�Zd�ZeZej	d��Z
d�Zd�Ze
d��Ze
d��Zd	�Zed
�Zd�Zd�Zd
�Zd�Zd�Zd�Zejd��ZRS(s	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]
    cC@s:||_||_d|_||_d|_d|_dS(N(t_r1t_r2Rt_iterRIt_genlistRS(Rtrevs1trevs2Rv((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRQas					cC@s
t|j�S(N(RXRN(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR"iscC@st|j�pt|j�S(N(RWRR�(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRlscC@s(|js!tt|��|_n|jS(N(R�RAR=(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRNqs	c@s$�jdkr;�jr%t�j�S�fd�}|�S�j��jrWd}nd}t�|�}|dk	r|�St�j|�}|dkr�tt�jd�j��}n	|�}t�j|�}|dkrtt�jd�j��}n	|�}t	�j||�S(s�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@sQx�jD]}|Vq
W�jj}x%�jD]}||�s/|Vq/q/WdS(N(RRR�(R/tinr1(R(s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pytarbitraryordergen�s	RRR#N(
RIRR�R=t_trysetasclistRYRtsortedR�R~(RR�tattrRCRwRx((Rs8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRws*
	

		"	"	cC@s7|jdk	r3|jdkr3t|j�|_ndS(s9populate the _asclist attribute if possible and necessaryN(R�RRSR�(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR��sc@sa|j�|jdk	r#|jjS|jj�|jj�d��fkrQdS��fd�S(Nc@stt�����S(N(R~RH((RwRx(s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�R(R�RSRRRRR�(R((RwRxs8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�s

c@sa|j�|jdk	r#|jjS|jj�|jj�d��fkrQdS��fd�S(Nc@stt�����S(N(R~R*((RwRx(s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�R(R�RSRt__reversed__RRR�(R((RwRxs8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�s

cC@s||jkp||jkS(N(RR�(RRD((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�scC@s||_dS(s�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(RI(RR#((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR$�scC@s|jdk	o|jS(N(RIR(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�scC@s|jdk	o|jS(N(RIR(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�scC@stS(N(R*(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�scC@s0|jdkr|jj�n
|j|_dS(N(RIRRNR#(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR#�scC@sx|D]}|SWdS(N(R(RRD((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR �s
cC@s$|j�|j�}|j�|S(N(R#R (RR}((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR!�s

cC@sBidd6dt6dt6|j}dt|�||j|jfS(NRR^R_s
<%s%s %r, %r>(RR*RHRIRRR�(RRb((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRd�s"N(R	RFReRRQR"RRGRRfRNRR�RtRRRR*R$RRRR#R R!RRgRd(((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR-s&F			/								tgeneratorsetcB@s�eZdZdd�Zdd�Zd�ZeZd�Zd�Z	d�Z
d�Zd�Ze
d	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zejd��ZRS(s�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
    cC@s@|dkr|}n|r$t}nt}tt|�j|�S(N(Rt_generatorsetasct_generatorsetdescRZR�t__new__(tclstgentiterascttyp((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR��s		cC@s:||_d|_i|_g|_t|_t|_dS(sM
        gen: a generator producing the values for the generatorset.
        N(	t_genRRSt_cacheR�R*t	_finishedRHRI(RR�R�((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRQs					cC@s)|jr
tSx|j�D]}tSWtS(N(R�RHt_consumegenR*(RR/((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRs
	cC@sR||jkr|j|Sx$|j�D]}||kr'tSq'Wt|j|<tS(N(R�R�RHR*(RRDRc((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRs
cC@sR|jr|j}n	|j}|dk	r1|�Sx|j�D]}q>Wt|�S(N(RIRRRR�R=(RRCRD((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR(s		c@sW|jrt|j�S|j�|j��tt������fd�}|�S(Nc3@scd}xVtr^|���kr-�|Vn$y���VWntk
rPdSX|d7}q	WdS(Nii(RHRu(ti(t_lent_nexttgenlisttnextgen(s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�Bs	
(R�R=R�R�RXR?(RR�((R�R�R�R�s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt	_iterator5s	
	
cc@s�|j}|jj}x*|jD]}t||<||�|VqW|js�t|_|j}|j�||_|j|_	|j
|_ndS(N(R�R�R@R�RHR�R$RSRRR�R(RR&R�titemtasc((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�Os	

			

	cC@s$x|j�D]}q
Wt|j�S(N(R�RXR�(RRD((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR"^scC@s||_dS(N(RI(RR#((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR$cscC@s|j|_dS(N(RI(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR#fscC@s|jS(N(RI(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRiscC@s|jS(N(RI(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRlscC@stS(N(R*(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRoscC@s[|jr|j}n	|j}|dkrKx|j�D]}q7W|j�St|�d�S(N(RIRRRR�R R?(RRCRD((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR us		
cC@s[|jr|j}n	|j}|dkrKx|j�D]}q7W|j�St|�d�S(N(RIRRRR�R!R?(RRCRD((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR!�s		
cC@s/idt6dt6|j}dt|�|fS(NR^R_s<%s%s>(R*RHRIR(RRb((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRd�sN(R	RFReRR�RQRRGRRR�R�R"R*R$R#RRRR R!RRgRd(((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR��s$
	
		
									R�cB@s eZdZejZd�ZRS(s@Special case of generatorset optimized for ascending generators.cC@sb||jkr|j|Sx4|j�D]&}||kr=tS||kr'Pq'q'Wt|j|<tS(N(R�R�RHR*(RRDRc((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�s
(R	RFReR�R�RR(((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR��s	R�cB@s eZdZejZd�ZRS(sASpecial case of generatorset optimized for descending generators.cC@sb||jkr|j|Sx4|j�D]&}||kr=tS||kr'Pq'q'Wt|j|<tS(N(R�R�RHR*(RRDRc((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�s
(R	RFReR�R�RR(((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR��s	cC@s^|dkrt|�}n||k}|sE|d|d}}nt||||jj�S(s�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`.
    iN(RRXt_spansett	changelogtfilteredrevs(trepoR9tendRv((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pytspanset�sR�cB@s�eZdZd�Zed�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
e
Zd�Zd�Zd
�Zd�Zd�Zd�Zejd��ZRS(s\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 xrange(x, y) except for two
    notable points:
    - when x < y it will be automatically descending,
    - revision filtered with this repoview will be skipped.

    cC@s(||_||_||_||_dS(N(t_startt_endRIt_hiddenrevs(RR9R�Rvt
hiddenrevs((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRQ�s			cC@s||_dS(N(RI(RR#((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR$�scC@s|j|_dS(N(RI(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR#�scC@stS(N(R*(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�scc@s2|j}x"|D]}||kr|VqqWdS(N(R�(Rt	iterrangeR\R/((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRl�s	
cC@s!|jr|j�S|j�SdS(N(RIRR(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�s	
cC@s8tj|j|j�}|jr.|j|�St|�S(N(RR>R�R�R�RlR=(RR�((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�s	
cC@sCtj|jd|jdd�}|jr9|j|�St|�S(Nii����(RR>R�R�R�RlR=(RR�((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�s#	
cC@s<|j}|j|ko&|jkno;|o:||kS(N(R�R�R�(RRthidden((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR�s	"cC@sx|D]}tSWtS(N(RHR*(RR/((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRs
cC@s�|jst|j|j�Sd}|j}|j}xV|jD]K}||ko\|kns}||kox|knr?|d7}q?q?Wt|j|j�|SdS(Nii(R�tabsR�R�(RtcountR9R�R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR"s			8cC@s|jS(N(RI(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRscC@s|jS(N(RI(R((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRscC@s7|jr|j}n	|j}x|�D]}|SWdS(N(RIRRR(RRCRD((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR s		cC@s7|jr|j}n	|j}x|�D]}|SWdS(N(RIRRR(RRCRD((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR!"s		cC@s�|jr"tt|�j||�S|jr`t|j||j�}t|j||j�}n2t|j||j�}t|j||j�}t|||j|j�S(N(	R�RZR�R8RIRR�R�R(RR9R:RDRE((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR8+s		cC@s;idt6dt6|j}dt|�||j|jfS(NR^R_s<%s%s %d:%d>(R*RHRIRR�R�(RRb((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRd7s(R	RFReRQR*R$R#RRlRRRRRRGR"RRR R!R8RRgRd(((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR��s&																		R(cB@s eZdZd�Zd�ZRS(s�a set containing all revisions in the repo

    This class exists to host special optimization and magic to handle virtual
    revisions such as "null".
    cC@s/tt|�jdt|�t|jj�dS(Ni(RZR(RQRXRHR�R�(RR�((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyRQCscC@sBtj|d�s(t||j�}n|jd|j��|S(s�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.
        RR#(RR3RAR�R$R(RR+((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR,Gs(R	RFReRQR,(((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyR(<s	N(t
__future__RRRRRRtutilsRRtobjectR
RAR5R~R-R�R�R�RR�R�R((((s8/usr/lib64/python2.7/site-packages/mercurial/smartset.pyt<module>s"	��t	$��u