KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache
System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : andertr9 ( 1047)
PHP Version : 8.2.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/mercurial/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/mercurial/dagutil.pyc
�
Hq�Qc@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((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyt__init__scCs
t�dS(sset of all node idxsN(tNotImplementedError(R((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pytnodesetscCs
t�dS(slist of head ixsN(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pytheadsscCs
t�dS(slist of parents ixs of ixN(R(Rtix((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pytparents#scCs
t�dS(s1inverse DAG, where parents becomes children, etc.N(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pytinverse'scCs
t�dS(sV
        set of all ancestors of starts (incl), but stop walk at stops (excl)
        N(R(Rtstartststops((s7/usr/lib64/python2.7/site-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((s7/usr/lib64/python2.7/site-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((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pytheadsetofconnecteds7scCs
|j|�S(s4return a list of (or set if given a set) of node ids(t_externalize(RR
((s7/usr/lib64/python2.7/site-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((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pytexternalizeallDs
cCs
|j|�S(s4return a list of (or set if given a set) of node ixs(t_internalize(Rtid((s7/usr/lib64/python2.7/site-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((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pytinternalizeallOs
N(t__name__t
__module__t__doc__RRR	RRRRRRRRRtFalseR (((s7/usr/lib64/python2.7/site-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((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyRZs		
cCs^t|�}|s|Sx5|D]-}x$|j|�D]}|j|�q3WqW|sZt�|S(N(RRtdiscardtAssertionError(RRthdsR+tp((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyRes
N(R!R"R#RRR(((s7/usr/lib64/python2.7/site-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((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyRss
		cCs|jS(N(R3(R((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyRyscCs(|jdkr!|j�|_n|jS(N(R2Rt	_getheads(R((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyR	|scCs|jj|dS(Ni(R1tindex(RR
((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyR�scCs+|jj}g|D]}||d^qS(Ni(R1R6(RRtidxti((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyR�scCsC|jj|�}|tkr?t||jjtd���n|S(Ntnullid(R1trevRtLookupErrort	indexfileR(RRR
((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyR�s!cCs]|j}|rMgt|jj|�D]$}|dk	r%|tkr%|^q%St|j|�S(N(R1tmaptnodemaptgetRRR(RRRtrltr((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyR�s
	"(
R!R"R#RRR	RRRR(((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyR0ps						t	revlogdagcBsPeZdZd�Zd�Zd�Zd�Zdd�Zd�Z	d�Z
RS(	sdag interface to a revlogcCs)tj||ttt|����dS(N(R0RRtxrangetlen(RR4((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyR�scCs,g|jj�D]}|tkr|^qS(N(R1theadrevsR(RRA((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyR5�scCsz|j}|j}||}|d}|tkrY|d}|tkrO|gS||gS|d}|tkrv|gSgS(Nii(R1R6R(RR
trlogR7trevdatatprevtprev2((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyR�s		




cCs(|jdkr!t|�|_n|jS(N(RRtinverserevlogdag(R((s7/usr/lib64/python2.7/site-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
RRFR7R)R*R:RGR8RH((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyR�s				


c	Cs�|s
t�S|j}|j}t|�}xU|D]M}||}x:ddgD],}||}|tkrO|j|�qOqOWq2W|s�t�|S(Nii(RR1R6RR,R-(	RRRFR7RER:RGR8RH((s7/usr/lib64/python2.7/site-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&RKR'RRDR-(RRtsortedtvisittfinishedtcurR/((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyt	linearize�s 			
)N(R!R"R#RR5RRRRRRS(((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyRB�s					RJcBs;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_rootsRDt	_walkfrom(Rtorig((s7/usr/lib64/python2.7/site-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(
RWRURVR1R6RNRt
setdefaultRKR$(	RtwalktoR:tcstrootsR7tdatatisrootRH((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyt_walkto�s			

cCs|jt�|jS(N(R_RRV(R((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyR5	s
cCsB|dkrgS||jkr/|j|�n|jj|g�S(N(RRWR_RUR?(RR
((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyR
s
cCs|jS(N(RT(R((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyRs(R!R"R#RR_R5RR(((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyRJ�s				N(
tnodeRti18nRtobjectRR%R0RBRJ(((s7/usr/lib64/python2.7/site-packages/mercurial/dagutil.pyt<module>	sJ$Z

Anon7 - 2021