-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
Ì\,Tc@s•ddlmZddlmZdefd„ƒYZdefd„ƒYZdefd„ƒYZd	efd
„ƒYZdeefd„ƒYZ	d
S(iÿÿÿÿ(tnullrev(t_tbasedagcBsƒeZdZd„Zd„Zd„Zd„Zd„Zd
d„Z	d
d„Z
d„Zd	„Zd
„Z
d„Zed„ZRS(sðgeneric interface for DAGs

    terms:
    "ix" (short for index) identifies a nodes internally,
    "id" identifies one externally.

    All params are ixs unless explicitly suffixed otherwise.
    Pluralized params are lists or sets.
    cCs
d|_dS(N(tNonet_inverse(tself((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt__init__scCs
t‚dS(sset of all node idxsN(tNotImplementedError(R((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pytnodesetscCs
t‚dS(slist of head ixsN(R(R((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pytheadsscCs
t‚dS(slist of parents ixs of ixN(R(Rtix((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pytparents#scCs
t‚dS(s1inverse DAG, where parents becomes children, etc.N(R(R((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pytinverse'scCs
t‚dS(sV
        set of all ancestors of starts (incl), but stop walk at stops (excl)
        N(R(Rtstartststops((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pytancestorset+scCs|jƒj||ƒS(sX
        set of all descendants of starts (incl), but stop walk at stops (excl)
        (RR(RR
R((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt
descendantset1scCs
t‚dS(sé
        subset of connected list of ixs so that no node has a descendant in it

        By "connected list" we mean that if an ancestor and a descendant are in
        the list, then so is at least one path connecting them.
        N(R(Rtixs((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pytheadsetofconnecteds7scCs
|j|ƒS(s4return a list of (or set if given a set) of node ids(t_externalize(RR
((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pytexternalize@scCs2|j|ƒ}t|tƒr(t|ƒSt|ƒS(s4return a list of (or set if given a set) of node ids(t_externalizeallt
isinstancetsettlist(RRtids((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pytexternalizeallDs
cCs
|j|ƒS(s4return a list of (or set if given a set) of node ixs(t_internalize(Rtid((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pytinternalizeKscCs5|j||ƒ}t|tƒr+t|ƒSt|ƒS(s4return a list of (or set if given a set) of node ids(t_internalizeallRRR(RRt
filterunknownR((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pytinternalizeallOs
N(t__name__t
__module__t__doc__RRR	RRRRRRRRRtFalseR (((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyR
s											t
genericdagcBs#eZdZdd„Zd„ZRS(s generic implementations for DAGscCs‹|rt|ƒptƒ}tƒ}t|ƒ}xT|r†|jƒ}||kr3||kr3|j|ƒ|j|j|ƒƒq3q3W|S(N(RRtpoptaddtextendR(RR
Rtseentpendingtn((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyRZs		
cCs^t|ƒ}|s|Sx5|D]-}x$|j|ƒD]}|j|ƒq3WqW|sZt‚|S(N(RRtdiscardtAssertionError(RRthdsR+tp((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyRes
N(R!R"R#RRR(((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyR%WstrevlogbaseddagcBsMeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	RS(s!generic dag interface to a revlogcCs,tj|ƒ||_d|_||_dS(N(RRt_revlogRt_headst_nodeset(RtrevlogR((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyRss
		cCs|jS(N(R3(R((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyRyscCs(|jdkr!|jƒ|_n|jS(N(R2Rt	_getheads(R((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyR	|scCs|jj|dS(Ni(R1tindex(RR
((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyRscCs+|jj}g|D]}||d^qS(Ni(R1R6(RRtidxti((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyRƒscCsC|jj|ƒ}|tkr?t||jjtdƒƒ‚n|S(Ntnullid(R1trevRtLookupErrort	indexfileR(RRR
((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyR‡s!cCsl|j}|r\gt|jj|ƒD]3}|dk	r%|tkr%||jkr%|^q%St|j|ƒS(N(R1tmaptnodemaptgetRRtfilteredrevsR(RRRtrltr((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyRŒs	(
R!R"R#RRR	RRRR(((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyR0ps						t	revlogdagcBsPeZdZd„Zd„Zd„Zd„Zdd„Zd„Z	d„Z
RS(	sdag interface to a revlogcCstj||t|ƒƒdS(N(R0RR(RR4((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyR™scCs,g|jjƒD]}|tkr|^qS(N(R1theadrevsR(RRB((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyR5œscCsz|j}|j}||}|d}|tkrY|d}|tkrO|gS||gS|d}|tkrv|gSgS(Nii(R1R6R(RR
trlogR7trevdatatprevtprev2((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyRŸs		




cCs(|jdkr!t|ƒ|_n|jS(N(RRtinverserevlogdag(R((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyR®scCsÎ|j}|j}|r$t|ƒp*tƒ}tƒ}t|ƒ}x…|rÉ|jƒ}||krE||krE|j|ƒ||}x=ddgD],}	||	}
|
tkr“|j|
ƒq“q“WqEqEW|S(Nii(R1R6RRR&R'Rtappend(RR
RRER7R)R*R:RFR8RG((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyR³s				


c	Cs“|s
tƒS|j}|j}t|ƒ}xU|D]M}||}x:ddgD],}||}|tkrO|j|ƒqOqOWq2W|st‚|S(Nii(RR1R6RR,R-(	RRRER7RDR:RFR8RG((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyRÄs		


cCsg}t|j|ƒƒ}|jdtƒtƒ}x©|rß|jƒ}|dkrŒ|d}||krÜ|j|ƒ|j|ƒqÜq7|j|dƒ|g|j|ƒD]$}||kr±||kr±|^q±7}q7Wt	|ƒt	|ƒksþt
‚|S(s­linearize and topologically sort a list of revisions

        The linearization process tries to create long runs of revs where
        a child rev comes immediately after its first parent. This is done by
        visiting the heads of the given revs in inverse topological order,
        and for each visited rev, visiting its second parent, then its first
        parent, then adding the rev itself to the output list.
        treverseii(RRtsorttTrueRR&RJR'RtlenR-(RRtsortedtvisittfinishedtcurR/((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt	linearizeÓs 			
)N(R!R"R#RR5RRRRRRS(((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyRC–s					RIcBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(s:inverse of an existing revlog dag; see revlogdag.inverse()cCsNtj||j|jƒ||_i|_g|_t|jƒd|_dS(Ni(	R0RR1R3t_origt	_childrent_rootsRNt	_walkfrom(Rtorig((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyRós
			c	CsÄ|j}|j}|j}|jj}x||kr¶||}t}xJ|d|dgD]4}|tkr[|j|gƒj|ƒt	}q[q[W|r©|j|ƒn|d8}q*W||_dS(Niii(
RWRURVR1R6RMRt
setdefaultRJR$(	RtwalktoR:tcstrootsR7tdatatisrootRG((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt_walktoús			

cCs|jtƒ|jS(N(R_RRV(R((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyR5s
cCsB|dkrgS||jkr/|j|ƒn|jj|gƒS(N(RRWR_RUR?(RR
((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyRs
cCs|jS(N(RT(R((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyRs(R!R"R#RR_R5RR(((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyRIðs				N(
tnodeRti18nRtobjectRR%R0RCRI(((s5/usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt<module>	sJ&Z

Copyright © 2017 || Recoded By Mr.Bumblebee