\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c @@sdZddlmZddlZddlmZddlmZmZm Z ddl m Z m Z m Z mZmZmZiZejeZdZiZejeZedd d ded d d dedfdddedfdddedfdddedfdddedfdddedfgddedddZddZedged d!Zed"dddedfged#deddd$Zd%ded&Zed'd(d)ded)fd*d+ded+fd d,ded,fd-d.ded.fgd/d0Zed1d2d3ded4ed5fged6d7ejd8Z dS(9sbrowse the repository in a graphical way The hgk extension allows browsing the history of a repository in a graphical way. It requires Tcl/Tk version 8.4 or later. (Tcl/Tk is not distributed with Mercurial.) hgk consists of two parts: a Tcl script that does the displaying and querying of information, and an extension to Mercurial named hgk.py, which provides hooks for hgk to get information. hgk can be found in the contrib directory, and the extension is shipped in the hgext repository, and needs to be enabled. The :hg:`view` command will launch the hgk Tcl script. For this command to work, hgk must be in your search path. Alternately, you can specify the path to hgk in your configuration file:: [hgk] path = /location/of/hgk hgk can make use of the extdiff extension to visualize revisions. Assuming you had already configured extdiff vdiff command, just add:: [hgk] vdiff=vdiff Revisions context menu will now display additional entries to fire vdiff on hovered and selected revisions. i(tabsolute_importN(t_(tnullidtnullrevtshort(tcommandstobsoletetpatchtpycompatt registrartscmutilsships-with-hg-corethgktpathtdefaultsdebug-diff-treetpRsgenerate patchtrt recursivetPtprettytststdintCtcopys detect copiestStsearchts![OPTION]... NODE1 NODE2 [FILE]...t inferrepoc @sd fd}x{tr|drjj}|s>Pn|jtjjd}|d}t|dkr|d}qd }n|j |}|r|j |}n|}|j j |d}|drh|drt ||dnt j|||}tj} t| _tj|||d |d | } x4| D]} j| qNWn||||d ||dsPqqWd S( sdiff trees from two commitsc @s/|dkrg}n||j}||j}tj|||}|j|||d \}}} tt} x?|D]7} jdt|| t|| | | fqWx5|D]-} jd| t|| | | fqWx5| D]-} jdt|| | | | fqWdS(Nis:100664 100664 %s %s M %s %s s:000000 100664 %s %s N %s %s s:100664 000000 %s %s D %s %s (tNonetmanifestR tmatchtstatusRRtwrite( trepotnode1tnode2tfilestmmaptmmap2tmtmodifiedtaddedtremovedtemptytf(tui(s//usr/lib64/python2.7/site-packages/hgext/hgk.pyt __difftreeSs   "   ,  "  Rt iiRRRRtoptsR#N(RtTruetfintreadlinetrstripRt oslineseptsplittlentlookupt changelogtparentst catcommitR RRtdifffeatureoptstgittdiffR( R,R R!R"R#R/R-tlineR&tdiffoptstchunkstchunk((R,s//usr/lib64/python2.7/site-packages/hgext/hgk.pytdifftreeGs:            c C@sd|}|dkr#||}n|jdt|jdx%|jD]}|jd|qQW|j}|jjdd}|jd|jt |d|dfd |j kr|jd |j d n|jd |j |jd |j t j|t jrP|j rP|jd qPn|jd|j|dkr|jd||jd|jfn|j|d|r|jdndS(Ns stree %s is parent %s sRsauthor %s %d %d it committers committer %s s revision %d s branch %s s obsolete s phase %s s%s%s (RRRt changesetR9tdatet descriptiontreplacetusertinttextratrevtbranchRt isenabledtcreatemarkersopttphasestrtstrip( R,R tntprefixtctxtnlprefixRRERF((s//usr/lib64/python2.7/site-packages/hgext/hgk.pyR:s.   ! .    sdebug-merge-basesREV REVcC@sN|j|}|j|}|jj||}|jt|ddS(s"output common ancestor informations N(R7R8tancestorRR(R,R R!R"RQ((s//usr/lib64/python2.7/site-packages/hgext/hgk.pytbasessdebug-cat-files[OPTION]... TYPE FILEcK@s%d}|drS|jj}|s)dS|jtjjd\}}d}n4| sa| r|jtdtj |dnx|r |dkr|jtd d S|j |}t |||||dr|jj}|sPn|jtjjd\}}qPqWdS( scat a specific revisionRRNR.s s(cat-file: type or revision not supplied scat-filetcommits.aborting hg cat-file only understands commits i( R1R2R3RR4R5twarnRRthelp_R7R:(R,R ttypeRR/RRR>RQ((s//usr/lib64/python2.7/site-packages/hgext/hgk.pytcatfiles,  !    $ttreec@sfd}d}g}g} g} d} x~t|D]p\} } | jdrj| d}| j|| j|q@| dkr@| jj| q@q@Wxt| D]\} }|jt|g}|| j|x|r|jd}|| kr!qnx]jj|D]I}||| krk|| j||j|n|| kr4q4q4q4WqWqWxq|D]f\} }| krqnjj | }|| ||}|rd}|rRjj|}|dt kr$|dt |d7}n|dt krR|dt |d7}qRnsx|j d t ||fn^d kr|j d t ||ft ||d |njj|\}}tt |||f\}}}tjj||f\}}|jd}|j d |||f|| ||}|tkr|dkr|j d ||ffn|| ||}|tkr|dkr|j d ||fn|j d|r| |krPn| d7} qqWdS(Nc3@smt}|}dgd}d}xAtrh||krI|}d}n ||8}xtj|D]}|||krdg|||||)Pndk r||kr||||<||jqqc||krcd||}||dkr||dk rF||pIdfVqqW|dkr(Pq(q(WdS(Niidii(R6R0RtxrangeRRD(tcounttitlRAtx(tfullR (s//usr/lib64/python2.7/site-packages/hgext/hgk.pyt chlogwalks0        , cS@sat|dkrdSd}x>tjt|D]'}|||kr2|d|>O}q2q2W|S(Nii(R6RR](tart reachabletshatmaskR_((s//usr/lib64/python2.7/site-packages/hgext/hgk.pyt is_reachablesit^itHEADRR.s%s%s RWs s%s %s:%ss%s:%s s (t enumeratet startswithR7tappendtsettaddtpopR8R9tnodeRRRR:tmapRKRER(R,targsR RbtmaxnrR9RcRhRet stop_sha1t want_sha1R^R_targRRQtvisitRRSRgt parentstrtpptp1tp2thth1th2ti1ti2RE((RbR s//usr/lib64/python2.7/site-packages/hgext/hgk.pytrevtreesx          !! sdebug-rev-listtHtheadertts topo-orderR9RQs max-counts[OPTION]... REV...cO@sW|drd}nd}g|D] }|^q }t|||||d|ddS(sprint revisionsRRWt max_countR9N(RR(R,R trevsR/RbRaR((s//usr/lib64/python2.7/site-packages/hgext/hgk.pytrevlistJs   tviewR`tlimits!limit number of changes displayedtNUMs[-l LIMIT] [REVRANGE]t helpcategorycO@stj|}tj|jdjg|jD]"\}}|r2d||f^q2}|jd kry|d7}n|j ddd|dj|f}|j d||j |dd d S( s start interactive history viewerR.s--%s %ss--hiddenR R s %s %ss running %s t blockedtagthgk_viewN( Rt byteskwargstostchdirtroottjoint iteritemst filternameRtconfigtdebugtsystem(R,R tetcR/tktvtoptstrtcmd((s//usr/lib64/python2.7/site-packages/hgext/hgk.pyRYs> )(!t__doc__t __future__RRtmercurial.i18nRtmercurial.nodeRRRt mercurialRRRRR R tcmdtabletcommandt testedwitht configtablet configitemRR0RBR:RVR[tFalseRRtCATEGORY_CHANGE_NAVIGATIONR(((s//usr/lib64/python2.7/site-packages/hgext/hgk.pyt#sR .  9 ! %q