403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib64/python3.9/site-packages/hgext/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/hgext/__pycache__/churn.cpython-39.pyc
a

�+�b��@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}	|rP|	�d�rP|d7}q4|rh|	�d�rh|d7}q4|	�d�rxd	}q4|	�d
�r4d}q4||fS)N�rr�F�
�+��-�@T�d)�joinr	�diffZnode�split�
startswith)
�ui�repo�ctx1Zctx2�fmatch�added�removedrZinhunk�l�r �1/usr/lib64/python3.9/site-packages/hgext/churn.py�changedlines&s



r"c
s�t������d�r"�fdd��n0��d�p4��d��t��������fdd���jtd�td�t��d	��i��������fd
d�}tj|��d�d
�d�dd�}t�	�|�\}}t
��|||�D]}	q�qЈ���S)zCalculate stats�
dateformatcsF|��\}}tjt�t|�|�dd��}t�|�t��d���S)N�r#)	�date�datetime�time�gmtime�floatrZ
strtolocal�strftimeZstrfromlocal)�ctx�tZtzr%)�optsr r!�getkey;s
 �zcountrate.<locals>.getkey�oldtemplate�templatecs�����|����S�N)Z
pushbufferZshowZ	popbuffer)r+)�tmplrr r!r.Fs
s	analyzings	revisions)Zunit�totalcs�|��}�|���}��||�}��d�rH��|d�dddf�|<nd|��}t|�dkrt��td�|f�dS|d}t��|||�}dd�t��|d�|�D��|<��	�dS)	N�
changesets)rrrs$revision %d is a merge, ignoring...
cSsg|]\}}||�qSr r )�.0�rrr r r!�
<listcomp>^rz+countrate.<locals>.prep.<locals>.<listcomp>r
)
�rev�strip�get�parents�lenZnoterr"�zipZ	increment)r+rr8�keyr;r�lines)�amapr.r-�progress�raterrr r!�prepPs
 zcountrate.<locals>.prep�rev�datesincludesexclude)�patsr-Zrevspecr%Zinclude_patsZexclude_pats)
r
Zbyteskwargsr:rZ
maketemplaterZmakeprogressrr<�walkoptsZ
makewalkerrZwalkchangerevsZcomplete)
rrr@rFr-rCZwoptsZrevsZmakefilematcherr+r )r@r.r-rArBrr2rr!�	countrate6s0

��rHschurn�rrDs/count rate for the specified revision or revsetsREVrrErs+count rate for revisions matching date specsDATE�tr/s)template to group changesets (DEPRECATED)sTEMPLATE�Tr0s{author|email}stemplate to group changesets�fr#s/strftime-compatible format for grouping by datesFORMAT�cr4Fs"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)ZhelpcategoryZ	inferrepoc	s�dd��i}|�d�}|s6tj�|�d��r6|�d�}|r�t|d�D]j}z0|�d|vrZdp\dd�\}}|��||��<WqDty�|��}|r���	t
d	�|�YqDYqD0qDtt�||g|�Ri|���
��}	|	s�dS|�d
�r�|	��n|	jdd�d
�ttdd�|	D����pd�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� )rZcolwidth)�srr r r!�pad�szchurn.<locals>.pad�aliasess.hgchurnsrb�=Nrsskipping malformed alias: %s
�sortcSst|d�|fS)Nr��sum)�xr r r!�<lambda>�rzchurn.<locals>.<lambda>)r>css|]\}}t|�VqdSr1rU�r5�k�vr r r!�	<genexpr>�rzchurn.<locals>.<genexpr>g�?css|]\}}t|�VqdSr1)r<rYr r r!r\�rsassuming %i character terminal
��diffstat�c	sF|\}}d�|��d||f��d�|�d���d�|�d�fS)Ns
%s %15s %s%s
s+%d/-%drsdiffstat.insertedrsdiffstat.deleted)Zlabel)�namer^rr)�charnum�maxnamerQrr r!�format�s
�zchurn.<locals>.formatr$cs$d�|��t|�d�t|��fS)Ns
%s %6d %s
�*rU)r`�count)rarbrQr r!rc�s
�cst|���Sr1)�int)re)�maxcount�widthr r!raszchurn.<locals>.charnum)r:�os�path�existsZwjoinr�rsplitr9�
ValueError�warnr�listrH�itemsrTr)�maxZ	termwidth�debug�write)rrrFr-r@rRr�alias�actualrBZttywidthrcr`rer )rargrbrQrrhr!�churnssDX

"


rv)�__doc__Z
__future__rrr&rir'Zmercurial.i18nrZmercurial.pycompatrZ	mercurialrrrr	r
rrZcmdtableZcommandZ
testedwithr"rHrGZCATEGORY_MAINTENANCErvr r r r!�<module>	sp$

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

Youez - 2016 - github.com/yon3zu
LinuXploit