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__/churn.cpython-310.pyc
o

�]Lb��@sVdZddlmZmZddlZddlZddlZddlmZddl	m
Z
ddlmZm
Z
mZmZmZmZmZiZe�e�ZdZdd	�Zd
d�Zedd
dged�ed�fddded�ed�fddded�ed�fddded�ed�fddded �ed!�fd"d#d$ed%�fd&d'd$ed(�fdd)d$ed*�fdd+ded,�ed-�fg	ejed.�ejd/d0�d1d2��ZdS)3z6command to display statistics about repository history�)�absolute_import�divisionN)�_)�open)�cmdutil�encoding�
logcmdutil�patch�pycompat�	registrar�scmutilsships-with-hg-corec
Cs�d\}}d�t�||��|��|��}d}|�d�D])}	|r(|	�d�r(|d7}q|r4|	�d�r4|d7}q|	�d�r<d	}q|	�d
�rCd}q||fS)N�rr�F�
�+��-�@T�d)�joinr	�diff�node�split�
startswith)
�ui�repo�ctx1�ctx2�fmatch�added�removedr�inhunk�l�r#�-/usr/lib/python3/dist-packages/hgext/churn.py�changedlines&s



�r%c
s�t������d�r�fdd��n��d�p��d��t��������fdd���jtd�td�t��d	��i��������fd
d�}tj|��d�d
�d�dd�}t�	�|�\}}t
��|||�D]}	qh����S)zCalculate stats�
dateformatcsF|��\}}tjt�t|�|�dd��}t�|�t��d���S)N�r&)	�date�datetime�time�gmtime�floatr�
strtolocal�strftime�strfromlocal)�ctx�t�tzr()�optsr#r$�getkey;s
 �zcountrate.<locals>.getkey�oldtemplate�templatecs�����|����S�N)�
pushbuffer�show�	popbuffer)r0)�tmplrr#r$r4Fs
s	analyzings	revisions)�unit�totalcs�|��}�|���}��||�}��d�r$��|d�dddf�|<n2|��}t|�dkr:��td�|f�dS|d}t��|||�}dd�t��|d�|�D��|<��	�dS)	N�
changesets)rrrs$revision %d is a merge, ignoring...
cSsg|]\}}||�qSr#r#)�.0�rr"r#r#r$�
<listcomp>^sz+countrate.<locals>.prep.<locals>.<listcomp>r
)
�rev�strip�get�parents�len�noterr%�zip�	increment)r0rrB�keyrEr�lines)�amapr4r3�progress�raterrr#r$�prepPs
 zcountrate.<locals>.prep�rev�datesincludesexclude)�patsr3�revspecr(�include_pats�exclude_pats)
r
�byteskwargsrDr�
maketemplater�makeprogressrrF�walkopts�
makewalkerr�walkchangerevs�complete)
rrrLrRr3rO�wopts�revs�makefilematcherr0r#)rLr4r3rMrNrr;rr$�	countrate6s0

��r`schurn�rrPs/count rate for the specified revision or revsetsREVrrQrs+count rate for revisions matching date specsDATE�tr5s)template to group changesets (DEPRECATED)sTEMPLATE�Tr6s{author|email}stemplate to group changesets�fr&s/strftime-compatible format for grouping by datesFORMAT�cr>Fs"count rate by number of changesets�sssorts$sort by key (default: sort by count)sdiffstats&display added/removed lines separatelysaliasessfile with email aliasessFILEs3hg churn [-d DATE] [-r REV] [--aliases FILE] [FILE]T)�helpcategory�	inferrepoc	s�dd��i}|�d�}|stj�|�d��r|�d�}|rUt|d�D]2}z|�d|vr-dp.dd�\}}|��||��<Wq"tyT|��}|rR��	t
d	�|�Yq"wtt�||g|�Ri|���
��}	|	sjdS|�d
�rt|	��n|	jdd�d
�ttdd�|	D���p�d�tdd�|	D������}
��d|
�|
�ddd�|�d�r��d8�����fdd�}n�d8����fdd�}��fdd��|	D]\}}
��|||
��q�dS)a�histogram of changes to the repository

    This command will display a histogram representing the number
    of changed lines or revisions, grouped according to the given
    template. The default template will group changes by author.
    The --dateformat option may be used to group the results by
    date instead.

    Statistics are based on the number of changed lines, or
    alternatively the number of matching revisions if the
    --changesets option is specified.

    Examples::

      # display count of changed lines for every committer
      hg churn -T "{author|email}"

      # display daily activity graph
      hg churn -f "%H" -s -c

      # display activity of developers by month
      hg churn -f "%Y-%m" -s -c

      # display count of lines changed in every year
      hg churn -f "%Y" -s

      # display count of lines changed in a time range
      hg churn -d "2020-04 to 2020-09"

    It is possible to map alternate email addresses to a main address
    by providing a file using the following format::

      <alias email> = <actual email>

    Such a file may be specified with the --aliases option, otherwise
    a .hgchurn file will be looked for in the working directory root.
    Aliases will be split from the rightmost "=".
    cSs|d|t�|�S)N� )r�colwidth)�sr"r#r#r$�pad�szchurn.<locals>.pad�aliasess.hgchurnsrb�=Nrsskipping malformed alias: %s
�sortcSst|d�|fS)Nr��sum)�xr#r#r$�<lambda>�szchurn.<locals>.<lambda>)rJcss�|]	\}}t|�VqdSr7rp�r?�k�vr#r#r$�	<genexpr>���zchurn.<locals>.<genexpr>g�?css�|]	\}}t|�VqdSr7)rFrtr#r#r$rw�rxsassuming %i character terminal
��diffstat�c	sF|\}}d�|��d||f��d�|�d���d�|�d�fS)Ns
%s %15s %s%s
s+%d/-%drsdiffstat.insertedrsdiffstat.deleted)�label)�namerzrr )�charnum�maxnamerlrr#r$�format�s
�zchurn.<locals>.formatr'cs$d�|��t|�d�t|��fS)Ns
%s %6d %s
�*rp)r}�count)r~rrlr#r$r��s
�cst|���Sr7)�int)r�)�maxcount�widthr#r$r~szchurn.<locals>.charnum)rD�os�path�exists�wjoinr�rsplitrC�
ValueError�warnr�listr`�itemsror,�max�	termwidth�debug�write)rrrRr3rLrmr"�alias�actualrN�ttywidthr�r}r�r#)r~r�rrlrr�r$�churnssHX

�"



�r�)�__doc__�
__future__rrr)r�r*�mercurial.i18nr�mercurial.pycompatr�	mercurialrrrr	r
rr�cmdtable�command�
testedwithr%r`rY�CATEGORY_MAINTENANCEr�r#r#r#r$�<module>sr$

=������)�*�0

https://t.me/RX1948 - 2025