https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/hgext/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/hgext/__pycache__/hgk.cpython-310.pyc
o

^�Ub�/�@s�dZddlmZddlZddlmZddlmZmZddl	m
Z
mZmZm
Z
mZmZiZe�e�ZdZiZe�e�Zedd	d
d�edd
dded�fddded�fddded�fddded�fddded�fddded�fgddd�dCdd ��ZdDd!d"�Zed#ged$��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�scmutilsships-with-hg-core�hgk�paths/usr/share/mercurial/hgk)�defaultsdebug-diff-tree�pspatchsgenerate patch�rs	recursive�Pspretty�ssstdin�Cscopys
detect copies�Sssearch�s![OPTION]... NODE1 NODE2 [FILE]...T)�	inferrepocsd�fdd�	}	|dr/�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
�|ds�dSq)zdiff trees from two commitsNc
s�|dusJ�|durg}||��}||��}t�|||�}|�|||�}t|j�}|jD]}	��dt||	�t||	�|	|	f�q/|jD]}	��d|t||	�|	|	f�qH|j	D]}	��dt||	�||	|	f�q]dS)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�
__difftreeYs6

��
��
���zdifftree.<locals>.__difftreeT�stdin� r�r�prettyr)r�opts)r"�N)�fin�readline�rstripr	�	oslinesep�split�len�lookup�	changelog�parents�	catcommitrrr�difffeatureopts�git�diff�write)r*rr r!r"r2r-�liner%�diffopts�chunks�chunkr+r)r,�difftreeIs<



��rFc	CsNd|}|dur||}|�dt|��d��|��D]	}|�d|�q|��}|���dd�}|�d|��t|d�|df�d	|�	�vrV|�d
|�	�d	�|�d|�
��|�d|���t�
|tj�rx|��rx|�d
�|�d|���|dkr�|�d||�d|���f�n|�|d�|r�|�d�dSdS)N�
stree %s
rs
parent %s
�rsauthor %s %d %d
r0s	committers
committer %s
srevision %d
s
branch %s
s	obsolete
s
phase %s

�%s%s
)rAr�	changesetr<�date�description�replace�user�int�extra�rev�branchr�	isenabled�createmarkersoptr�phasestr�strip)	r*r�n�prefix�ctx�nlprefix�prKrLr+r+r,r=�s2$
��r=sdebug-merge-basesREV REVcCs8|�|�}|�|�}|j�||�}|�t|�d�dS)z"output common ancestor informationrGN)r:r;�ancestorrAr)r*rr r!rWr+r+r,�base�s

r]sdebug-cat-files[OPTION]... TYPE FILEcKs�d}|dr|j��}|sdS|�tj��d�\}}d}n|r!|s.|�td��t�	|d�|rh|dkr=|�td	��d
S|�
|�}t||||�|drb|j��}|sVdS|�tj��d�\}}ndS|s0dSdS)zcat a specific revisionrr.Nr/�    s(cat-file: type or revision not supplied
scat-file�commits.aborting hg cat-file only understands commits
r0)r4r5r6r	r7r8�warnrr�help_r:r=)r*r�type�rr2rXrBrWr+r+r,�catfile�s.


�rd�treeFcs���fdd�}dd�}g}g}	g}
d}t|�D])\}}
|
�d�r4��|
dd��}|	�|�|
�|�q|
dkr@|
���|
��qt|
�D]B\}}|�t��|g}||�|�|r�|�d�}||	vreqY�j�|�D]}|||vr||�|�|�|�||	vr�qkqk|s[qE|�D]�\}}|�vr�q��j�	|�}||
||�}|�rjd	}|rψj�|�}|d�j
kr�|d
t|d�7}|d�j
kr�|d
t|d�7}�s�|�dt|�|f�n~�dkr�|�dt|�|f�t
|�|d
|�nf�j�|�\}}tt|||f�\}}}t�jj||f�\}}|��d}|�d|||f�||
||�}|tk�r=|dk�r=|�d||f�f||
||�}|tk�rV|dk�rV|�d||f�|�d�|�rf||k�rfdS|d7}q�dS)Nc3s�t��}|}dgd}d}	||kr|}d}n||8}t�|�D]:}|||kr8dg|||||d�<n$�durQ||�vrP�||||<||��q!||�vr[d||<q!t�|ddd�D]}||dkr|||�durx||pydfVqe|dkr�dSq)Nr�dTr0���)r9r	�xrangerJ)�count�i�lrE�x��fullrr+r,�	chlogwalk�s:�
����zrevtree.<locals>.chlogwalkcSsDt|�dkrdSd}t�t|��D]}|||vr|d|>O}q|S)Nrr0)r9r	rh)�ar�	reachable�sha�maskrjr+r+r,�is_reachables�zrevtree.<locals>.is_reachabler�^r0sHEADrr/rIr_r^s%s %s:%ss%s:%s rG)�	enumerate�
startswithr:�append�set�add�popr;r<�noderrrAr=�maprQrKr)r*�argsrrn�maxnrr<rortrq�	stop_sha1�	want_sha1rirj�arg�srW�visitr[rYrs�	parentstr�pp�p1�p2�h�h1�h2�i1�i2rKr+rmr,�revtree�s�


�

���

��r�sdebug-rev-list�Hsheader�ts
topo-ordersparents�ns	max-counts[OPTION]... REV...cOs>|drd}nd}dd�|D�}t|||||d|d�dS)zprint revisions�headerr_NcSsg|]}|�qSr+r+)�.0rlr+r+r,�
<listcomp>nszrevlist.<locals>.<listcomp>�	max_countr<)r�)r*r�revsr2rn�copyr+r+r,�revlist^s
r�sview�lslimits!limit number of changes displayedsNUMs[-l LIMIT] [REVRANGE])�helpcategorycOs�t�|�}t�|j�d�dd�t�|�D��}|jdur!|d7}|�dd�d|d�|�f}|�	d	|�|j
|d
d�dS)z start interactive history viewerr/cSs g|]\}}|rd||f�qS)s--%s %sr+)r��k�vr+r+r,r�}s zview.<locals>.<listcomp>Ns--hiddenrr
s %s %ssrunning %s
shgk_view)�
blockedtag)r	�byteskwargs�os�chdir�root�join�	iteritems�
filtername�config�debug�system)r*r�etcr2�optstr�cmdr+r+r,�viewrs
�
r�)NNr3)rerF)�__doc__�
__future__rr��mercurial.i18nr�mercurial.noderr�	mercurialrrrr	r
r�cmdtable�command�
testedwith�configtable�
configitemrFr=r]rdr�r��CATEGORY_CHANGE_NAVIGATIONr�r+r+r+r,�<module>sr 	

���
@!
�
&r��


�

https://t.me/RX1948 - 2025