HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //proc/self/root/proc/thread-self/root/lib64/python2.7/site-packages/hgext/churn.pyo
�
1�3\c@`s�dZddlmZmZddlZddlZddlZddlmZddl	m
Z
mZmZm
Z
mZmZmZddlmZiZeje�ZdZd�Zd	�Zed
ddged
�ed�fddded�ed�fddded�ed�fddded�ed�fddded�ed�fd d!eed"�fd#d$eed%�fdd&eed'�fdd(ded)�ed*�fg	e
jed+�d,ejd-e�d.��ZdS(/s6command to display statistics about repository historyi(tabsolute_importtdivisionN(t_(tcmdutiltencodingt
logcmdutiltpatchtpycompatt	registrartscmutil(tdateutilsships-with-hg-corec
C`s�d	\}}tj||�}djtj||j�|j�|��}xo|jd�D]^}	|	jd�r�|	jd�r�|d7}q[|	jd�r[|	jd�r[|d7}q[q[W||fS(
Nits
t+s+++ it-s--- (ii(R	t
matchfilestjoinRtdifftnodetsplitt
startswith(
tuitrepotctx1tctx2tfnstaddedtremovedtfmatchRtl((s1/usr/lib64/python2.7/site-packages/hgext/churn.pytchangedlines%s-
c`sDtj����jd�r0�fd��nE�jd�pK�jd��tj�������fd���jtd�dtd�d	t����i�t��jd
�r�t	j
�d
��ntj�d|��}��������fd�}x#tj�|�|�D]	}q)q)W�j��S(
sCalculate statst
dateformatc`s[|j�\}}tjtjt|�|�d �}tj|jtj�d���S(NiR(	tdatetdatetimettimetgmtimetfloatRt
strtolocaltstrftimetstrfromlocal(tctxttttzR(topts(s1/usr/lib64/python2.7/site-packages/hgext/churn.pytgetkey4s&toldtemplatettemplatec`s!�j��j|��j�S(N(t
pushbuffertshowt	popbuffer(R'(ttmplR(s1/usr/lib64/python2.7/site-packages/hgext/churn.pyR+<s

t	analyzingtunitt	revisionsttotalRc	`s/|j�}�r-�|j�d�r-dS�|�j�}�j||�}�jd�r��j|d�dddf�|<n�|j�}t|�dkr��jtd�|f�dS|d}t��|||�}gt	�j|d�|�D]\}}||^q�|<�j
�dS(Nit
changesetsis$revision %d is a merge, ignoring...
(i(ii(trevRtstriptgettparentstlentnoteRRtzipt	increment(	R'RR7tkeyR:RtlinestrR(tamaptdfR+R*tprogresstrateRR(s1/usr/lib64/python2.7/site-packages/hgext/churn.pytprepIs'
<N(RtbyteskwargsR9Rt
maketemplatertmakeprogressRR;tFalseR
t	matchdateR	tmatchtNoneRtwalkchangerevstcomplete(RRRBtpatsR*tmRFR'((	RBRCR+R*RDRERR1Rs1/usr/lib64/python2.7/site-packages/hgext/churn.pyt	countrate0s$$
tchurnRAR7s/count rate for the specified revision or revsettREVtdRRs+count rate for revisions matching date spectDATER(R,s)template to group changesets (DEPRECATED)tTEMPLATEtTR-s{author|email}stemplate to group changesetstfRs/strftime-compatible format for grouping by datetFORMATtcR6s"count rate by number of changesetststsorts$sort by key (default: sort by count)tdiffstats&display added/removed lines separatelytaliasessfile with email aliasestFILEs3hg churn [-d DATE] [-r REV] [--aliases FILE] [FILE]thelpcategoryt	inferrepoc`sZd��i}|jd�}|rRtjj|jd��rR|jd�}n|r�x�t|d�D]�}yD|jd|kr�dp�dd�\}}|j�||j�<Wqht	k
r�|j�}|rh�j
td�|�qhqhqhXqhWntt
�||||�j��}	|	s*dS|jd	�rF|	j�n|	jd
d��ttd�|	D���pxd
�td�|	D����j�}
�jd|
�|
�ddd�|jd�r��d8�����fd�}n�d8����fd�}��fd��x*|	D]"\}}
�j|||
��q0WdS(s�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

    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 "=".
    cS`s|d|tj|�S(Nt (Rtcolwidth(R\R((s1/usr/lib64/python2.7/site-packages/hgext/churn.pytpad�sR_s.hgchurntrbt=isskipping malformed alias: %s
NR]R?cS`st|d�|fS(Ni(tsum(tx((s1/usr/lib64/python2.7/site-packages/hgext/churn.pyt<lambda>�Rcs`s!|]\}}t|�VqdS(N(Rh(t.0tktv((s1/usr/lib64/python2.7/site-packages/hgext/churn.pys	<genexpr>�sg�?cs`s!|]\}}t|�VqdS(N(R;(RkRlRm((s1/usr/lib64/python2.7/site-packages/hgext/churn.pys	<genexpr>�ssassuming %i character terminal
iR^ic`s_|\}}d�|��d||f�jd�|�d��jd�|�d�fS(Ns
%s %15s %s%s
s+%d/-%dRsdiffstat.insertedR
sdiffstat.deleted(tlabel(tnameR^RR(tcharnumtmaxnameReR(s1/usr/lib64/python2.7/site-packages/hgext/churn.pytformat�s
ic`s0d�|��t|�d�t|��fS(Ns
%s %6d %s
t*(Rh(Rotcount(RpRqRe(s1/usr/lib64/python2.7/site-packages/hgext/churn.pyRr�sc`st|���S(N(tint(Rt(tmaxcounttwidth(s1/usr/lib64/python2.7/site-packages/hgext/churn.pyRp�s(R9tostpathtexiststwjointopentrsplitRMR8t
ValueErrortwarnRtlistRRtitemsR]R#tmaxt	termwidthtdebugtwrite(RRRPR*RBR_RtaliastactualREtttywidthRrRoRt((RpRvRqReRRws1/usr/lib64/python2.7/site-packages/hgext/churn.pyRSfsD7	"*
$
"
	
(t__doc__t
__future__RRR RxR!tmercurial.i18nRt	mercurialRRRRRRR	tmercurial.utilsR
tcmdtabletcommandt
testedwithRRRRJtwalkoptstCATEGORY_MAINTENANCEtTrueRS(((s1/usr/lib64/python2.7/site-packages/hgext/churn.pyt<module>	s>4			6					!