�
�c@s-ddklZlZlZlZddklZddkZddkZddk Z ddk
Z
ddkZddkZddk
Z
ddkZddkZddkZddkZddkZddkZdZed�Zed�Zd�Zd�Zd �Zd
�Zd�Zd�Zddddd
�Z!ddddddd�Z"d�Z#ghedd�Zd�Z$d�Z%d�Z&ghddd�Z'ed�Z(ddddd�Z)de*fd��YZ+de+fd��YZ,eed�Z-d�Z.d�Z/d �Z0d!�Z1d"�Z2dS(#i�(thextnullidtnullrevtshort(t_Nt:c Cs
h}h}x�i�D]�}|id�id�}d}||jo
|}n8|p0x-|D]!}|i|�o|}PqbqbWn|dj oT|did�p|id�o|||f||<q�|||f||<qqW|o|o
|}n|S(s�
Return cmd -> (aliases, command table entry)
for each matching command.
Return debug commands (or their aliases) only if no normal command matches.
t^t|itdebugN(tkeystlstriptsplittNonet
startswith( tcmdttabletstricttchoicetdebugchoicetetaliasestfoundta((s$/sys/lib/python/mercurial/cmdutil.pytfindpossibles*
$
cCs�t|||�}||jo||Snt|�djo,|i�}|i�ti||��n|o|i�dSnti|��dS(s9Return (aliases, command table entry) for command string.iiN(RtlenR tsortterrortAmbiguousCommandtvaluestUnknownCommand(RRRRtclist((s$/sys/lib/python/mercurial/cmdutil.pytfindcmd-s
cCs�|ii�dtjotitd���n|i�d \}}}}|p|p|p|otitd���ndS(Nisoutstanding uncommitted mergeisoutstanding uncommitted changes(tdirstatetparentsRtutiltAbortRtstatus(trepotmodifiedtaddedtremovedtdeleted((s$/sys/lib/python/mercurial/cmdutil.pytbail_if_changed>s
cCs�|id�}|id�}|o |otitd���n|o{|oty6|djotii�}nt|�i�}Wq�tj
o+}titd�||i f��q�Xn|S(s3 get the log message according to -m and -l option tmessagetlogfiles6options --message and --logfile are mutually exclusivet-s"can't read commit message '%s': %s(
tgetR"R#RtsyststdintreadtopentIOErrortstrerror(toptsR+R,tinst((s$/sys/lib/python/mercurial/cmdutil.pyt
logmessageEs
cCs�|id�}|oeyt|�}Wn(tj
otitd���nX|djotitd���q�n
ti}|S(s0get the log limit according to option -l/--limittlimits limit must be a positive integerislimit must be positive(R.tintt
ValueErrorR"R#RR/tmaxint(R5R8((s$/sys/lib/python/mercurial/cmdutil.pytloglimitXs* cCs�t|d�o|ii�}|i}n
|i�}xNdD]F}|i|�p|id|�}|o|id||�q?q?W|idd�}|o|idd|�n|S(s*build a remote ui from ui or repo and optstbaseuitssht remotecmdtuitbundletmainreporoot(ssshs remotecmd(thasattrR=t[email protected]configt setconfig(tsrcR5tdsttotvtr((s$/sys/lib/python/mercurial/cmdutil.pytremoteuies
"cCsZd�}|p|ii�ddfSnd}t|�djoyt|djoN|ditd�\}}|||d�}|||t|�d�}qP|||dd�}n�t|�djokt|djpt|djotitd���n|||dd�}|||dd�}ntitd���||fS(sdreturn pair of nodes, given list of revisions. second item can
be None, meaning use working dir.cSs9|o$|djo|dj o
|}n|i|�S(Ni(Rtlookup(R%tvaltdefval((s$/sys/lib/python/mercurial/cmdutil.pytrevfix}s"
iiistoo many revisions specifiedN( R R!RRtrevrangesepRR"R#R(R%trevsRPtendtstart((s$/sys/lib/python/mercurial/cmdutil.pytrevpairys" "c
Cs.d�}t�g}}x|D]}t|jo�|itd�\}}|||d�}|||t|�d�}||jodpd}x�t||||�D]4} | |joq�n|i| �|i| �q�Wq |||d�} | |joq n|i| �|i| �q W|S(sAYield revision as strings from a list of revision specifications.cSsC|o"|djo|dj o|Sn|ii|i|��S(Ni(Rt changelogtrevRM(R%RNRO((s$/sys/lib/python/mercurial/cmdutil.pyRP�s"iii�N(tsetRQRRtxrangetaddtappendR(
R%RRRPtseentltspecRTRStstepRW((s$/sys/lib/python/mercurial/cmdutil.pytrevrange�s*
cs2h�fd�d<��fd�d<�fd�d<}hd�d<�fd �d
<}y��o|i|�n�o���fd�|d<n�dj o�fd
�|d<n�dj o�fd�|d<n�dj o'�dj o��fd�|d<n�dj o=�fd�|d<�fd�|d<�fd�|d<ng} t|�}
d}xe||
joW||}|djo%|d7}||}||�}n| i|�|d7}q�Wdi| �SWn5tj
o)}
titd�|
i d��nXdS(Ncs
t��S((R((tnode(s$/sys/lib/python/mercurial/cmdutil.pyt<lambda>�stHcst�ii���S((tstrRVRW((R%Ra(s$/sys/lib/python/mercurial/cmdutil.pyRb�stRcs
t��S((R((Ra(s$/sys/lib/python/mercurial/cmdutil.pyRb�sthcSsdS(t%((((s$/sys/lib/python/mercurial/cmdutil.pyRb�sRgcstii�i�S((tostpathtbasenametroot((R%(s$/sys/lib/python/mercurial/cmdutil.pyRb�stbcs&t�ii���i�pd�S(i(RdRVRWtzfill((R%Ratrevwidth(s$/sys/lib/python/mercurial/cmdutil.pyRb�sRKcs
t��S((Rd((ttotal(s$/sys/lib/python/mercurial/cmdutil.pyRb�stNcs
t��S((Rd((tseqno(s$/sys/lib/python/mercurial/cmdutil.pyRb�stncst��itt����S((RdRmR((RqRo(s$/sys/lib/python/mercurial/cmdutil.pyRb�scstii��S((RhRiRj((tpathname(s$/sys/lib/python/mercurial/cmdutil.pyRb�stscstii��pdS(t.(RhRitdirname((Rs(s$/sys/lib/python/mercurial/cmdutil.pyRb�stdcs�S((((Rs(s$/sys/lib/python/mercurial/cmdutil.pyRb�stpiits-invalid format spec '%%%s' in output filename(
tupdateRRR[tjointKeyErrorR"R#Rtargs(R%tpatRaRoRqRnRst
node_expandertexpandertnewnametpatlentitcR6((RaRqR%RsRnRos$/sys/lib/python/mercurial/cmdutil.pyt
make_filename�sJ
twbc Cs�d|jp
d|j}|p
|djo|o
tiptiSnt|d�o|o|Snt|d�od|jo|Sntt|||||||�|�S(NtwRR-twriteR1RK(R/tstdoutR0RCR2R�( R%R~RaRoRqRntmodeRstwritable((s$/sys/lib/python/mercurial/cmdutil.pyt make_file�scCs�tipt|�Sng}x�|D]�}ti|d�\}}|djoTyti|�}Wntij
o|g}nX|o|i |�q%q�n|i
|�q%W|S(N(R"texpandglobstlistt_matcht _patsplitRtglobtreRtextendR[(tpatstretRxtkindtnametglobbed((s$/sys/lib/python/mercurial/cmdutil.pyt
expandpats�s
trelpathcs�|o$|djot|pg�}nti�i�i�||id�|id�|����fd�}|�_�S(NR�tincludetexcludecs'�iid�i|�|f�dS(Ns%s: %s
(R@twarntrel(tftmsg(R%tm(s$/sys/lib/python/mercurial/cmdutil.pytbadfns(R�R�tmatchRktgetcwdR.tbad(R%R�R5R�tdefaultR�((R�R%s$/sys/lib/python/mercurial/cmdutil.pyR��s! cCsti|i|i��S(N(R�talwaysRkR�(R%((s$/sys/lib/python/mercurial/cmdutil.pytmatchall scCsti|i|i�|�S(N(R�texactRkR�(R%tfiles((s$/sys/lib/python/mercurial/cmdutil.pyt
matchfilessccsG|d}x6|D].}|i|�}d|}}x�D]� | |joq:n|i| �i�}
d}ti|�}ti||
�}
xB|
D]:\}}}}x%|||!D]}|t|�7}q�Wq�Wt|�t|
�}|o0|d|}||jo| |}}q"q:q:W|o|||fVqqWdS(s:find renamed files -- yields (before, after, score) tuplesRuig@N( twreadRtfilectxtdatatmdifft
splitnewlinestbdifftblocksR(R%R'R(t thresholdtctxRtaatbestnamet bestscoreRKtrrtequaltalinestmatchestx1tx2ty1ty2tlinetlengthstmyscore((s$/sys/lib/python/mercurial/cmdutil.pytfindrenamess2
c CsE|djo|id�}n|djo t|id�pd�}nggggf\}}}}ti|i�} t|||�}
x�|i|
�D]�}|i|�}t }
y| |�Wn
t
}
nX|
i|�}|
i|�}|
ob||i
joR|i|�|iip|o,|iitd�|o|p|�qOq�|i
|djo�|
p8ti|�p'tii|�oftii|�oR|i|�|iip|o,|iitd�|o|p|�qOq�|i
|djo|i|�q�|i
|djo|i|�q�q�W|p|i|�|i|�n|djo�x�t||||||�D]�\}}}|iip"|
i|�p|
i|�o=|iitd�|
i|�|
i|�|d f�n|p|i||�q�q�WndS(
Ntdry_runt
similarityis
adding %s
RKsremoving %s
Rs7recording removal of %s as rename to %s (%d%% similar)
id(RR.tfloatR"tpath_auditorRkR�twalktwjointTruetFalseR�R�R R[R@tverboseR$RtlexistsRhRitisdirtislinktremoveRZR�RD(R%R�R5R�R�R'tunknownR)R(t
audit_pathR�tabsttargettgoodR�R�toldtnewtscore((s$/sys/lib/python/mercurial/cmdutil.pyt addremove+sT
0-'
0
/+c
s��i��h��id���id�����fd�}��������fd�}���fd�}���fd�}t|�}|ptitd���nt|�djotitd ���n|i�} ti i
| �oti i| ���pqt|�djpti
|d
�otitd���nti| �otitd�| ��q�n|}
�o
|}
ng}xG|D]?}||�}
|
pq�n|i|
|| |
�|
f�q�W|ptitd
���nd
}xX|D]P\}}
xA|
D]9\}}}|||||�|�o|d7}q<q<Wq)W|o�itd��n|S(NtafterR�cs�g}t�|g�dt�}x��i|�D]�}�i|}|i|�}|i|�}|djoe|o(|djo�itd�|�n|o(|djo�itd�|�q1q1n|i|||f�q1W|S(NR�s?rt?s&%s: not copying - file is not managed
RKs2%s: not copying - file has been marked for remove
( R�R�R�R R�R�R�RR[(R~tsrcsR�R�tstateR�R�(R%R@R5(s$/sys/lib/python/mercurial/cmdutil.pytwalkpatbs
cs�ti�i�|�}�i|��}�i|�}�i|�}�i|}�i|�} | dj o@�it d�|�i|���i| ��f�dSnt
ii|�}
�o|
p�o;|djo.�dp�it d�|�dSqn�o|
pdSqn��p�yi|
ot
i
|�nt
ii|�pd}t
ii|�pt
i|�nti||�Wqtj
o[}|itijo�it d�|�q�it d�||if�tSqXn�ip|oI�o!�it d�||f�qg�it d �||f�n|�|<�ii|�p|}
||
jo-|djo�o�ii|�qkn��i|
d
jox|
|jok�ip-�it d��i|
��|f�n�i|djo�o�i|g�qkn�p�i|
|�n�o �o�i|g��ndS(
Ns*%s: not overwriting - %s collides with %s
tmntforces"%s: not overwriting - file exists
Rus%s: deleted in working copy
s%s: cannot copy - %s
smoving %s to %s
scopying %s to %s
RsF%s has not been committed yet, so no copy data will be stored for %s.
s?r(R"t canonpathRktpathtoR�R R.RR�RRhRitexiststunlinkRvR�tmakedirstcopyfileR3terrnotENOENTR4R�R�R$tcopiedtnormallookuptquietRZRDR�(tabssrctrelsrctotargetR�t abstargett reltargetR�RGR�tprevsrcR�t targetdirR6torigsrc(trenamettargetsR@tcwdtdryrunR�R%R5(s$/sys/lib/python/mercurial/cmdutil.pyR�xsj
#
!!
!
cs�tii|�o�ti�i�|�}ti|�}�o ttii|�d��n
t|���o�tti �7�n��fd�}n*�o�fd�}n�fd�}|S(Nics tii�ti|���S((RhRiR{R"t localpath(Rx(tdesttstriplen(s$/sys/lib/python/mercurial/cmdutil.pyRb�scs(tii�tiiti|���S((RhRiR{RjR"R�(Rx(R�(s$/sys/lib/python/mercurial/cmdutil.pyRb�scs�S(((Rx(R�(s$/sys/lib/python/mercurial/cmdutil.pyRb�s(
RhRiR�R"R�RkR�RRtsep(R~R�R�tabspfxtres(R%t
destdirexistsR�(R�R�s$/sys/lib/python/mercurial/cmdutil.pyttargetpathfn�s cs�ti|�o�fd�}n]ti�i�|�}t|�t�dd�jo��fd�}ti|�}t|���o�tti�7�nti i
ti i�ti i|�d��og|��}tti i|�d�}|o|tti�7}n||�|jo
|�q@n��fd�}n*�o�fd�}n�fd�}|S(Ncs(tii�tiiti|���S((RhRiR{RjR"R�(Rx(R�(s$/sys/lib/python/mercurial/cmdutil.pyRb�sicsbd}xU�D]M}tii�ti|d�|�}tii|�o|d7}q
q
W|S(Nii(RhRiR{R"R�R�(R�R�Rttt(R�R�(s$/sys/lib/python/mercurial/cmdutil.pytevalpath�s&ics tii�ti|���S((RhRiR{R"R�(Rx(R�R�(s$/sys/lib/python/mercurial/cmdutil.pyRb�scs(tii�tiiti|���S((RhRiR{RjR"R�(Rx(R�(s$/sys/lib/python/mercurial/cmdutil.pyRb�scs�S(((Rx(R�(s$/sys/lib/python/mercurial/cmdutil.pyRb�s(
R�tpatkindR"R�RkRR�RhR�RiR�R{R(R~R�R�R�R�RR�t striplen1(R%R�R�(R�R�R�s$/sys/lib/python/mercurial/cmdutil.pyttargetpathafterfn�s*!2s"no source or destination specifiedisno destination specifiedis@with multiple sources, destination must be an existing directorys!destination %s is not a directorysno files to copys(consider using --after)
(R�R.R�R"R#RRtpopRhRiR�R�R�RtendswithsepR[R�(R@R%R�R5R�R�R�R�RR�ttfntcopylistR~R�terrorst
targetpathR�R�R�(( R�R�R�R�R�R�R%R@R5s$/sys/lib/python/mercurial/cmdutil.pyRDXsT$I)&'!
#cCs|do|do ti�\}}ti}|id||f�xdtdt|��D]M}||id�o||=Pq`||id�o|||d5Pq`q`Wtiti t
tdd �B|d |�} ti|�ti|d�|o|| �Sq ti
d �n|o|�n|d
o>t|d
d�}
|
itti��d�|
i�n|doeg}|did
�D]}|t|�q�~\}}ti|�yti�Wntj
onXti|d�ti|�tii�tii�tititi�}
|
}|o'ti|titiBtiB�}nti|
d �ti|d�ti|d�|
djoti|
�n|o|djoti|�q�n|o|�SndS(sRun a command as a service.tdaemontdaemon_pipefdss--daemon-pipefds=%d,%dis--cwd=s--cwditP_DETACHitpid_fileR�s
t,tyN(iii(iii(RhtpipeR/targvR[RYRR
tspawnvptP_NOWAITtgetattrtcloseR1t_exitR2R�RdtgetpidRR9tsetsidtAttributeErrorR�tflushtstderrR"tnulldevtO_RDWRtO_CREATtO_APPENDtdup2(R5tparentfntinitfntrunfnR,trfdtwfdR}R�tpidtfpt_[1]txtnullfdt logfilefd((s$/sys/lib/python/mercurial/cmdutil.pytservice%sb
:
'
tchangeset_printercBsGeZdZd�Zd�Zdd�Zd�Zd�Zd�ZRS(s9show changeset information when templating not requested.cCsL||_||_||_||_||_h|_h|_d|_dS(N( R@R%tbufferedtpatchtdiffoptstheaderthunkRt
lastheader(tselfR@R%R0R1R/((s$/sys/lib/python/mercurial/cmdutil.pyt__init__ds cCs�||ijoH|i|}||ijo||_|ii|�n|i|=n||ijo)|ii|i|�|i|=dSndS(Nii(R2R4R@R�R3(R5RWRf((s$/sys/lib/python/mercurial/cmdutil.pyRns
cKsa|io@|ii�|i|||�|ii�|i|i�<n|i|||�dS(N(R/R@t
pushbuffert_showt popbufferR3RW(R5R�tcopiestprops((s$/sys/lib/python/mercurial/cmdutil.pytshow{s
cCs�|i�}|i�}|iio(|iid|t|�f�dSn|ii}|i|�}t i
|d�}|d} | id�}
|iiot
pt}g}|i||�D]"}
||
||i|
��fq�~}|iitd�|||�f�|
djo-ti|
�}
|iitd�|
�nx4|ii|�D] }|iitd �|�qcWx(|D] }|iitd
�|�q�W|iioA|iitd�|iii|d�t
|d�f�n|iitd
�|d�|iitd�|�|iio�|ii|i|�d|�d }x�ttd�td�td�g|�D]:\}}|o'|iid|di|�f�q�q�WnD|do8|iio+|iitd�di|d��n|oY|iioLg}|D]}|d|q:~}|iitd�di|��n| o]|iioPxMt| i��D]5\}}|iitd�||id�f�q�Wn|di�}|oo|iio:|iitd��|ii|�|iid�qe|iitd�|i�d�n|iid�|i|�dS( s(show a single changeset or file revisions%d:%s
Niitbranchschangeset: %d:%s
R�sbranch: %s
stag: %s
sparent: %d:%s
smanifest: %d:%s
isuser: %s
isdate: %s
isfiles:sfiles+:sfiles-:s %-12s %s
t sfiles: %s
s%s (%s)scopies: %s
sextra: %s=%s
t
string_escapeis
description:
s
ssummary: %s
s
(RaRWR@R�R�RR%RVR1R"tdatestrR.t debugflagRt_meaningful_parentrevsRtencodingttolocaltnodetagstmanifestR$R!tzipR{R�tsortedtitemstencodetstript
splitlinest showpatch(R5R�R:R;t
changenodeRWtlogtchangestdatetextraR=thexfuncR)RxR!ttagtparentR�tkeytvaluet_[2]R�tdescription((s$/sys/lib/python/mercurial/cmdutil.pyR8�sn
;&
/
&$/+%'
c
Cs�|io�|iii|�d}ti|i||d|idti|i|i��}x|D]}|ii|�qcW|iid�ndS(NiR�R5s
(R0R%RVR!tdiffR1R@R�(R5Ratprevtchunkstchunk((s$/sys/lib/python/mercurial/cmdutil.pyRM�s
cCsb|i|�}|iioA|dtjo0|d|djo
g}q^|dg}n|S(sReturn list of meaningful (or all if debug) parentrevs for rev.
For merges (two non-nullrev revisions) both parents are meaningful.
Otherwise the first parent revision is considered meaningful if it
is not the preceding revision.
ii(t
parentrevsR@RAR(R5RORWR!((s$/sys/lib/python/mercurial/cmdutil.pyRB�s
(( t__name__t
__module__t__doc__R6RR<R8RMRB(((s$/sys/lib/python/mercurial/cmdutil.pyR.as
C tchangeset_templatercBs2eZdZd�Zd�Zd�Zd�ZRS(sformat changeset information.cCs|ti||||||�|io
d�pd�}ti|h|d<dhdd<dd<d d
<�|_dS(NcSs|S(((R*((s$/sys/lib/python/mercurial/cmdutil.pyRb�scSs|d S(i((R*((s$/sys/lib/python/mercurial/cmdutil.pyRb�st
formatnodetcaches{rev}:{node|formatnode} RUs{rev}:{node|formatnode}RFs{name} ({source})tfilecopy(R.R6RAt templaterR(R5R@R%R0R1tmapfileR/Rc((s$/sys/lib/python/mercurial/cmdutil.pyR6�s cCs||iid<dS(sset template string to uset changesetN(RRd(R5R((s$/sys/lib/python/mercurial/cmdutil.pytuse_template�scCsz|i�}t|�djo|Sn|iio|d|idgSn|di�|i�djogSn|S(sHReturn list of meaningful (or all if debug) parentrevs for rev.
iitnull(R!RR@RAR%RW(R5R�R!((s$/sys/lib/python/mercurial/cmdutil.pyRB�s
!cs�d(�fd����fd�}���fd�}��fd�}��fd�}��fd�}g����fd����fd�} ��fd �}
��fd
�}��fd�}��fd�}
��fd
�}h�i�d<|d<�i�d<�i�i�d<|d<|d<|
d<| d<|d<|
d<�i�d<|d<�i�d<|d<|d<|d<}|i�}|i|�t d(f�i
idf�i
idf�i
i
d fg}hd!d"<d#d#<}xh|D]`\}}xQ|D]I}|od$||fp|}|o|�ijo|||<q7q7Wq$Wy�|d"oTti�i|d"|��}�io|�i�i�<q��i
i|�n|d#}�i
iti�i||����i�i��Wn�tj
o;}td%�}ti|�ii|id&f��nBtj
o5}titd'��ii|id&f��nXd(S()s(show a single changeset or file revisionc ;s�|o
|}n�d}|p7d|}|�ijo�i||�VndSn��ijoMt|dt�odi|�Vn x|D]}t||�Vq�WdSnd|}|�ijo�i||�Vn|i������fd�}d�} | �ijo|i�}
nd}
x|D]}||�Vq@W|
dj o||
d | �Vnd
|}|�ijo�i||�VndS(sTexpand set of values.
name is name of key in template map.
values is list of strings or dicts.
plural is plural of name, if not simply name + 's'.
expansion works like this, given name 'foo'.
if values is empty, expand 'no_foos'.
if 'foo' not in template map, return values as a string,
joined by space.
expand 'start_foos'.
for each value, expand 'foo'. if 'last_foo' in template
map, expand it instead of 'foo' for last key.
expand 'end_foos'.
Rttno_NiR>tstart_cs�y�i|�Wn^ttfj
oLy%x|D]\}}|�|<q2WWqrtj
o|��<qrXnX�i|��S(N(RzRR:R(RJRTRRl(R�R5tvargs(s$/sys/lib/python/mercurial/cmdutil.pytone$stlast_RTtend_(Rt
isinstanceRdR{tdictRDRR(R�RtpluralR}tnamestnonameRJt startnameRntlastnametlasttendname(R5(RmR�s$/sys/lib/python/mercurial/cmdutil.pytshowlist�s>
csI�i�}|djo,ti|�}�d|gdd|�SndS(NR�R=Rstbranches(R=RCRD(R}R=(RzR�(s$/sys/lib/python/mercurial/cmdutil.pytshowbranches;s
csXg}�i��D]+}|d|i�fd|i�fgq~}�d||�S(NRWRaRU(RBRWR(R}R)RxR!(R5R�Rz(s$/sys/lib/python/mercurial/cmdutil.pytshowparentsAsAcs�d�i�|�S(NRT(ttags(R}(R�Rz(s$/sys/lib/python/mercurial/cmdutil.pytshowtagsFsc;sfx_t�i�i��D]E\}}|i�}|itd|d|���id|�VqWdS(NRVRWRR(RHRRRIRDRzRrR(R}RVRW(R5R�(s$/sys/lib/python/mercurial/cmdutil.pyt
showextrasIs
csQg}�D]'}|h|dd<|dd<q~}�d|dd|�S(NiR�itsourcet file_copyRstfile_copies((R}R)R*R�(R:Rz(s$/sys/lib/python/mercurial/cmdutil.pyt
showcopiesOs;cs?�p4�ii�i�di��i��d �(n�S(Nii(R%R$R!Ra((R�R5R�(s$/sys/lib/python/mercurial/cmdutil.pytgetfilesTscs�d�i�|�S(Ntfile(R�(R}(R�Rz(s$/sys/lib/python/mercurial/cmdutil.pyt showfilesYscs�d��d|�S(Ntfile_modi((R}(R�Rz(s$/sys/lib/python/mercurial/cmdutil.pytshowmods[scs�d��d|�S(Ntfile_addi((R}(R�Rz(s$/sys/lib/python/mercurial/cmdutil.pytshowadds]scs�d��d|�S(Ntfile_deli((R}(R�Rz(s$/sys/lib/python/mercurial/cmdutil.pytshowdels_scsa|i�}|itd�iii�i�d�dt�i�d����id|�S(NRWiRaRF( RDRzRrR%RFRWRhRR(R}(R�R5(s$/sys/lib/python/mercurial/cmdutil.pytshowmanifestas+cs�ti�i�i�di��i��}d\}}}xFtiti|��D],}|d7}||d7}||d7}qVWd|||fS(Niiis%s: +%s/-%s(iii(R0RZR%R!RatdiffstatdataR"t iterlines(R}RZR�taddstremovesR�(R5R�(s$/sys/lib/python/mercurial/cmdutil.pytshowdiffstatgs.
tauthorR{RQtdesct file_addst file_delst file_modsR�R�RFRaR!RWR~textrastdiffstatR�R�RRyR2Rhs%s_%ss%s: no key named '%s'is%s: %sN(RtuserRQRYRKRRWRDRzR�R@R�R�RARRft stringifyR/R2R�RMRaR|RR"R#RgR}tSyntaxError(R5R�R:R;R|R}RR�R�R�R�R�R�R�R�tdefpropst tmplmodesttypesR�tpostfixttypetcurRfRVR6R�((R�R5R:R�RzR�s$/sys/lib/python/mercurial/cmdutil.pyR8�sv=
%*(R_R`RaR6RiRBR8(((s$/sys/lib/python/mercurial/cmdutil.pyRb�s
c
Cs�t}|id�o|p
t|�}n|id�}d }|oti|dt�}n|id�}|p|pB|idd�}|oti|�}q�|idd�}n|p|pt|||||�Snd }|oa|oY|}ti i
|�dp8tid|�p
ti|�} | o
| }qSqWnyt||||||�}
Wn+t
j
o}ti|id��nX|o|
i|�n|
S(
sYshow one changeset using template or regular display.
Display format will be the first non-empty hit of:
1. option 'template'
2. option 'style'
3. [ui] setting 'logtemplate'
4. [ui] setting 'style'
If all of these values are either the unset or the empty string,
regular display via changeset_printer() is done.
R0ttemplatetquotedtstyleR@tlogtemplateismap-cmdline.N(R�R.R�RRftparsestringRER.RhRiRttemplatepathRbR�R"R#R}Ri(R@R%R5R/tmatchfnR0ttmplR�RgtmapnameRR6((s$/sys/lib/python/mercurial/cmdutil.pytshow_changeset�s8c
sti|�}ti�fd��}t|�g|hd d<�\}}h}x�|D]�\}} }
|djo3|| �d}||d�o||| <qq[|djoI| |jo8|itd�| ti|| �f�t| �Sqq[q[Wti td���d S(
s;Find the tipmost changeset that matches the given date speccs�|i�S((Rh(RK(R%(s$/sys/lib/python/mercurial/cmdutil.pyRb�sRWRZiititersFound revision %s from %s
s revision matching date not foundN(
R"t matchdatet cachefunctwalkchangerevsRR$RR@RdR#(R@R%RQtdfR.t
changeiterR�tresultststRWtfnsRw((R%s$/sys/lib/python/mercurial/cmdutil.pytfinddate�s '
cs�ddd��t�|����id�p
�id��t��pg�fSn�od�di�}nd}t��d p|g��t���i�p�i�o
�id
�}h�|o�i�ot���ng�|pp���fd�}��fd�}t��t ��} }
x-|�D]\}}�i
|�}
t|
�pf|djo/�oti
td
�|��nt}Pq�|itd�|t|�f�qRnx�||
|�D]|\}}||
joc|| joPn�i|g��|i|��i|��o|o�i|�qlq��RWn|o��oti
td���n���fd�}xL|�D]=\}}t�|�}|o|�|<�i|�q�q�Wndtf�fd��Y�x��idd�D]�}�ii�i|��}��}t�d�d�}x?t||dd�D]'}|i|�o�i|�q�q�Wq2W���������f d�}|��fS(sIterate over files and the revs in which they changed.
Callers most commonly need to iterate backwards over the history
in which they are interested. Doing so has awful (quadratic-looking)
performance, so we use iterators in a "windowed" way.
We walk a window of revisions in the desired order. Within the
window, we first walk forwards to gather data, then in the desired
order (usually backwards) to display it.
This function returns an (iterator, matchfn) tuple. The iterator
yields 3-tuples. They will be of one of the following forms:
"window", incrementing, lastrev: stepping through a window,
positive if walking forwards through revs, last rev in the
sequence iterated over - use to reset state for the current window
"add", rev, fns: out-of-order traversal of the given filenames
fns, which changed during revision rev - use to gather data for
possible display
"iter", rev, None: in-order traversal of the revs earlier iterated
over with "add" - use to display dataiicss�||joVx�||joA|t|||�fV||7}||jo|d9}qqWnWxS||joE|t|||d�fV||8}||jo|d9}qfqfWdS(Nii(tmin(RTRSt
windowsizet sizelimit((s$/sys/lib/python/mercurial/cmdutil.pytincreasing_windowss
tfollowtfollow_firsts%s:0Rus-1:0RWR(c
3s�t��}|djot|�d}n|i|�}x��|t�D]�\}}g}xZt|||d�D]A}|i|�}|i|i|��o
|i|�f�qvWx.t |�D] } | d|jo | Vq�q�WqLWdS(Nii(
RRRWRRYRaR[tlinkrevtrenamedtreversed(
tfilelogRatcl_countRxR�twindowRRtjRrRW(R%R�R�(s$/sys/lib/python/mercurial/cmdutil.pyt
filerevgen*s
c3s<x�i�D]}|dfVq
Wx�D]}|Vq)WdS(N(R�R(tfilenamet
filename_node(R�R:(s$/sys/lib/python/mercurial/cmdutil.pyt iterfiles;s
s$cannot follow nonexistent file: "%s"s,%s:%s copy source revision cannot be found!
s5can only follow copies/renames for explicit filenamesc3sex^�t��dt�D]C\}}x4t|||d�D]}|�|�dfVq>WqWdS(Nii(RRRY(R�R�R�(R%R�tchange(s$/sys/lib/python/mercurial/cmdutil.pytchangerevgen^s
tfollowfiltercs#eZed�Z�fd�ZRS(cSst|_g|_||_dS(N(Rtstartrevtrootst onlyfirst(R5R�((s$/sys/lib/python/mercurial/cmdutil.pyR6js cs��fd�}�itjo|�_tSn|�ijod�ip�ii�i�nx�||�D].}|�ijo�ii|�tSqqqqWnf�ip�ii|�i��n|�ijo.�ii|��ii||��tSntS(NcsE�io�ii|�dd!Sntd��ii|��SdS(NiicSs
|tjS((R(R*((s$/sys/lib/python/mercurial/cmdutil.pyRbts(R�RVR^tfilter(RW(R%R5(s$/sys/lib/python/mercurial/cmdutil.pytrealparentsps
(R�RR�R�R[R�R�R�(R5RWR�RU(R%(R5s$/sys/lib/python/mercurial/cmdutil.pyR�os&
(R_R`R�R6R�((R%(s$/sys/lib/python/mercurial/cmdutil.pyR�istpruneii�ic3sU�o<�i�o.�d�id�����fd�}n�fd�}x�dt���D]�}}d�d�dj�dfVg}�|||!D]�|��o|�q�q�~}xZt|�D]L��i��}|p"���fd�}|�}nd �|fVq�Wx|D]�d
�dfVq5WqhWdS(NR�R�cs�i|�o
|�jS(N(R�(RW(twantedtff(s$/sys/lib/python/mercurial/cmdutil.pytwant�scs
|�jS(N((RW(R�(s$/sys/lib/python/mercurial/cmdutil.pyR��siR�i�c3s5x.���dD]}�|�o |VqqWdS(Ni((R�(R�RWR�(s$/sys/lib/python/mercurial/cmdutil.pyt
fns_generator�s
RZR�(R�R.RRHR(R�R�R�R)tnrevsR�R�( R�R�tfncacheR�R�R�RRR�R5(R�RWs$/sys/lib/python/mercurial/cmdutil.pytiterate�s$ =
N((R�R.RRWR`RXtanypatsR�R�tmaxR�RR"R#RR�R�Rt
setdefaultR[RZR�tobjectRVRMRYtdiscard(R@R%R�R�R5tdefrangetslowpathR�R�tminrevtmaxrevtfile_RaR�RWR�R�tchangefilesR�R�tstopR*R�((R�R:R�RRR�R%R�R�R�R�R5s$/sys/lib/python/mercurial/cmdutil.pyR��s~
)
!
' 'cCs|id�}|oti|�|d<nt|�}|id�ot|||�n||||t|||�|�S(s5commit the specified files or all outstanding changesRQR�(R.R"t parsedateR7R�R�(R@R%t
commitfuncR�R5RQR+((s$/sys/lib/python/mercurial/cmdutil.pytcommit�scCs+|i�o|i�Snt|||�S(N(RYtcommitforceeditor(R%R�tsubs((s$/sys/lib/python/mercurial/cmdutil.pytcommiteditor�s
cCs�g}|i�|i�|i�}}}|i�o|i|i��n|id�|id�|itd��|itd��|id�|itd�|i��|i�o|itd��n|i�o*|itd�t i
|i���n|ig}|D]}|td�|q&~�|ig} |D]}
| td �|
qX~ �|ig}|D]}
|td
�|
q�~�|ig}|D]}
|td�|
q�~�|o'|o|o|itd��n|id�ti
�}
ti|i�|iid
i|�|i��}tidd|�}ti|
�|i�ptitd���n|S(NRysBHG: Enter commit message. Lines beginning with 'HG:' are removed.s(HG: Leave message empty to abort commit.sHG: --sHG: user: %ssHG: branch mergesHG: branch '%s'sHG: subrepo %ssHG: added %ssHG: changed %ssHG: removed %ssHG: no files changeds
s(?m)^HG:.*
sempty commit message(R&R'R(RYR[RR�tp2R=RCRDR�RhR�tchdirRkR@teditR{R�tsubRKR"R#(R%R�R�tedittextR&R'R(R)RtRXR�t_[3]t_[4]tolddirttext((s$/sys/lib/python/mercurial/cmdutil.pyR��s<&
2222
$
(3RaRRRRti18nRRhR/R�R�R�R�R�R"RfR0RRCR�R�RQR�RR�RR*R7R<RLRUR`RR�R�R�R�R�R�R�RDR-R�R.RbR�R�R�R�R�R�(((s$/sys/lib/python/mercurial/cmdutil.pys<module>s@"<T
,
-�<~�1 �
|