\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sdZddlmZddlmZddlmZmZmZm Z dZ dZ dZ d Z id e 6d e 6de 6Zd Zd ZdZdZdZdZdZdZdZdZdZdZdS(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(tdagoptpycompattsmartsettutiltCtPtGtMt|t:c #@si}xD]}||}tfd|jDg|jD]6}|jtkrL|jkrL|j^qL}gtD]}t|f^q}x|D]}|j|} | dkr(tt j st j nttt j ||g} ||;sc3@s'|]}|krt|fVqdS(N(t GRANDPARENT(R tg(tpset(s8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pys MsN(tsettparentsR RtsortedtPARENTtgettNonet isinstanceRtbasesetRtreachablerootstappendt MISSINGPARENTtaddtextendtupdatet CHANGESET( trepoRtgpcacheR tctxRtmparsRtmpartgp((RRs8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pyt dagwalker(s(   "6%   #c#@sjt|xW|D]O}||}tfd|jD}|jt|t|fVqWdS(scset 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|])}|jkrt|jfVqdS(N(tnodeRR (R R(tinclude(s8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pys [sN(RRR R!R(R"tnodesR)R$R((R*s8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pyR+Rs    "c #@sg}i}d}ixjjdD]\}}d|kr+|jdd\}}|dkr|jrt|j|i||scS@siS(N((R ((s8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pyR2~sitN(tuit configitemstrsplittisdigittintt setdefaulttisalnumRt lrucachefuncRtindextpopt enumerateR(tdagR"tseentcolorstnewcolortkeytvalR0tsettingtgetconftcurttypetdataRtcolR/tnexttptRt addparentstitedgestecolteidtbconftptype((R1R"s8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pytcolored_s^        +      !cc@s[|d}||kr&|j|n|j|}g}g}xm|D]e\} } | |krfqHn| |kr|j| qH|j| |dj| d|d| (RORNtstarttend((s8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pyt_fixlongrightedgess c C@s|r||kr|dkr|dkrut|d|}||d|dd!}|jddg|||Sddg||dSn+||d} | dkr|| d SgSdS(Niiiit/t s\(tmaxR( techarstidxtpidxR]tcoldifftpdifftfix_tailRattailt remainder((s8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pyt_getnodelineedgestails cC@sx |D]\}}||dkr8d|d|dtlistRrRtitemstremove(tlinestextratedgemapR@RXt edgecharst shift_sizetminlinestemptiesttoshiftt first_emptyRNtcttargetst positionsRvtpostmapRR~R\((s8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pyt_drawendinglinessD - &3+ 01 cC@s4igd6id6dd6dd6tjd6td6S(s=returns the initial value for the "state" argument to ascii()R@ROit lastcoldifft lastindexRURx(tEDGEStcopytFalse(((s8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pyt asciistateOs cC@s6x/|D]'\}}|j||jdqWdS(sXoutputs an ASCII graph of a DAG this is a helper function for 'ascii' below. takes the following arguments: - ui to write to - graph data: list of { graph nodes/edges, text } this function can be monkey-patched by extensions to alter graph display without needing to mimic all of the edge-fixup logic in ascii() s N(twritetrstrip(R4R,tlntlogstr((s8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pyt outputgraphZs c @st|\}}}} |d|d} } g| D]+} | j| ddfD] } | ^qJq.}|jdt|| t| d| dkrt|nt|dko| dkog|D]"\}}|d|kr|^q}t|dko| }||d }|j|dg|jt|||d || |d |||d }x(tjd| D]}|jdqvW||d}| dkrxtj|D]}|jd dgqWn\| dkr|j||dd|d!n-x*tj|D]}|jd dgqWt |||||g|rtjt ||||n|d rt d|Drj|qn j|||| d }tt|krx-tt|kr j|qWnt || | |x)t|tkrO|jdq'Wt d| j Dr|dtdfd}xMtD]?\}}g|D]%} || |r| dn^q|(qW| jfd| jDnt||| }gD]#}dd|dj|f^qt|t|| |d <||d sR3cs@s!|]}t|dkVqdS(iN(RV(R RW((s8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pys sRUc@sQt|dkrtSt|d }|dkr=| |kSt||kS(Niii(RVtTrueR8(RWRNtnum(R(s8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pyt_drawgpsc3@s9|]/\}}|t|dkr*|nfVqdS(iN(RV(R teR(R\(s8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pys ss%-*s N(R Re(RRRfRVRcRoRtxrangeRRuRwtanyRRzRR>R R}tjoinRtzip(R4RXRHRWttexttcoldataRhROR]RjRR@RRRgtxtytadd_padding_linetfix_nodeline_tailRstshift_interlineRNR{textra_interlineRRvtindentation_level((RR\s8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pytasciijsj8(  /   #   7 0 N(t__doc__t __future__RR)RR3RRRRR!RRRRRR(R+RTR`RcRoRuRwRRRR(((s8/usr/lib64/python2.7/site-packages/mercurial/graphmod.pyts(" * N 5     3