HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python2.7/dist-packages/mercurial/graphmod.pyc
ó
ŰXc@@sÖdZddlmZddlmZddlmZmZdZdZ	dZ
d	Zid
e	6de
6de6Z
d„Zd
„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZdS(s>supports walking the history as DAGs suitable for graphical output

The most basic format we use is that of::

  (id, type, data, [parentids])

The node and parent ids are arbitrary integers which identify a node in the
context of the graph returned. Type is a constant specifying the node type.
Data depends on type.
i(tabsolute_importi(tnullrev(trevsettutiltCtPtGtMt|t:c
#@s¨ˆs
dSi}x‘ˆD]‰}||}t‡fd†|jƒDƒƒ‰g|jƒD]6}|jƒtkrV|jƒˆkrV|jƒ^qV}gtˆƒD]}t|f^qŸ}xĎ|D]Ç}|j|ƒ}	|	dkr2tˆt	j
ƒst	j
ˆƒ‰nttt	j|ˆ|gƒƒƒ}	||<n|	s[|jt
|fƒˆj|ƒqž|j‡fd†|	Dƒƒˆj|	ƒqžW|jƒt||fVqWdS(sÍcset DAG generator yielding (id, CHANGESET, ctx, [parentinfo]) tuples

    This generator function walks through revisions (which should be ordered
    from bigger to lower). It returns a tuple for each node.

    Each parentinfo entry is a tuple with (edgetype, parentid), where edgetype
    is one of PARENT, GRANDPARENT or MISSINGPARENT. The node and parent ids
    are arbitrary integers which identify a node in the context of the graph
    returned.

    Nc3@s-|]#}|jƒˆkr|jƒVqdS(N(trev(t.0tp(trevs(s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pys	<genexpr><sc3@s'|]}|ˆkrt|fVqdS(N(tGRANDPARENT(Rtg(tpset(s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pys	<genexpr>Ns(tsettparentsR
RtsortedtPARENTtgettNonet
isinstanceRtbasesettreachablerootstappendt
MISSINGPARENTtaddtextendtupdatet	CHANGESET(
trepoR
tgpcacheR
tctxRtmparsRtmpartgp((RR
s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pyt	dagwalker&s,

"6%
#c#@sjt|ƒ‰xW|D]O}||}t‡fd†|jƒDƒƒ}|jƒt|t|ƒfVqWdS(sącset DAG generator yielding (id, CHANGESET, ctx, [parentids]) tuples

    This generator function walks the given nodes. It only returns parents
    that are in nodes, too.
    c3@s3|])}|jƒˆkrt|jƒfVqdS(N(tnodeRR
(RR(tinclude(s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pys	<genexpr>\sN(RRR
RR(R tnodesR'R"R((R(s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pyR)Ss


"c#@sűg}i}d}i‰x݈jjdƒD]›\}}d|kr+|jddƒ\}}|dkr’|jƒr’t|ƒˆj|iƒ|<qĆ|dkrĆ|jƒrĆ|ˆj|iƒ|<qĆq+q+Wˆrîtj‡‡fd†ƒ}	n	d„}	xý|D]ő\}
}}}
|
|kr@|j	|
ƒ|||
<|d7}n|j
|
ƒ}|j|
ƒ}|}g|
D]\}}||krl|^ql}||||d+xAt|ƒD]3\}}|sÍ|||<qŽ|||<|d7}qŽWg}xĺt|ƒD]×\}}||kr`|	|ƒ}|j	||j
|ƒ|||j
ddƒ|j
dd	ƒfƒqř||
krřx`|
D]U\}}|	|ƒ}|j	||j
|ƒ||j
ddƒ|j
dd	ƒfƒqsWqřqřW|
||||f|fV|}qţWd
S(sxannotates a DAG with colored edge information

    For each DAG node this function emits tuples::

      (id, type, data, (col, color), [(col, nextcol, color)])

    with the following new elements:

      - Tuple (col, color) with column and color index for the current node
      - A list of tuples indicating the edges between the current node and its
        parents.
    itgrapht.twidthtcolorc@sˆjˆ|jƒiƒS(N(Rtbranch(R
(tconfigR (s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pyt<lambda>}scS@siS(N((R
((s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pyR0si˙˙˙˙tN(tuitconfigitemstrsplittisdigittintt
setdefaulttisalnumRtlrucachefuncRtindextpopt	enumerateR(tdagR tseentcolorstnewcolortkeytvalR.tsettingtgetconftcurttypetdataRtcolR-tnexttptRt
addparentstitedgestecolteidtbconftptype((R/R s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pytcolored`s^
 	


+

!cc@s*|d}||kr&|j|ƒn|j|ƒ}g}g}	x[|D]S\}
}||krp|j|ƒqH|	j|ƒ|dj|
dƒ|d|<qHWt|ƒ}|}
|	|
||d+g|D]'}|tkrĘ||
j|ƒf^qĘ}|
|(xt|	ƒdkr|j||fƒ|j||dfƒd}|||||||ffVd}g}|d7}|d7}g}|	d=qWt|	ƒdkrš|j||fƒnt|	ƒdkrĺ|j||dfƒnt|
ƒ|}|dj|d	ƒ|||||||ffVd	S(
s9adds edge info to changelog DAG walk suitable for ascii()R>tstylesRRMiis\iN(RR:RtlenRR;R(RFtchartlineststateR
RR>tnodeidxtknownparentst
newparentsRQtparenttncolstnextseenRRMt	nmorecols((s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pyt
asciiedgesŽsF

"1

cC@sJxCt|ƒD]5\}\}}||kr
||df||<q
q
WdS(Ni(R<(RMRLtstarttend((s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pyt_fixlongrightedgesŢsc
C@s˝|rŽ||krŽ|dkrŽ|dkrut|d|ƒ}||d|dd!}|jddg||ƒ|Sddg||dSn+||d}	|	dkrľ||	dSgSdS(Nii˙˙˙˙iit/t s\(tmaxR(
techarstidxtpidxR\tcoldifftpdifftfix_tailR`ttailt	remainder((s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pyt_getnodelineedgestailăscC@sx|D]\}}||dkr8d|d|d<q||dkr]d|d|d<q||kr‚|d||d|<qd|t|ƒkržqnd|d|<||krČ||}}nx@td|dd|ƒD]#}||dkräd||<qäqäWqWdS(NiRcis\t+t-(RTtrange(RfRMtnodelinet	interlineR`RaRL((s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pyt
_drawedgesňs"cC@s||d }||df|ks6||f|krY|j||d|dd!ƒn
|jdƒ||d}|dkr™|j||dƒn|S(Niis  i(R(RfRgR\RMtlineRm((s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pyt_getpaddinglines(#
cC@s˛d|jƒkrdS|ddd…}x$|rO|ddkrO|jƒq,Wt|jdƒdddƒ}x(t|ƒd|krš|j|ƒqsW|rég}g}|jdƒ}x_t||dd…|dƒD]=\}	}
|
dkr	|j|	dƒqÝ|j|	dƒqÝWt	t
||t|ƒddƒƒ}|}x›||D]‹}
dgt|
ƒ||
|)xgt
t|ƒƒD]S}	||	d}t|||	ƒ||	<|||	krĚdn|||	|
|<q‹WqWWnid	d6d
d6}xXt|ƒD]J\}	}
d|
kr(q
ng|
D]}
|
pJ|j|	dƒ^q/|
(q
Wg|jƒD]\}}
|
dkre|^qe}x"|D]}||=|j
|ƒqWdS(sŃDraw ending lines for missing parent edges

    None indicates an edge that ends at between this node and the next
    Replace with a short line ending in ~ and add / lines to any edges to
    the right.

    Nii˙˙˙˙iiiRdRcRt~(RtvaluesR;RetcountRTRR:R<tlistRqRtitemstremove(RVtextratedgemapR>t	edgecharst
shift_sizetemptiesttoshifttfirst_emptyRLtcttargetst	positionsRutpostmapRR|R[((s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pyt_drawendinglinessB -&301
cC@s4igd6id6dd6dd6tjƒd6td6S(s=returns the initial value for the "state" argument to ascii()R>RMitlastcoldifft	lastindexRStgraphshorten(tEDGEStcopytFalse(((s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pyt
asciistateJs
c	@sV|\}}}}	d|	ko)dkns4t‚|d|d}
}g|D]+}|
j|dƒdfD]}
|
^qlqP}|jdt||	t|ƒdƒƒ|	dkrÂt|ƒnt|ƒdko|	dkog|D]"\}}|d	|krç|^qç}t|ƒdko%|}||d }|j|dgƒ|jt|||d
||	|d|ƒƒ||d }|jdd|	ƒ||d	}|	dkrÇ|jd|ƒn@|	dkrö|j||d	d|d!ƒn|jd
|ƒt||||ƒ|g‰|rHˆjt	||||ƒƒn|dr{t
d„|Dƒƒrˆˆj|ƒqˆn
ˆj|ƒ|||	d }tˆƒt|ƒkrâx-tˆƒt|ƒkrŢˆj|ƒqľWntˆ||
|ƒx)t|ƒtˆƒkr |jdƒqřWt
d„|
jƒDƒƒrÔ|dt
d‰‡fd†}xMtˆƒD]?\}}g|D]%}
||
|ƒr|
dnˆ^q~|(qkW|
j‡fd†|
jƒDƒƒnt|||	ƒ}xTtˆ|ƒD]C\}}dd|dj|ƒ|f}|j|jƒdƒq÷W|	|d<||d
<dS(s™prints an ASCII graph of the DAG

    takes the following arguments (one call per node in the graph):

      - ui to write to
      - Somewhere to keep the needed state in (init to asciistate())
      - Column of the current node in the set of ongoing edges.
      - Type indicator of node data, usually 'C' for changesets.
      - Payload: (char, lines):
        - Character to use as node's symbol.
        - List of lines to display as the node's text.
      - Edges; a list of (col, next_col) indicating the edges between
        the current node and its parents.
      - Number of columns (ongoing edges) in the current revision.
      - The difference between the number of columns (ongoing edges)
        in the next revision and the number of columns (ongoing edges)
        in the current revision. That is: -1 means one column removed;
        0 means no columns added or removed; 1 means one column added.
    iţ˙˙˙iRMR>RRdii˙˙˙˙iR‹RŠs/ s\ RŒcs@s!|]}|r|dkVqdS(s\/N((RR„((s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pys	<genexpr>ŽsR1cs@s!|]}t|ƒdkVqdS(iN(RT(RRU((s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pys	<genexpr>ŔsRSc@sQt|ƒdkrtSt|d ƒ}|dkr=||kStˆƒ||kS(Nii˙˙˙˙i(RTtTrueR6(RURLtnum(RV(s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pyt_drawgpÄsc3@s9|]/\}}|t|ƒdkr*|nˆfVqdS(iN(RT(RteR„(R[(s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pys	<genexpr>Îss%-*s %ss
N(RRd(tAssertionErrorRRReRTRbRnRtRRvtanyR‰RxRR<RR{tziptjointwritetrstrip(R2RWRFRUttexttcoldataRgRMR\RiR~R>RR„Rftxtytadd_padding_linetfix_nodeline_tailRrtshift_interlineRytextra_interlineR“RLRutindentation_leveltlogstrtln((RVR[s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pytasciiUsh"8(
	/	#	

7  
N(t__doc__t
__future__RR'RR1RRRRRRRRR&R)RRR_RbRnRtRvR‰RRŚ(((s6/usr/lib/python2.7/dist-packages/mercurial/graphmod.pyt<module>s&	-	
	N	0					2