HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //usr/lib64/python2.7/site-packages/hgext/hgk.pyo
�
1�3\c@@s�dZddlmZddlZddlmZddlmZmZm	Z	ddl
mZmZm
Z
mZmZmZiZeje�ZdZiZeje�Zedd	d
d�eddd
ded�fddded�fddded�fddded�fddded�fddded�fgdde�ddd��Zdd�Zedged ��d!��Zed"ddded�fged#�de�ddd$��Zd%ded&�Zed'd(d)ded)�fd*d+ded+�fdd,ded,�fd-d.ded.�fgd/�d0��Zed1d2d3ded4�ed5�fged6�d7ej�d8��Z dS(9s�browse 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@s�d�fd�}x{tr�|dr��jj�}|s>Pn|jtj�jd�}|d}t|�dkr�|d}q�d}n|j	|�}|r�|j	|�}n|}|j
j|�d}|drh|dr�t�||d�nt
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||�||f�q�Wx5|D]-}�jd|
t||�||f�q�Wx5|	D]-}�jdt||�|
||f�q�WdS(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@s�d|}|dkr#||}n|jdt|j�d��x%|j�D]}|jd|�qQW|j�}|j�jdd�}|jd|j�t	|d�|df�d	|j
�kr�|jd
|j
�d	�n|jd|j��|jd|j��t
j|t
j�rP|j
�rP|jd
�qPn|jd|j��|dkr�|jd||jd|�j�f�n|j|d�|r�|jd�ndS(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	changesetR9tdatetdescriptiontreplacetusertinttextratrevtbranchRt	isenabledtcreatemarkersopttphasestrtstrip(	R,R tntprefixtctxtnlprefixRRERF((s//usr/lib64/python2.7/site-packages/hgext/hgk.pyR:�s.

!. sdebug-merge-basesREV REVcC@sN|j|�}|j|�}|jj||�}|jt|�d�dS(s"output common ancestor informations
N(R7R8tancestorRR(R,R R!R"RQ((s//usr/lib64/python2.7/site-packages/hgext/hgk.pytbase�ssdebug-cat-files[OPTION]... TYPE FILEcK@s%d}|drS|jj�}|s)dS|jtj�jd�\}}d}n4|sa|r�|jtd��tj	|d�nx�|r |dkr�|jtd	��d
S|j
|�}t||||�|dr|jj�}|s�Pn|jtj�jd�\}}q�Pq�WdS(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.pytcatfile�s,

!		
$ttreec@s��fd�}d�}g}g}	g}
d}x~t|�D]p\}}
|
jd�r��j|
d�}|	j|�|
j|�q@|
dkr@|
j�j|
��q@q@Wx�t|
�D]�\}}|jt��|g}||j|�x�|r�|jd�}||	kr!q�nx]�jj|�D]I}|||krk||j|�|j|�n||	kr4q4q4q4Wq�Wq�Wxq|�D]f\}}|�kr�q�n�jj	|�}||
||�}|r�d}|rR�jj|�}|dt
kr$|dt|d�7}n|dt
krR|dt|d�7}qRn�sx|jd	t|�|f�n^�d
kr�|jd	t|�|f�t
|�|d|�n�jj|�\}}tt|||f�\}}}t�jj||f�\}}|j�d}|jd|||f�||
||�}|tkr�|dkr�|jd
||f�fn||
||�}|tkr�|dkr�|jd
||f�n|jd�|r�||kr�Pn|d7}q�q�WdS(Nc3@smt��}|}dgd}d}xAtrh||krI|}d}n
||8}x�tj|�D]�}|||kr�dg|||||)Pn�dk	r�||�kr��||||<||j�q�qc||�krcd||<qcqcWxYtj|ddd�D]>}||dkr||�dk	rF||pIdfVqqW|dkr(Pq(q(WdS(Niidii����(R6R0RtxrangeRRD(tcounttitlRAtx(tfullR (s//usr/lib64/python2.7/site-packages/hgext/hgk.pyt	chlogwalk�s0
		
 ,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_reachable�sit^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.pytrevtree�sx	

		 !!
sdebug-rev-listtHtheadertts
topo-orderR9RQs	max-counts[OPTION]... REV...cO@sW|drd}nd}g|D]}|^q }t|||||d|d�dS(sprint revisionsR�RWt	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@s�tj|�}tj|j�djg|j�D]"\}}|r2d||f^q2�}|jd
kry|d7}n|j	dd�d|dj|�f}|j
d|�|j|dd	�d
S(s start interactive history viewerR.s--%s %ss--hiddenRRs %s %ssrunning %s
t
blockedtagthgk_viewN(Rtbyteskwargstostchdirtroottjoint	iteritemst
filternameRtconfigtdebugtsystem(R,R tetcR/tktvtoptstrtcmd((s//usr/lib64/python2.7/site-packages/hgext/hgk.pyR�Ys>
)(!t__doc__t
__future__RR�tmercurial.i18nRtmercurial.nodeRRRt	mercurialRRRRR	R
tcmdtabletcommandt
testedwithtconfigtablet
configitemRR0RBR:RVR[tFalseR�R�tCATEGORY_CHANGE_NAVIGATIONR�(((s//usr/lib64/python2.7/site-packages/hgext/hgk.pyt<module>#sR.	9!%q