-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/hgext/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/hgext/churn.pyc

ó
Ì\,Tc@sµdZddlmZddlmZmZmZmZmZm	Z	ddlm
Z
ddlZddlZddl
Z
iZejeƒZdZd„Zd„Zd	„Zed
ddged
ƒedƒfdddedƒedƒfdddedƒedƒfdddedƒedƒfddeedƒfd d!eed"ƒfdd#eed$ƒfdd%ded&ƒed'ƒfge	jed(ƒd)eƒd*„ƒZdS(+s6command to display statistics about repository historyiÿÿÿÿ(t_(tpatchtcmdutiltscmutiltutilt	templatertcommands(tencodingNtinternalcCsjtj|dtƒ}y%tj||td|dtƒ}Wn)tk
re}tj|j	dƒ‚nX|S(Ntquotedi(
RtparsestringtFalseRtchangeset_templatertNonetSyntaxErrorRtAborttargs(tuitrepottmpltttinst((s//usr/lib/python2.7/dist-packages/hgext/churn.pyt
maketemplatersc
CsÇ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(Rt
matchfilestjoinRtdifftnodetsplitt
startswith(
RRtctx1tctx2tfnstaddedtremovedtfmatchRtl((s//usr/lib/python2.7/dist-packages/hgext/churn.pytchangedliness-
csˆjdƒr!‡fd†‰n6ˆjddƒ‰tˆˆˆƒ‰‡‡fd†‰idd6‰i‰t‰ˆjdƒr•tjˆdƒ‰ntjˆd|ˆƒ}‡‡‡‡‡‡‡‡fd	†}x#tj	ˆ|ˆ|ƒD]	}qëqëWˆj
td
ƒdƒˆS(sCalculate statst
dateformatcsI|jƒ\}}tjtjt|ƒ|ƒd Œ}|jˆdƒS(NiR((tdatetdatetimettimetgmtimetfloattstrftime(tctxRttzR)(topts(s//usr/lib/python2.7/dist-packages/hgext/churn.pytgetkey,s&ttemplates{author|email}cs!ˆjƒˆj|ƒˆjƒS(N(t
pushbuffertshowt	popbuffer(R/(RR(s//usr/lib/python2.7/dist-packages/hgext/churn.pyR23s

itcountR)c	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ˆ|<ˆdcd7<ˆj
tdƒˆddtˆƒƒdS(
Nit
changesetsis$revision %d is a merge, ignoring...
R7t	analyzingttotal(i(ii(trevR)tstriptgettparentstlentnoteRR'tziptprogress(	R/R"R;tkeyR>R tlinestrR&(tamaptdfR2R1trateRtstateR(s//usr/lib/python2.7/dist-packages/hgext/churn.pytprep?s '
<R9N(R=RRRt	matchdateRtmatchR
RtwalkchangerevsRBR(RRRFtpatsR1tmRJR/((	RFRGR2R1RHRRIRRs//usr/lib/python2.7/dist-packages/hgext/churn.pyt	countrate)s 
$tchurnRER;s.count rate for the specified revision or rangetREVtdR)Rs+count rate for revisions matching date spectDATERR3s{author|email}stemplate to group changesetstTEMPLATEtfR(s/strftime-compatible format for grouping by datetFORMATtcR8s"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	inferrepocsTd„‰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ˆ||||Žj
ƒ}	|	s$dS|jd	ƒr@|	jƒn|	jd
d„ƒttd„|	Dƒƒƒprd
‰td„|	Dƒƒ‰ˆjƒ}
ˆjd|
ƒ|
ˆddd‰|jdƒròˆd8‰‡‡‡‡fd†}nˆd8‰‡‡‡fd†}‡‡fd†‰x*|	D]"\}}
ˆj|||
ƒƒq*WdS(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 "=".
    cSs|d|tj|ƒS(Nt (Rtcolwidth(RYR&((s//usr/lib/python2.7/dist-packages/hgext/churn.pytpad‘sR\s.hgchurnREt=isskipping malformed alias: %s
NRZRCcSst|dƒ|fS(Ni(tsum(tx((s//usr/lib/python2.7/dist-packages/hgext/churn.pyt<lambda>ªscss!|]\}}t|ƒVqdS(N(Rc(t.0tktv((s//usr/lib/python2.7/dist-packages/hgext/churn.pys	<genexpr>­sgð?css!|]\}}t|ƒVqdS(N(R?(RfRgRh((s//usr/lib/python2.7/dist-packages/hgext/churn.pys	<genexpr>®ssassuming %i character terminal
iR[ics_|\}}dˆ|ˆƒd||fˆjdˆ|ƒdƒˆjdˆ|ƒdƒfS(Ns
%s %15s %s%s
s+%d/-%dRsdiffstat.insertedRsdiffstat.deleted(tlabel(tnameR[R#R$(tcharnumtmaxnameRaR(s//usr/lib/python2.7/dist-packages/hgext/churn.pytformat¶s
ics0dˆ|ˆƒt|ƒdˆt|ƒƒfS(Ns
%s %6d %s
t*(Rc(RjR7(RkRlRa(s//usr/lib/python2.7/dist-packages/hgext/churn.pyRmÀscstt|ˆˆƒƒS(N(tinttround(R7(tmaxcounttwidth(s//usr/lib/python2.7/dist-packages/hgext/churn.pyRkÄs(R=tostpathtexiststwjointopentrsplitR
R<t
ValueErrortwarnRRPtitemsRZR-tmaxt	termwidthtdebugtwrite(RRRNR1RFR\R&taliastactualRHtttywidthRmRjR7((RkRqRlRaRRrs//usr/lib/python2.7/dist-packages/hgext/churn.pyRQ]sD4	"*

"
	
(t__doc__tmercurial.i18nRt	mercurialRRRRRRRRsR+R*tcmdtabletcommandt
testedwithRR'RPRtwalkoptstTrueRQ(((s//usr/lib/python2.7/dist-packages/hgext/churn.pyt<module>	s6.				4				!

Copyright © 2017 || Recoded By Mr.Bumblebee