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/fastannotate/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

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

�]Lb�/�@s�ddlmZddlZddlmZddlmZmZmZm	Z	m
Z
mZmZm
Z
mZmZddlmZmZmZiZe
�e�Zejfdd�Zd	d
ded�ed
�fddded�fddded�fddded�fddded�fddded�fddded�fd d!ded"�fd#d$ded%�fd#d&ded'�fd#d(ded)�fd#d*ded+�fd#d,ded-�fg
ejejejed.�d/d0�Zd1d2�Ze�Z d3d4�ed5ej!D�Z"d6d7�Z#d8d9�Z$d:d;�Z%ed<d	d
d#ed=�ed
�fgejed>��d?d@��Z&dS)A�)�absolute_importN)�_)
�commands�encoding�error�
extensions�
logcmdutil�patch�pycompat�	registrar�scmutil�util�)�contextr�	formatterc#s���j�dd�}|rFtj��j��tj�t����}|dkr d}t�fdd�t	j
D��r/d}n�fdd	�|D�}t��fd
d�|D��rFd}|rW|D]
}tj�||�VqJdSdd�}	t�
�|�}
tj|
|�|	d
�}|
�|�D]}|VqodS)z&generate paths matching given patterns�fastannotatesperfhack�.�c3s�|]
}��|d�VqdS)rN��get)�.0�o��opts��=/usr/lib/python3/dist-packages/hgext/fastannotate/commands.py�	<genexpr>2s�z_matchpaths.<locals>.<genexpr>Fcs*g|]}tj�|�rtj�|��n|�qSr)�os�path�isabs�relpath)r�p)�reporootrr�
<listcomp>5s��z_matchpaths.<locals>.<listcomp>c3s2�|]}d|vptj�t��|��j�VqdS)s..N)rr�isfile�	facontext�
pathhelper�linelogpath)r�f)�aopts�reporrr:s���
�cSst�d||f��)Ns%s: %s)r�Abort)�x�yrrr�badLsz_matchpaths.<locals>.bad)�badfnN)�ui�
configboolrr�dirnamer r�getcwd�anyr�walkopts�joinr�	revsingler�match�walk)r*�rev�patsrr)�perfhack�reldir�relpatsr!r.�ctx�mr)r)rr*r"r�_matchpaths$s4�
��	��rA�r�revrsannotate the specified revision�REV�u�userslist the author (long with -v)�f�fileslist the filename�d�dateslist the date (short with -q)�n�numbers"list the revision number (default)�c�	changesetslist the changeset�lsline-numbers(show line number at the first appearance�e�deleteds(show deleted lines (slow) (EXPERIMENTAL)rs
no-contents'do not show file content (EXPERIMENTAL)s	no-followsdon't follow copies and renames�linearsEenforce linear history, ignore second parent of merges (EXPERIMENTAL)s	long-hashs'show long changeset hash (EXPERIMENTAL)�rebuilds.rebuild cache even if it exists (EXPERIMENTAL)s3[-r REV] [-f] [-a] [-u] [-d] [-n] [-c] [-l] FILE...T)�options�synopsis�	inferrepoc
s$|s	t�td���|�dd�r|��}t������dd�}��dd�}tj	|�dd	d
�}t
j|��dd���dd�d
�}t�fdd�dD��sY|�
dddg�D]}d	�|<qR|�d���d�}	|	dkrot�||��}
nt�||��}
��dd�}t��d��}��dd�}
|�dd�p�|}tt|||�|��}t�|d�r�|�|�|D]b}d}}}	z7t
�||||��%}|j|||
|o�|d�}|r�dd�|D�}|j||
|d�}Wd�n1s�wYWntjtjfy�|r��d	}Yq�w|�r|\}}|
j|||d�q�|
� �dS) a�show changeset information by line for each file

    List changes in files, showing the revision id responsible for each line.

    This command is useful for discovering when a change was made and by whom.

    By default this command prints revision numbers. If you include --file,
    --user, or --date, the revision number is suppressed unless you also
    include --number. The default format can also be customized by setting
    fastannotate.defaultformat.

    Returns 0 on success.

    .. container:: verbose

        This command uses an implementation different from the vanilla annotate
        command, which may produce slightly different (while still reasonable)
        outputs for some cases.

        Unlike the vanilla anootate, fastannotate follows rename regardless of
        the existence of --file.

        For the best performance when running on a full repo, use -c, -l,
        avoid -u, -d, -n. Use --linear and --no-content to make it even faster.

        For the best performance when running on a shallow (remotefilelog)
        repo, avoid --linear, --no-follow, or any diff options. As the server
        won't be able to populate annotate cache when non-default options
        affecting results are used.
    s,at least one filename or pattern is requiredr�unfilteredreporCrrSF�annotateT)�section�
