-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/mercurial/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/mercurial/ancestor.pyc


\,Tc@s]ddlZddlZddlmZdZdZdZdefdYZdS(iN(tnullrevcGsOt|tst|}nt|kr1tSt|dkrG|Sdt|>d}dgt|d}x(t|D]\}}d|>||<qWd|d>}t}t|}t|d}	xx|	dkrJ|rJ|	}
|	d8}	||
sqn||
}||krg|d8}||krg|j|
||O}|
|krdt|
gSqgn||krx||
D]d}||}
|tkrqn|
dkr|||<|d7}q|
|kr||c|O<qqWqxY||
D]K}|tkrqn||}
|
r9|
|kr9|d8}n|||<qWqW|S(sReturns a set with the heads of all common ancestors of all nodes,
    heads(::nodes[0] and ::nodes[1] and ...) .

    pfunc must return a list of parent vertices for a given vertex.
    ii(t
isinstancetsetRtlentmaxt	enumeratetadd(tpfunctnodestallseentseentitntpoisontgcatinterestingtnvtvtsvtptsp((s6/usr/lib/python2.7/dist-packages/mercurial/ancestor.pytcommonancestorsheadssZ	










cs>fd}t|}t|dkr4|S||S(s
    Returns the common ancestors of a and b that are furthest from a
    root (as measured by longest path).

    pfunc must return a list of parent vertices for a given vertex.
    csi}t|d}dg|}dg|}g}x[tt|D]G\}}d||<d|>}|||<d||<|j||fqIW|d}	x|	dkrct|dkrc|	}
|	d8}	||
}|dkrqn||
}x>|
D]0}
|
tkrqn||
}||
}}||kr|d||
<||kr2||cd7<|}||
<|r||cd8<||dkr||=qqq2q||dkr||B}||krqn|||
<|j|d||cd7<||cd8<||dkr2||=q2qqW||cd8<||dkr||=qqWt|dkrzgSdx|D]}|OqWtfd|DS(Niic3s%|]\}}|@r|VqdS(N((t.0RR(tk(s6/usr/lib/python2.7/dist-packages/mercurial/ancestor.pys	<genexpr>s(RRtsortedtappendRRt
setdefaultR(RRtcounttdepthR
tmappingRRtbRRtdvRRtdptnspR(R(Rs6/usr/lib/python2.7/dist-packages/mercurial/ancestor.pytdeepestKsh






!






i(RR(Rt	orignodesR"R((Rs6/usr/lib/python2.7/dist-packages/mercurial/ancestor.pyt	ancestorsDs
8cCst|}t|}|s"gS|s8|jtntt|t|}|j|}|j||j|g}xIt|tdD]5}|sPn||kr|j|x;||D]-}	|j|	|j|	|j|	qWqn||kr*|j	||}
|}n||kr|}
|}nq|
j|xr||D]d}	|	tkrwqb|	|ks|	|kr|j|	|j|	|j|	qb|
j|	qbWqW|j
|S(s\Return all the ancestors of revs that are not ancestors of bases.

    This may include elements from revs.

    Equivalent to the revset (::revs - ::bases). Revs are returned in
    revision number order, which is a topological order.

    revs and bases should both be iterables. pfunc must return a list of
    parent revs for a given revs.
    i(RRRRtintersectiontdifference_updatetxrangetremovetdiscardRtreverse(trevstbasesRt	revsvisitt
basesvisittstartt	bothvisittmissingtcurrRt	thisvisitt
othervisit((s6/usr/lib/python2.7/dist-packages/mercurial/ancestor.pytmissingancestorssP





		



t
lazyancestorscBs)eZdedZdZdZRS(icCs||j|_||_||_||_g|D]
}|^q.|_tj|j|rlt||_	nt|_	dS(sCreate a new object generating ancestors for the given revs. Does
        not generate revs lower than stoprev.

        This is computed lazily starting from revs. The object supports
        iteration and membership.

        cl should be a changelog and revs should be an iterable. inclusive is
        a boolean that indicates whether revs should be included. Revs lower
        than stoprev will not be generated.

        Result does not include the null revision.N(
t
parentrevst_parentrevst	_initrevst_stoprevt
_inclusivet_containsvisittheapqtheapifyRt
_containsseen(tselftclR+tstoprevt	inclusivetrev((s6/usr/lib/python2.7/dist-packages/mercurial/ancestor.pyt__init__s			ccst}|j}|jrAx|D]}|Vq"W|j|n|j}|j}tj|}xa|rxT||jD]@}||kr~||kr~|j	||j
||Vq~q~WqeWdS(seGenerate the ancestors of _initrevs in reverse topological order.

        If inclusive is False, yield a sequence of revision numbers starting
        with the parents of each revision in revs, i.e., each revision is *not*
        considered an ancestor of itself.  Results are in breadth-first order:
        parents of each rev in revs, then parents of those, etc.

        If inclusive is True, yield all the revs first (ignoring stoprev),
        then yield all the ancestors of revs as when inclusive is False.
        If an element in revs is an ancestor of a different rev it is not
        yielded again.N(RR9R;tupdateR8R:tutiltdequetpopleftRR(R@R
R+RDR7RBtvisittparent((s6/usr/lib/python2.7/dist-packages/mercurial/ancestor.pyt__iter__s			
				

c
Cs|j}||krtS|j}|j}|j}tj}tj}t}x|r|d|kr|rxi|||D]T}	|	|ks|	|krqn|||	|j	|	|	|krt}qqWqOW|S(s5Test whether target is an ancestor of self._initrevs.i(
R?tTrueR8R<R:R=theappoptheappushtFalseR(
R@ttargetR
R7RJRBRNROt
targetseenRK((s6/usr/lib/python2.7/dist-packages/mercurial/ancestor.pyt__contains__s$						!
(t__name__t
__module__RPRERLRS(((s6/usr/lib/python2.7/dist-packages/mercurial/ancestor.pyR6s	(	R=RGtnodeRRR$R5tobjectR6(((s6/usr/lib/python2.7/dist-packages/mercurial/ancestor.pyt<module>s	8	E	Q

Copyright © 2017 || Recoded By Mr.Bumblebee