File: //usr/lib/python3/dist-packages/hgext/__pycache__/hgk.cpython-310.pyc
o
^�Ub�/ � @ s� d Z ddlmZ ddlZddlmZ ddlmZmZ ddl m
Z
mZmZm
Z
mZmZ i Ze�e�ZdZi Ze�e�Zedd d
d� edd
dded�fddded�fddded�fddded�fddded�fddded�fgddd�dCdd ��ZdDd!d"�Zed#g ed$��d%d&� �Zed'ddded�fged(�dd�dCd)d*��ZdEd-d.�Zed/d0d1ded1�fd2d3ded3�fd
d4ded4�fd5d6ded6�fgd7�d8d9� �Zed:d;d<ded=�ed>�fged?�ejd@�dAdB� �ZdS )Fa� 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.
� )�absolute_importN)�_)�nullrev�short)�commands�obsolete�patch�pycompat� registrar�scmutils ships-with-hg-core� hgk� paths /usr/share/mercurial/hgk)�defaults debug-diff-tree� ps patchs generate patch� rs recursive� Ps pretty� ss stdin� Cs copys
detect copies� Ss search� s! [OPTION]... NODE1 NODE2 [FILE]...T)� inferrepoc s d� fdd� } |d r/� j �� }|sdS |�tj��d�}|d }t|�dkr-|d }nd}|�|�}|r<|�|�}n
|}|j� |�d }|d rz|d
rUt
� ||d� t�|| |�}t
�� �} d| _t
j||||| d�}
|
D ]}� �|� qqn|||||d
� |d s�dS q)zdiff trees from two commitsNc
s� |d usJ �|d u rg }| | � � }| | � � }t�| | |�}| �|||�}t| j�}|jD ]} � �dt|| �t|| �| | f � q/|jD ]} � �d|t|| �| | f � qH|j D ]} � �dt|| �|| | f � q]d S )Ns :100664 100664 %s %s M %s %s
s :000000 100664 %s %s N %s %s
s :100664 000000 %s %s D %s %s
)
�manifestr �match�statusr �nullid�modified�writenoi18n�added�removed)
�repo�node1�node2�files�mmap�mmap2�m�st�empty�f��ui� �+/usr/lib/python3/dist-packages/hgext/hgk.py�
__difftreeY s6
��
��
���zdifftree.<locals>.__difftreeT�stdin� r � r �prettyr )r �opts)r"