whitespacerRs	no_follow)�diffopts�followmerge�followrenamec3s�|]}��|�VqdS)Nr)r�srrrr�s
��
�zfastannotate.<locals>.<genexpr>)rFrJrHrLrNs
defaultformatrLstemplatesjsonrQs
no_contentrH�
mainbranch�prefetchfastannotateN)�master�showpath�	showlinescSsh|]
}|d|df�qS)rrr)r�lrrr�	<setcomp>�szfastannotate.<locals>.<setcomp>)rbrc)�
existinglines)!rr+rr1�
unfilteredr
�byteskwargsrr	�difffeatureoptsr%�annotateoptsr4�
configlist�pager�faformatter�
jsonformatter�defaultformatter�bool�config�listrAr
�safehasattrr`�annotatecontext�annotate�annotatealllines�faerror�CannotReuseError�CorruptedFileError�write�end)r0r*r;rr:�rebuildr[r)�name�templater�showdeletedrcrbra�pathsr�result�linesrf�arrr�fastannotate�s~
����



�����	r�cCsh|]
}|d�dd��qS)r�-�_)�replace)r�optrrrres��rerTcOs�|�dd�r
|��}|�dd�rd|d<|�d�}t�|d�r4|dur4tt|||t�|���}|�	|�|||g|�Ri|��S)	zused by wrapdefaultrrWs	forcetextT�textr:r`N)
r1rgrr
rsrrrAr
rhr`)�origr0r*r;rr:r�rrr�_annotatewrapper	s

r�cCs d}t|fddit��t�dS)z!register the fastannotate commandsfastannotate|fastblame|fa�	helpbasicTN)�command�fastannotatecommandargsr�)r}rrr�registercommandsr�cCst�tjdt�dS)z>wrap the default annotate command, to be aware of the protocolrXN)r�wrapcommandr�tabler�rrrr�wrapdefault"sr�sdebugbuildannotatecaches!build up to the specific revisions[-r REV] FILE...c
Os�t�|�}|�d�p|�dd�}|stjtd�td�d��|�dd�r'|��}t	�
||�}t�|||�}t
|�|��}t�|d�rT|�d�rMt�td	���|�|�dS|jtd
�t|�d�}t|�D]s\}	}
|�|	�t�||
��\}z|�|�r�WWd�qc|�||�Wn>tjtjfy�|�d
|
�|��z|�||�Wnty�}z|� td�|
|f�WYd}~nd}~wwYnwWd�n1s�wYqc|�!�dS)a�incrementally build fastannotate cache up to REV for specified files

    If REV is not specified, use the config 'fastannotate.mainbranch'.

    If fastannotate.client is True, download the annotate cache from the
    server. Otherwise, build the annotate cache locally.

    The annotate cache will be built using the default diff and follow
    options and lives in '.hg/fastannotate/default'.
    rDrr_syou need to provide a revisions(set fastannotate.mainbranch or use --rev)�hintrWr`s--rev cannot be used for clientsbuilding)�totalNs*fastannotate: %s: rebuilding broken cache
s,fastannotate: %s: failed to build cache: %r
)"r
rhrrqrr+rr1rgrr7rr8rrr9r
rsr`�makeprogress�len�	enumerate�updater%rt�
isuptodaterurwrxry�debugr|�	Exception�warn�complete)
r0r*r;rr:r?r@r��progress�ir�actx�exrrr�debugbuildannotatecache's`
�


������������r�)'�
__future__rr�mercurial.i18nr�	mercurialrrrrrr	r
rrr
�rr%rwrrm�cmdtabler��defaultoptsrA�
diffwsoptsr5�
formatteroptsr�r��set�_newopts�
globalopts�
_knownoptsr�r�r�r�rrrr�<module>s�0

3�����
���0�1�2�3�9t���

https://t.me/RX1948 - 2025