HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyc

x7_c	@@sFddlmZddlZddlZddlZddlZddlZddlmZddl	m
Z
mZmZm
Z
mZddlmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'e'j(Z(dZ)dZ*d	Z+d
Z,e-dZ.e-dZ/d
Z0e1dZ2e3dZ4dZ5e3dZ6dZ7dZ8e1e-e-ddZ9dZ:e-e-e-e-e-dZ;de<fdYZ=e-e-e-e-e-de-e-dZ>dZ?e1dZ@e-e-e-e-e-e1dZAgZBgZCiZDiZEdZFgZGiZHd e-e1e-e-d!ZIe-e1e-dde1d"ZJd#e<fd$YZKd%eKfd&YZLd'eKfd(YZMd)ZNe1d*ZOe-d+ZPd,ZQd-d.d/ZRd0eSfd1YZTd2ZUd3e<fd4YZVd5ZWd6ZXd7ZYd8ZZd9Z[d:Z\d;Z]d<Z^e-e-d=Z_d>Z`d?Zad@ZbdAZcdBZddCZee-dDZfdEZgdFZhdGZidHZjddIZke-e-de1dJZldKZmdLZndMZoe-e-dNZpdOZqdPZrdQZse1e-dRZtdSZue'jvZwe'jvZxe'jvZydTe3e1edUedVfdWe3e1edXedYfgZze1dZZ{d[Z|dTed\fgZ}d]Z~d^Zd_Zd`e<fdaYZdS(bi(tabsolute_importNi(t_(tbinthextnullidtnullrevtshort(t	bookmarkst	changelogtcopiestcrecordtencodingterrort	formattertgraphmodtlocktmatchtobsoletetpatchtpathutiltphasestrepairtrevlogtrevsettscmutilt
templatekwt	templatertutilcC@stjtjf}t||S(N(t
crecordmodtuihunkRt
recordhunkt
isinstance(txthunkclasses((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytishunk2scC@s^t}xN|D]F}t|r|jjr||kr|j|jjqqW|S(N(tsetR"theadert	isnewfiletaddtfilename(tchunkstoriginalchunkstnewlyaddedandmodifiedfilestchunk((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytnewandmodified6s	
	cC@s|jdjdS(Nt^t|(tlstriptsplit(tcmd((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytparsealiases>sc@s8d|jfd}t|d|S(Nc@sS|jdd}x:tjfdD] \}}||d||q+WdS(Ntlabeltc@sS(N(((targs(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt<lambda>Es(tpopRt	difflabel(torigR5tkwR3R+tl((R5s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt	wrapwriteCs%c@s||S(N((R5tkwargs(toldwriteR<(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytwrapIstwrite(R@tsetattr(tuiR?((R>R<s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytsetupwrapcolorwriteAs
		cC@sW|r@|r$tj|tj}n	tj}tj|||Stj|||SdS(N(Rt
testdecoratorttestchunkselectort
chunkselectortfilterpatchR(RBt
originalhunkst	usecursesttestfilet	operationtrecordfn((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytfilterchunksNs		cC@sitj|}|jddd}t|}z"t|||||\}}Wd||_X||fS(s Prompts the user to filter the originalhunks and return a list of
    selected hunks.
    *operation* is used for to build ui messages to indicate the user what
    kind of filtering they are doing: reverting, committing, shelving, etc.
    (see patch.filterpatch).
    texperimentaltcrecordtestN(RtcheckcursestconfigtNoneRCRMR@(RBRHRKRIRJR>t	newchunkstnewopts((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytrecordfilter[s
c
@sddlm|jsS|r5td|}ntd}tj|n|jdso|jnfdfd}	t|||	||S(Ni(tmerges)running non-interactively, use %s insteadsrunning non-interactivelytuserc'	@st|dt|d}t|jdk}|rPtjtdnd}|jd}|sg}	|	j	|_
||_n|jd|}
|s|j
||	||
|ntj|d|dt}t|_t|_t|_tj|d	|
d|}tj|}
y||
\}}Wn/tjk
rj}tjtd
|nX|j|t||
}t}x?|D]7}y|jt|jWqtk
rqXqW|
j|
j|
j}g|D]}||kr|^q}|s+|jtddSt|
j}rI|}n1g|D]$}||ksn||krP|^qP}i}|r|jd
}ytj |Wqt!k
r}|j"t"j#krqqXnz~x|D]}t$j%d|j&dddd|\}}tj'||j(d||ft)j*|j+||dt|||<qWt,}x6|D].}|j-}||krv|j.|qvqvW|j/} |j0d|jdt1r6t2j3t2j4|j5}!|j6|!ddidd6}"|j7d|j.|"|j0dng|D]}tj8|j+|^q=|rt9j:||j;}#j||j<j=t1td|#n| ry@|j(d|j(|j>tj?|||dddWqtjk
r}tjt@|qXn~g|D]}$|j+|$^q&}||||SWdy|j<}%x}|jAD]o\}&}|j(d||&f|%|&dkr|%jB|&nt)j*||j+|&dttj8|qqW|rtjC|nWnt!k
rnXXdS( s%This is generic record driver.

        Its job is to interactively filter local changes, and
        accordingly prepare working directory into a state in which the
        job can be delegated to a non-interactive commit command such as
        'commit' or 'qrefresh'.

        After the actual job is done by non-interactive command, the
        working directory is restored to its original state.

        In the end we'll record interesting changes, and everything else
        will be left in place, so the user can continue working.
        tcommitis9cannot partially commit a merge (use "hg commit" instead)cS@stjd||fdS(Ns%s: %s(RtAbort(tftmsg((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytfailstforceRtoptst
whitespacetchangesserror parsing patch: %ssno changes to record
isrecord-backupstprefixt/Rt.tdirsbackup %r as %r
tcopystattreviewR4textras.difftsuffixtmatchersapplying patch
teolmodeNsrestoring %r to %r
tn(DtcheckunfinishedtTrueRRtlentparentsRRYRtgettappendtexplicitdirtbadtstatustcheckcommitpatternsRtdifffeatureoptstnodatestgittshowfunctdifft
parsepatcht
PatchErrortupdateR,R#tfilestAttributeErrortmodifiedtaddedtremovedtjointostmkdirtOSErrorterrnotEEXISTttempfiletmkstemptreplacetclosetdebugRtcopyfiletwjointstringioR'R@ttelltseektFalseRtdiffhelptextt
patchhelptexttreadteditttruncatetunlinkRt
matchfilestkeystdirstatetp1tgetvaluet
internalpatchtstrt	iteritemstnormallookuptrmdir('RBtrepotmessageRR^twctxRVR\R]tvdirsRttdiffoptstoriginaldiffR)R(RTterrR*t
contendersthtchangedRZtnewfilesRttobackuptbackupst	backupdirtfdttmpnametfptctfnametdopatcht	patchtextt
reviewedpatchtmtnfRtrealname(t	backupallt
commitfunctfilterfntmergemod(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt
recordfunczs
				
	

%	


	



)
 "	
c
@s-|j|||||SWdQXdS(N(twlock(RBRRRR^(R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt
recordinwlocks
(	R4RVtinteractiveRRRYRptusernameRX(
RBRRt
cmdsuggestRRtpatsR^R[R((RRRRRs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytdorecordls
cC@s*i}i}||kr$|g}n|j}g}x|D]}t|}|j|d}	||krw|}	n3|sx*|D]}
|
j|r|
}	PqqWn|	dk	r=|djds|	jdr|||f||	<q|||f||	<q=q=W|r |r |}n||fS(s
    Return cmd -> (aliases, command table entry)
    for each matching command.
    Return debug commands (or their aliases) only if no normal command matches.
    iRN(RR2textendRRt
startswith(R1ttabletstricttchoicetdebugchoiceRtallcmdstetaliasestfoundta((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytfindpossible!s0

	
"
	cC@st|||\}}||kr,||St|dkri|j}|jtj||n|r}|jdStj||dS(s9Return (aliases, command table entry) for command string.iiN(RRnRtsortRtAmbiguousCommandtvaluestUnknownCommand(R1RRRRtclist((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytfindcmdGs
cC@sUxNtjjtjj|dsP|tjj|}}||krdSqW|S(Ns.hg(RtpathtisdirRtdirnameRR(tptoldp((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytfindrepoXs
$cC@s|r3|jjtkr3tjtdn|jd \}}}}|sg|sg|sg|rtjtdn|d}x*t|j	D]}|j
|jqWdS(Nsoutstanding uncommitted mergeisuncommitted changes(Rtp2RRRYRRtRRtsortedtsubstatetsubt
bailifchanged(RRVRRRtdeletedtctxts((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR`s
cC@s|jd}|jd}|rB|rBtjtdn|r|ry@|dkrp|jj}ndjtj|j	}Wqt
k
r}tjtd||jfqXn|S(s3 get the log message according to -m and -l option Rtlogfiles6options --message and --logfile are mutually exclusivet-s
s"can't read commit message '%s': %s(RpRRYRtfinRRRtreadfilet
splitlinestIOErrortstrerror(RBR^RRtinst((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt
logmessagejs
"cC@sHt|tr |r@|dSn dt|jkr@|dS|dS(sreturn appropriate editform name (referencing a committemplate)

    'ctxorbool' is either a ctx to be committed, or a bool indicating whether
    merging is committed.

    This returns baseformname with '.merge' appended if it is a merge,
    otherwise '.normal' is appended.
    s.mergeis.normal(RtboolRnRo(t	ctxorbooltbaseformname((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt
mergeeditform}s	R4c@s@|ssr%fdSr8fdStSdS(s&get appropriate commit message editor according to '--edit' option

    'finishdesc' is a function to be called with edited commit message
    (= 'description' of the new changeset) just after editing, but
    before checking empty-ness. It should return actual text to be
    stored into history. This allows to change description before
    storing.

    'extramsg' is a extra message to be shown in the editor instead of
    'Leave message empty to abort commit' line. 'HG: ' prefix and EOL
    is automatically added.

    'editform' is a dot-separated list of names, to distinguish
    the purpose of commit text editing.

    'getcommiteditor' returns 'commitforceeditor' regardless of
    'edit', if one of 'finishdesc' or 'extramsg' is specified, because
    they are specific for usage in MQ.
    c
@s"t|||dddS(Nt
finishdesctextramsgteditform(tcommitforceeditor(trRR(RRR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sc@st|||dS(NR(tcommiteditor(RRR(R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sN(R(RRRRR^((RRRs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytgetcommiteditors

cC@s|jd}|ruyt|}Wn&tk
rMtjtdnX|dkr{tjtdq{nd}|S(s0get the log limit according to option -l/--limittlimits limit must be a positive integerislimit must be positiveN(Rptintt
ValueErrorRRYRRR(R^R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytloglimits
c@s%ifdd6fdd6fdd6fdd6}id	d
6fdd6}	yr|	j|nrfd
|	d<ndk	rfd|	d<ndk	rfd|	d<ndk	rdk	rfd|	d<ndk	rafd|	d<fd|	d<fd|	d<ng}
t|}d}xa||kr||}
|
d
kr|d7}||}
|	|
}
n|
j|
|d7}q|Wdj|
SWn3tk
r }tjtd|j	dnXdS(Nc@s
tS(N(R((tnode(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6stHc@stjjS(N(RRtrev((RR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6stRc@s
tS(N(R((R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sRc@stjddtS(Ns[^\w]R(treRR((tdesc(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sRcS@sdS(Nt%((((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sRc@stjjjS(N(RRtbasenametroot((R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6stbc@s%tjjjp!dS(Ni(RRRtzfill((RRtrevwidth(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sRc@s
tS(N(R((ttotal(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6stNc@s
tS(N(R((tseqno(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sRkc@stjttS(N(RRRn((RR
(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sc@stjjS(N(RRR((tpathname(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sRc@stjjpdS(NRc(RRR((R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6stdc@sS(N(((R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sRiiR4s-invalid format spec '%%%s' in output filename(
R}RRRnRqRtKeyErrorRRYRR5(RtpatRRR
RRRt
node_expandertexpandertnewnametpatlentiRR((RRRRRRR
s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytmakefilenamesL




t_unclosablefilecB@s>eZdZdZdZdZdZdZRS(cC@s
||_dS(N(t_fp(tselfR((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt__init__scC@sdS(N((R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRscC@s
t|jS(N(titerR(R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt__iter__scC@st|j|S(N(tgetattrR(Rtattr((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt__getattr__scC@s|S(N((R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt	__enter__scC@sdS(N((Rtexc_typet	exc_valuetexc_tb((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt__exit__s(t__name__t
__module__RRRR"R#R'(((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs					twbc

	C@s|dk}
|s|dkrJ|
r4|jj}n|jj}t|Stj|drf|
rf|Stj|drd|kr|St||||||||	}|dk	r|j||}|dkrd||<qnt	||S(	NRtrbRR@RR*tab(RR+(
RBtfoutRRRtsafehasattrRRRRptopen(
RRRRR
RRtmodetmodemapRtwritableRtfn((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytmakefileobjs 
!cC@s|d}|d}|d}d}|r?|r?td}nZ|rZ|rZtd}n?|sl|sl|r|rtd}q|std}qn|rtj|nd}|rn|r|jj}qn|r,d|jkrtjtd	n|jj|}	t	|	rk|	}qkqn|r>|j}qn|rn|j
|}
t	|
rk|
}qkqnn|s|stj|td
ntj
j|stjtd|ntjtjtjdt|d
 d}n|S(s:opens the changelog, manifest, a filelog or a given revlogRtmanifestRds:cannot specify --changelog and --manifest at the same times5cannot specify --changelog and --dir at the same times6cannot specify filename with --changelog or --manifestsFcannot specify --changelog or --manifest or --dir without a repositoryttreemanifests9--dir can only be used on repos with treemanifest enabledsinvalid argumentssrevlog '%s' not foundtauditis.iN(RRRRRYt
unfilteredRtrequirementsR5tdirlogRntfiletCommandErrorRRtisfileRRtopenertgetcwdR(RR1tfile_R^tcltmfRdR[RR:tfilelog((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt
openrevlogsN


c	@sjijdjdd	fd}	f	d}fd}fd}tj|}|stjtdnt|dkrtjtd	n|j	}	t
jj|	o(t
jj
|	st|dksVtj|d
rntjtdntj|	rtjtd|	qn|}
r|}
ng}xE|D]=}||}
|
sqn|j|
||	|
|
fqW|stjtd
nd
}xV|D]N\}}
x?|
D]7\}}}||||||r=|d7}q=q=Wq*W|rjtdn|d
kS(Ntaftertdry_runc@sg}rd}nd}tjd|gdt}xj|D]}j|}|j|}|j|}||kr|r|dkrjt	d|n|rM|dkrMjt	d|qMqMn|j
|||fqMW|S(Nt?s?rtglobbeds&%s: not copying - file is not managed
Rs2%s: not copying - file has been marked for remove
(RRRRRmtwalkRtreltexacttwarnRRq(Rtsrcst	badstatesRtabststateRJRK(RER^RRB(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytwalkpatKs$	"
c
@stjj|}d|krY|jdd\}}jj|d|}nj|}j|}j|}	j|}
tj	|j
|}|dk	rjt
d|j|j|fdStjj|}t}
|r~||kr~jj|jj|kr~sljt
d|dSt}t}
q~nr|srR|
dkrRdsR|
dkrt
d}rd}nd	}rt
d
|}q-t
d|}n-t
d}r!t
d
}nt
d}j||j|dSnr|srjt
d||fnjt
d||fdSnsy|rtj|ntjj|pd}tjj|stj|n|
r4|d}tj|	|tj||ntj|	|t}Wqtk
r}|jtjkrjt
d|t}qjt
d||jftSqXnjs|rrjt
d||fqjt
d||fn||<tj ||ddrrry|ry|
rytj!j|nj"|gndS(NRbis*%s: not overwriting - %s collides with %s
s%s: can't copy - same file
tmnR]s-%s: not overwriting - file already committed
s--after --forces--forces9(hg rename %s to replace the file by recording a rename)
s5(hg copy %s to replace the file by recording a copy)
s"%s: not overwriting - file exists
s)(hg rename --after to record the rename)
s%(hg copy --after to record the copy)
s+%s: not recording move - %s does not exist
s+%s: not recording copy - %s does not exist
Rcs	~hgrenames!%s: deleted in working directory
s%s: cannot copy - %s
smoving %s to %s
scopying %s to %s
tdryruntcwd(#Rt	canonpathR	trsplitRt	normalizetpathtoRRt
checkportableRpRRRLRRRtlexistsRRmRRRtmakedirstrenameRRRRtENOENTRtverboseRttdirstatecopyt
unlinkpathtforget(tabssrctrelsrctotargetRKt	abstargettabspathtabsnamet	reltargetttargettsrcRPtprevsrctexiststsamefileR[tflagsthintt	targetdirttmpt	srcexistsR(	RERTRSR^R\RttargetsRBR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRes

		
	



	  


c@stjj|rtjj|}tj|}r^ttjj	|dnt|rttj
7nfd}n'rfd}nfd}|S(Nic@s tjjtj|S(N(RRRRt	localpath(R(tdesttstriplen(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sc@s(tjjtjjtj|S(N(RRRRRRt(R(Ru(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sc@sS(N((R(Ru(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6s(RRRRRUR	RRtRnR0tsep(RRuRMtabspfxtres(RTt
destdirexistsR(RuRvs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyttargetpathfnsc@sutj|r!fd}nPtjj|}t|tddkrJfd}tj|}t|rttj	7ntj
jtj
jtj
j
|dr5|}ttj
j
|d}|r|ttj	7}n|||kr5|q5nfd}n'rbfd}nfd}|S(Nc@s(tjjtjjtj|S(N(RRRRRRt(R(Ru(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sic@s`d}xSD]K}tjjtj|d|}tjj|r
|d7}q
q
W|S(Nii(RRRRRtRZ(RvtscoreRtt(RuRM(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytevalpaths
&ic@s tjjtj|S(N(RRRRRt(R(RuRv(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sc@s(tjjtjjtj|S(N(RRRRRRt(R(Ru(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sc@sS(N((R(Ru(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6s(tmatchmodtpatkindRRUR	RnRRtRRwRRRR0(RRuRMRyRxR~R|t	striplen1(RTRzR(RuRMRvs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyttargetpathafterfns* 1s"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?RpRRRt
expandpatsRRYRRnR7RRRtislinkRRRtendswithsepRqRL(RBRRR^R\RQRR{RRuttfntcopylistRRMterrorst
targetpathRbRcRK((
RERTRzRSR^R\RRsRBRs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytcopy@sP
'n(%%	
#c@s_fd}drdrtjdd\}tj|z|sotjtjd}n|jdx`t	dt
|D]I}	||	jdr||	=Pq||	jd	r||	|	d
5PqqWfd}
tj||
}|dkr(t
jtd
n||WdytjWn+tk
rt}|jtjkruqunXX|r||SdSn|r|nds|tjndrNytjWntk
rnXxdD]z}
|
jdr |
dtjq|
jdrCtj|
dq|
dkrt
jtd|
qqWtjtjjtjjtjtjtj}|}|rtj|tjtjBtj B}ntj!|dtj!|dtj!|d
|dkr)tj|n|rN|dkrNtj|qNn|r[|SdS(sRun a command as a service.c@sZdrVrd}nd}td|}|jt|d|jndS(Ntpid_fileRtws
(R/R@RR(tpidR0R(t	appendpidR^(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytwritepid:s
	tdaemontdaemon_postexecRashg-service-is--daemon-postexec=unlink:%ss--cwd=s--cwdic@stjjS(N(RRRl((tlockpath(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytcondfnUsischild process failed to startNsunlink:ischdir:itnones'invalid value for --daemon-postexec: %s(iii(iii("RRRRRthgcmdtsystargvRqtxrangeRnRtrundetachedRRYRRRRR]tgetpidtsetsidRtchdirt
hidewindowtstdouttflushtstderrR/tdevnulltO_RDWRtO_CREATtO_APPENDtdup2(R^tparentfntinitfntrunfnRtrunargsRRtlockfdRRRRRtnullfdt	logfilefd((RRR^s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytservice6s|










&c&C@sddlm}tj||}|jd}	|jd}
|jdp[|jd}|jdpy|jd}|jd}
|jd}|jd	}|jd
}|jd}|jd}|jd
}|d}|d}t|jdpd}|	s(d"d"tfSt}zt||}|rO|}
n|
rd|
j	}
nd"}
|j
d|
t|dkr|j|t
n|jdr|s|rtjtdn||}||pt
}n|ry?||}||}||dkr7|d}|t
}nWn tjk
rZ|\}}nX|jt
kr|jtdqn|\}}d"}|r ||dkr|||jn||dkr|j|j|jn|jds|r!|jj|
pdn|jdt}t}y9tj|||	d|d|d|dd"d|dWnCtjk
r}|stjt|n|rt}qnXt|}|r|
r|j|
qq@|jds|rd"}ntj||pg}t|d"d}|jdrGd"}ntd||}|j j!dd} i}!x%t"D]}"t#|"|||!|q{Wzm|r|j j$ddtn|j%|
||d|d |d!|!}x t&D]}"t'|"||qWWd"|j j(| Xn |jds5|rD|
p>d}
n|j)}
tj*}#zt}y,tj+||||#|	|||dd"Wn+tjk
r}tjt|nX|jdrd"}ntdd#}|j,||j|jf|
|||
||#d |}$|$j%}Wd"|#j-X|jdrk|rk|jtd$n9|jdrt.||krtjtd%ntd&}%|rtd't/|}%n|%||fSWd"t0j1|	Xd"S((sUtility function used by commands.import to import a single patch

    This function is explicitly defined here to help the evolve extension to
    wrap this part of the import logic.

    The API is currently a bit ugly because it a simple code translation from
    the import command. Feel free to make it better.

    :hunk: a patch (as a binary string)
    :parents: nodes that will be parent of the created commit
    :opts: the full dict of option passed to the import command
    :msgs: list to save commit message to.
           (used in case we need to save it when failing)
    :updatefunc: a function that update a repo to a given node
                 updatefunc(<repo>, <node>)
    i(tcontextR'RRWtdatetbranchtnodeidRRt	no_committ
import_branchtbypasststripRat
similarityismessage:
%s
RKsnot a Mercurial patchs\warning: import the patch as a normal revision
(use --exact to import the patch as a merge)
tdefaulttpartialR~RjgY@s
import.normalRRBtallowemptycommitRteditorRgNs
import.bypasss3warning: can't check exact import with --no-commit
s%patch is damaged or loses informationsapplied to working directorys
created %s(2R4RRtextractRptfloatRRRRRRRnRqRRRYRt	RepoErrorRRLt
setparentsRt	setbranchR#R|RRmtlistRRRRRBtbackupconfigtextrapreimporttextrapreimportmapt	setconfigRXtextrapostimporttextrapostimportmapt
restoreconfigRt	filestoret	patchrepot
makememctxRRRRR(&RBRthunkRoR^tmsgst
updatefuncRtextractdataRRRWRRRRRtnocommittimportbranchR}RRatsimtrejectstcmdline_messageRkRR~RRRRtallowemptybackRgtidfunctstoretmemctxR[((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyttryimportones


	



	
		

			!shg-%h.patchc
@st|tg|D]}tt|^qifd}x.t|D] \}	}|||	d|qnWdS(s export changesets as hg patches.c@s|}|j}g|jD]}|r#|j^q#}|j}r`|jn|rs|d}nt}t}	rtdkr|jjj	d}
|
d}t
|d|dd|dddd	t}	nr8td
dj
dr8jjd
jnsMjj}nfd}|d|d|j|d|j|dtj|j|r|dkr|d|n|dt||dt|t|dkr#|dt|dnx>tD]6}
t|
||}|dk	r*|d|q*q*W||jj|dx<tj||dD]\}}||d|qW|	rjndS(Nis
RR
RRR0R*R1tnames	<unnamed>t<s%s
c@sj|dS(N(R@(RR:(R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR@wss# HG changeset patch
s
# User %s
s
# Date %d %d
s
#      %s
Rs# Branch %s
s
# Node ID %s
s
# Parent  %s
is# %s
s

R^R3(RRoRtreverseRRRntdescriptiontrstripR0R4RmR RRBtnoteRR@RWRRtdatestrRtextraexporttextraexportmapRRRtdiffuiR(RRRRRRRoRtprevtshouldcloset
desc_linesRR@theaderidR$R+R3(tfilemodeRR^RRt
switch_parentttemplateR
(Rs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytsingle\sT
+


		"


+iN(RntmaxRt	enumerate(
RtrevsRRRR^RRRR((RRR^RRRRR
s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytexportTs+$6c@sdkr|j}nfd}|
rNtj|j|j|
}
nd}
|
dkr|j|
}|
d7}
xO|jD]>}|j|
s|j	t
d|j||fqqWn|ry|jdd}d}|js|j
}ntj||||||d|	d	|
}xtjtj|d
|d|jD]\}}||d|qVWnKxHtj||||||d|	d	|
D]\}}||d|qW|r||}||}xtj||D]\}}|}y$|dk	r&|j|d
}nWntk
r@d}nXtj||}|j||||d|d|dd|	qWndS(sshow diff or diffstat.c@sj|dS(N(R@(RR:(R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR@sR4Rbs(warning: %s not inside relative root %s
RiiPRatrelroottwidthRxR3iR`tstatRN(RRR@RRUR	R?tuipathR~RRLRRtplaint	termwidthRRzt
diffstatuiRt	iterlinesRxRRtitersubreposRRRt
subdirmatcher(RBRRtnode1tnode2RR`RRRaR	tlistsubreposR@Rt	uirelroott	matchrootRR(R+R3tctx1tctx2tsubpathRt	tempnode2tsubmatch((Rs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytdiffordiffstatsR!
!



tchangeset_printercB@sJeZdZdZdZdZdddZdZdZ	RS(s9show changeset information when templating not requested.cC@sU||_||_||_||_||_i|_i|_d|_d|_	dS(N(
RBRtbufferedtmatchfnRR$RRRt
lastheadertfooter(RRBRRRR((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs								cC@s|j}||jkr`|j|}||jkrS||_|jj|n|j|=n||jkr|jj|j||j|=dSdS(Nii(RR$RRBR@R(RRRR((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs
	

cC@s#|jr|jj|jndS(N(RRBR@(R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs	cK@sk|jrQ|jjdt|j|||||jj|j|j<n|j||||dS(Ntlabeled(RRBt
pushbufferRmt_showt	popbufferRR(RRR	Rtprops((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytshows
	cC@s#|j}|j}|jjr-t}nt}tj||t|jf}|jj	r|jj
d|dddStj|j
}	|jj
td|dd|j|j}
|
dkr|jj
td|
dd	nxv|jjjD]b\}}|d
kr/qnxA|j|j|D]*}
|jj
|j|
dd|jqEWqW|jjr|jj
td|jdd
nxetj|j|D]N}d|j}|jj
td|j||jfd|qW|jjrv|dk	rv|j}|jj
td|jjj|t|fddn|jj
td|jdd|jj
td|	dd|jjrQ|jj|d }xttdtdtdg|D]>\}}|r|jj
d|dj|fddqqWnJ|jr|jj r|jj
tddj|jddn|r|jj rg|D]}d|^q}|jj
td dj|dd!n|j!}|ri|jjrixRt"|j#D];\}}|jj
td"||j$d#fdd$q'Wn|j%j&}|r|jj r|jj
td%dd&|jj
|dd&|jj
d'q|jj
td(|j'd)dd*n|jj
d+|j(||dS(,s(show a single changeset or file revisions%d:%s
R3slog.nodeNschangeset:   %d:%s
slog.changeset changeset.%sRsbranch:      %s
s
log.branchtbranchesslog.%ssphase:       %s
s	log.phaseslog.parent changeset.%ssparent:      %d:%s
smanifest:    %d:%s
sui.debug log.manifestsuser:        %s
slog.usersdate:        %s
slog.dateisfiles:sfiles+:sfiles-:s	%-12s %s
t sui.debug log.filessfiles:       %s
sui.note log.filess%s (%s)scopies:      %s
sui.note log.copiessextra:       %s=%s
t
string_escapesui.debug log.extras
description:
sui.note log.descriptions

ssummary:     %s
islog.summarys
()RRRBt	debugflagRRRtintrevRtquietR@RRRRtphasestrRRtnamesRtlogfmtt	colornametmeaningfulparentsRRtmanifestnodeR5RWRRttzipRR~R^RgRtitemstencodeRRRt	showpatch(RRR	RR
t
changenodeRthexfunctrevnodeRRtnsnametnsRtpctxR3tmnodeR~tkeytvalueRRgR((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs	'

"
		"(
"

c
C@s|s|j}n|r|jjd}|jjd}tj|j|j}|j}|jj}|rt|j|j	|||d|dt
n|r|r|jjdnt|j|j	|||d|dtn|jjdndS(NRRRs
(
RRRpRtdiffalloptsRBRRRRRmR@R(RRRRRzRRR((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRfs"N(
R(R)t__doc__RRRRRRRR(((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs				ot
jsonchangesetcB@s)eZdZdZdZdZRS(sformat changeset information.cC@s2tj||||||i|_t|_dS(N(RRtcacheRmt_first(RRBRRRR((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR|s	cC@s0|js|jjdn|jjddS(Ns
]
s[]
(R,RBR@(R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs	c
@s|j}|dkr%d}}n"t|}dt|j}tj|jru|jj	dt
|_n|jj	d|jjr|jj	d||jj	d||jj	ddS|jj	d||jj	d||jj	d	|j|jj	d
|j
|jj	d|j|jj	d|j|jj	d
|j|jj	ddjfd|jD|jj	ddjfd|jD|jj	ddjd|jD|jjrK|dkr=d}ndt|j}|jj	d||jj	ddjfd|jjD|jj|}	|jj	ddjfd|	dD|jj	ddjfd|	dD|jj	ddjfd|	d Dnx|jjr|jj	d!djfd"|jD|r|jj	d#djfd$|Dqn|j}|r|jjd%}
|jjd&}t j!|j|jd't"}|j|jj}
}|
r|jj#t$|j|j%|||
d(|d%t"|jj	d)|jj&n|r|jj#t$|j|j%|||
d(|d%t
|jj	d*|jj&qn|jj	ddS(+s(show a single changeset or file revisiontnulls"%s"s[
 {s,
 {s
  "rev": %ss,
  "node": %ss
 }Ns,
  "branch": "%s"s,
  "phase": "%s"s,
  "user": "%s"s,
  "date": [%d, %d]s,
  "desc": "%s"s,
  "bookmarks": [%s]s, c3@s|]}d|VqdS(s"%s"N((t.0R
(tj(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>ss,
  "tags": [%s]c3@s|]}d|VqdS(s"%s"N((R.R}(R/(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>ss,
  "parents": [%s]cs@s|]}d|jVqdS(s"%s"N(R(R.R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>ss,
  "manifest": %ss,
  "extra": {%s}c3@s1|]'\}}d||fVqdS(s
"%s": "%s"N((R.tktv(R/(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>ss,
  "modified": [%s]c3@s|]}d|VqdS(s"%s"N((R.RZ(R/(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>sis,
  "added": [%s]c3@s|]}d|VqdS(s"%s"N((R.RZ(R/(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>sis,
  "removed": [%s]c3@s|]}d|VqdS(s"%s"N((R.RZ(R/(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>sis,
  "files": [%s]c3@s|]}d|VqdS(s"%s"N((R.RZ(R/(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>ss,
  "copies": {%s}c3@s1|]'\}}d||fVqdS(s
"%s": "%s"N((R.R0R1(R/(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>sRRRxRs,
  "diffstat": "%s"s,
  "diff": "%s"('RRRRRRRt
jsonescapeR,RBR@RRRRRWRRRRttagsRoRRRgRRRtR^R~RRRpRRvRmR
RRR(RRR	RR
Rtjrevtjnodet
jmanifestnodeR~RRzRRR((R/s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs
		   ''!	%%('	



)(R(R)R)RRR(((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR*ys		tchangeset_templatercB@s)eZdZdZdZdZRS(sformat changeset information.cC@stj|||||||jr.dp4d}i|d6}	idd6dd6dd	6d
d6}
|
d	|
d<|o}|st|rtjj|d
|	d|
|_n$tj|d|d
|	d|
|_i|_	t
df|jj
df|jjdf|jjdfg}idd6dd6dd6dd6dd6|_xj|D]b\}}
xS|jD]H}|}|
r|d|
7}n|rc||jkrc||j|<qcqcWqMW|jdr|jjtj|j|jdndS(NcS@s|S(N((R ((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6scS@s|d S(Ni((R ((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6st
formatnodes{rev}:{node|formatnode} tparents{rev}:{node|formatnode}R5s{name} ({source})t	file_copys{key}={value|stringescape}RgtfilecopytfiltersR+t	changesetR^RRR4R$Rt	docheadert	docfooterR(RRRtAssertionErrorRtfrommapfileR}R
t
maketemplaterR+RmRRRBR^Rt_partsR@t	stringify(RRBRRRttmpltmapfileRR8R<tdefaulttemplt	tmplmodesR0tpostfixR}tcur((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs@

		
cC@s`|jdrM|js"d|_n|jtj|j|jd7_ntt|jS(NR?R4(RCRRRDR}tsuperR7R(R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs

	+cC@sq|j}|jtj|j|d<||d<|j|d<|jj|d<i|d6|d<|j|d<|jdrt	j
|j|jd|}|jr||j|j
<q|j|kr||_|jj|qn|jd	}|jjt	j
|j|||j|||jd
rm|jsmt	j
|j|jd
||_qmndS(s(show a single changeset or file revisionttemplRRRBR	trevcacheR+R$R=RN(RR}RtkeywordsR}RRBR+RCRRDRR$RRR@RR(RRR	RR
RR&((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs,




"		
%
	(R(R)R)RRR(((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR7s	,	cC@s|rZ|rZ|jdd}|r9tj|dfStj|jddd}n|r|r|}tjj|dstj	d|ptj	|}|r|}qnd|fS|sd	St
j|d|S(
sF
    Find the template matching the given template spec or style.
    RBtlogtemplatetstyleR4ismap-cmdline.R=N(NN(RQRt
unquotestringRRRt
expandpathRRR0ttemplatepathR
tlookuptemplate(RBRERPRFtmapname((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytgettemplate1s !

cC@sd}|jds$|jdr6tj|}n|jddkrat|||||St||jd|jd\}}|r|rt|||||St|||||||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.
    RRRtjsonRPN(RRRpRtmatchallR*RVRR7(RBRR^RRRERF((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytshow_changesetLs*c	C@s]|dk	r"|jdd|n|jddt|j|j}|j|dd|jtt|dd|jdd	|j|j	}|dk	r|jd
d|jtt|dddd
n|jdd|j
|j|jj
}|jdd|jdd|j|dddd
|jddS(sdutility function to display obsolescence marker in a readable way

    To be used by debug function.tindexs%i tprecnodes%s t	succnodesRRtflags%X tparentnodess{%s} Rws, Rs(%s) tmetadatas{%s}tfmts%r: %rs
N(RRR@RR[R\t	condwritet
formatlisttmapRnR^t
formatdateRR_RR7t
formatdictR(tfmtmarkerRZtsuccsRotmeta((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt
showmarkerfs ("(c@stj|tj|}ifd}xpt||idd6|D]R}|j}|krS|jtd|tj	|ft
|SqSWtjtddS(s;Find the tipmost changeset that matches the given date specc@s3|j}|dr/||j<ndS(Ni(RR(RtfnsR(tdftresults(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytprepsRsfound revision %s from %s
s revision matching date not foundN(
Rt	matchdateRRXtwalkchangerevsRRRRtRRRRRY(RBRRRRnRR((RlRms5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytfinddate{s#iicc@s/x(tr*|V||kr|d9}qqWdS(Ni(Rm(t
windowsizet	sizelimit((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytincreasingwindowss	t
FileWalkErrorcB@seZRS((R(R)(((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRusc@st}gt|t|}fd}fd}x]|D]R\}	}
j|	}t|s|
dkr_rtjtd|	nt	dqq_n|
dkrt|d}n|j
|
}t|j|g}
x|||D]\}}}sI||krqqqqn(||
kr[qn|rq|
j|n|j
|gj|	|j||rj|qqWq_W|S(sWalks the file history for the matched files.

    Returns the changeset revs that are involved in the file history.

    Throws FileWalkError if the file history can't be walked using
    filelogs alone.
    c	@st}g}xtd|dD]}|j|}|krMq&n||kr]Png}x<|j|D]+}|tkrs|j|j|qsqsW|j|}|j||o|j|fq&Wt|S(s
        Only files, no patterns.  Check the history of each file.

        Examines filelog entries within minrev, maxrev linkrev range
        Returns an iterator yielding (linkrev, parentlinkrevs, copied)
        tuples in backwards order
        ii(	RnRtlinkrevt
parentrevsRRqRtrenamedtreversed(	RCtlasttcl_countRR/RvtparentlinkrevsRRk(tfollowtminrevR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt
filerevgens c3@sd}xejD]W}rc||krKtjtd|n|||jfVq|dfVqWxD]}|VqyWdS(NRcs/cannot follow file not in parent revision: "%s"(R~RRYRtfilenodeRR(R$R't
filename_node(R	R}RR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt	iterfiless


s$cannot follow nonexistent file: "%s"sCannot walk via filelogiN(R#tminRR;RnRRRRYRRuRRvR}t
setdefaultRqR&(RRR}RtfncachetwantedtmaxrevRRR@RRCRzt	ancestorsRtflparentlinkrevstcopied((R	R}RR~Rs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytwalkfilerevss>	
	
t
_followfiltercB@seZedZdZRS(cC@s+||_t|_t|_||_dS(N(RRtstartrevR#trootst	onlyfirst(RRR((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs		c@sfd}jtkr+|_tS|jkrjsYjjjnx||D])}|jkrfjj|tSqfWn^jsjj|jn|jkrjj|jj||tStS(Nc@sFjr#jjj|dd!Stdjjj|SdS(NiicS@s
|tkS(N(R(R ((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6s(RRRRwtfilter(R(R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytrealparentss		(RRRmRR&R}tremoveR(RRRR9((Rs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs$			(R(R)RRR(((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRsc	@s#jdpjdts7gStjppjsdjopjd}ijjrny|sytWqt	k
rt
}x;jD]%}|dks|jkrPqqWgSqXn|rer4t
jtdndtffdY}|nxjdd
D]y}|j}t}td	d
}	x=t||	dd
D]%}
|j|
r|
gqqWqxWf	d}|S(szIterate 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 yielding contexts. Before
    yielding each context, the iterator will first call the prepare
    function on each context in the window in forward order.R}tfollow_firstRRcs5can only follow copies/renames for explicit filenamest
lazywantedsetc@s5eZfdZfdZdZRS(c@st|_t|_dS(N(R#R(R(R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR]sc@s||jkrtS||jkr&tS|jj||}t|j}|r{||<|jj|tStSdS(N(R#RmRRtdiscardRR~R&(RR'Rtmatches(tchangeRR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt__contains__cs
cS@s$|jj||jj|dS(N(RRR#(RR'((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRrs(R(R)RRR((RRRR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR\stpruneiiic	3@sbrBjrBtdjd
fd}n
fd}t	}t}xtD]}g}xUt|D]G}t|d}|dkrt	}Pq||r|j
|qqWx`t|D]R}j|}||s#fd}|}n|qWx|D]}|Vq;W|rmPqmqmWdS(NRRc@sj|o|kS(N(R(R(tffR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytwantsc@s
|kS(N((R(R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRsc3@s/x(jD]}|r
|Vq
q
WdS(N(R~(RZ(RR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt
fns_generators(talwaysRRpRRRtRtnextRRRmRqR(	Rtitt
stopiterationRrtnrevsRRRkR(	RRR}RR^tprepareRRR(RRs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytiterates4
((Rpt_logrevsR#tanypatstisexactRat	changectxRRRuRmR~RRRYRtobjectRRRRR(RRR^RtslowpathRRRRtstopR R((	RRR}RR^RRRRs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRp sD	$		
%'$c@sMitgdfdfd}|S(NRcc@sxD]}}|}j|jtj|jxB|jdD].}j|jtj|jqRWqWdS(Ntfollowfirst(RtintrorevR#R&RRR(R3tfctxR(tfcacheR~RR$(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytpopulates


(c@s:dstd<ntjj|gS(Ni(RmRRRp(R(RtfcachereadyRR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytfilematchers


(R(RR~RR((RRR~RR$RRs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt_makefollowlogfilematchers	
cC@sdS(sDhook for extensions to override the filematcher for non-follow casesN(RR(RRR^((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt_makenofollowlogfilematchersc@sGid=d6d>d6d?d6d@d6dAd
6dBd6dCd6dDd6dEd6dFd6dGd6dHd6dId6dJd6dKd 6}t|}|jd!p|jd"}|jd"rd#}nd$}t|}t|}|t||k}	|jdg|jd%g|d<g|dD]}
|j|
^q|d<|d<}tj|||\}jpj	s}j
o|jd&}|sxjD]}
|r|
|krtj
j|j|
rt}qqtjtd'|
n|j|
}|s|r1tjtd(|
nt}qqW|rx<jD]%}|d)ksr||jkrQPqQqQWt}qndL}dMdNf}|rid*d+g}x|D]}|jd,|qWx+|jd-gD]}|jd.|qWx+|jd/gD]}|jd0|q
Wd1jd2|D}||d<|rd)||d$|<qnX|r|rtj|||<q||	|}d3|||<nt||d<d<}|jd4s|jd5rM|rjr|rt|j|}qMt|||}|d<krMfd6}qMng}xt|jD]\}}|s~qfn||krqfn||\}d7kr|jqft|tsi|d86}n'd9|jfd:|Dd;}|j|qfW|r7d9dj|d;}nd<}||fS(OsKReturn (expr, filematcher) where expr is a revset string built
    from log options and file patterns or None. If --stat or --patch
    are not passed filematcher is None. Otherwise it is a callable
    taking a revision number and returning a match objects filtering
    the files to be detailed when displaying the revision.
    snot merge()t	no_mergessmerge()tonly_mergessancestors(%(val)s)t
_ancestorss_firstancestors(%(val)s)t_fancestorssdescendants(%(val)s)t_descendantss_firstdescendants(%(val)s)t
_fdescendantss_matchfiles(%(val)s)t_matchfiless
date(%(val)r)Rsbranch(%(val)r)s or Rsfilelog(%(val)r)t_patslogsfollow(%(val)r)t_patsfollows_followfirst(%(val)r)t_patsfollowfirstskeyword(%(val)r)tkeywords#not (%(val)r or ancestors(%(val)r))s and Rs
user(%(val)r)RWR}Riitonly_branchRs/cannot follow file not in parent revision: "%s"s$cannot follow nonexistent file: "%s"Rcsr:s	d:relpathsp:tincludesi:texcludesx:t,cs@s|]}d|VqdS(s%rN((R.R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>-ssrev(%d)RRc@sS(N((R(R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6Jss%(val)tvalt(c3@s |]}i|d6VqdS(RN((R.R1(trevop(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>Yst)N(snot merge()N(smerge()N(sancestors(%(val)s)N(s_firstancestors(%(val)s)N(sdescendants(%(val)s)N(s_firstdescendants(%(val)s)N(s_matchfiles(%(val)s)N(s
date(%(val)r)N(sbranch(%(val)r)s or (sfilelog(%(val)r)s or (sfollow(%(val)r)s or (s_followfirst(%(val)r)s or (skeyword(%(val)r)s or (s#not (%(val)r or ancestors(%(val)r))s and (s
user(%(val)r)s or (RR(RR(RR( RRtdictRpRRtlookupbranchRtmatchandpatsRRRaR~RRRlRRmRRYRR;RRRqRRRRRRRR(RRR^Rt
opt2revsetR}RRRtfollowdescendantsR
RRRZRCRtfpatstfnopatst	matchargsRtopRtexprRtandorR((RRs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt_makelogrevsets
	&*
$

		

'cC@s|jdp|jd}|jdrFtj||d}n[|rp|jjtkrptj}n1|r|jd}ntj	|}|j
|S(NR}RRsreverse(:.)(RpRtrevrangeRRRRtbasesetRtspansetR(RR^R}R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRbs
cC@s-t|}t||}|s4tjddfSt||||\}}|jdr|jps|js|j	dt
qn|rtj|j|dtj
}|||}n|dk	r g}x7t|D])\}	}
|	|krPn|j|
qWtj|}n|||fS(sReturn (revs, expr, filematcher) where revs is an iterable of
    revision numbers, expr is a revset string built from log options
    and file patterns or None, and used to filter 'revs'. If --stat or
    --patch are not passed filematcher is None. Otherwise it is a
    callable taking a revision number and returning a match objects
    filtering the files to be detailed when displaying the revision.
    RRtorderN(RRRRRRRRptisdescendingtistopoRRmRRBtfolloworderRRq(RRR^RRRRRitlimitedrevstidxR((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytgetgraphlogrevsqs&cC@st|}t||}|s7tjgddfSt||||\}}|rtj|j|dtj}|||}n|dk	rg}x7t	|D])\}	}
||	krPn|j
|
qWtj|}n|||fS(sReturn (revs, expr, filematcher) where revs is an iterable of
    revision numbers, expr is a revset string built from log options
    and file patterns or None, and used to filter 'revs'. If --stat or
    --patch are not passed filematcher is None. Otherwise it is a
    callable taking a revision number and returning a match objects
    filtering the files to be detailed when displaying the revision.
    RN(RRRRRRRRRBRRRq(RRR^RRRRRiRRR((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt
getlogrevss c@s|jdd}|stjStj|d|i}t|trU|j}ntjj	d<|d<fd}|S(NRBtgraphnodetemplatet	graphnodeRLR+c@sA|d<|d<|jd<id<tjdS(NRRRBRMR(RBRRD(RR(R
RL(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR8s




(
RQRt
showgraphnodeR
tgettemplaterRR7R+RNR(RBt	displayertspecR+R8((R
RLs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt_graphnodeformatters

c	C@sVt||}tj}|d}	|jdrP|	jtj|	dnitjd6tjd6tj	d6}
xR|
j
D]D\}}|jdd||	||	|<|	|sd|	|<qqW|j
dd	|d	<xf|D]^\}
}}}|||}d}|rt|jrtg}xL|jD];}|||j}|r2|j||d
fq2q2Wnd}|dk	r||j}n|j|d|d||jj|
jd
}|ds|d=n|j|||||||
|}x6|D].\}}}}tj||||||qWqW|jdS(NtstylestgraphR.R9tgrandparenttmissingRNs
graphstyle.%stgraphshorteniR	Rs
i(RRt
asciistateRR}RtfromkeystPARENTtGRANDPARENTt
MISSINGPARENTRRQRRt
configboolRR~RqRRR7R0RtasciiR(RBRtdagRtedgefnt
getrenamedRR8RPRt	edgetypesRR&RttypeRRotcharR	R3R\t
revmatchfntlinestedgestcoldata((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytdisplaygraphsH




!


$cO@st|||\}}}tj||}d}|jdrd}	|jdrtj||jdjd}	ntj	|d|	}nt
|||dt}
t||||
tj
||dS(NR	RitendrevR(RRt	dagwalkerRRRpRRRRtgetrenamedfnRYRmRt
asciiedges(RBRRR^RRRtrevdagRRR((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytgraphlogs(cC@sVxOdgD]D}||kr
||r
tjtd|jddq
q
WdS(Ntnewest_firsts+-G/--graph option is incompatible with --%sRR(RRYRR(RR^R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytcheckunsupportedgraphflagsscC@s?t|}|j|dk	r/|| }ntj||S(N(RRRRRtnodes(RRR^R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt	graphrevs	s


c@sjfd}gfd}g}|d}	d}
tj|\}}|s^|rytj|||j}
ntj|}
|j}xt|j|
t|	j	t
tdtD]}j|}|s|r||	kr|j
j|r|
r|
|n|j||js2|rX|jtdj|qXqqWxt|	j	D]}|	j|}yltj|}|jdrj|j||t|n"j|j||t
|Wqltjk
r |jtd||qlXqlW|jdsf|	j|}jfd|DnS(	Nc@stjj|S(N(RRR(RZ(Ra(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6	sc@sj|pj||S(N(RqRs(R ty(RsR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6	stfulls
adding %s
tsubreposs#skipping missing subrepository: %s
RFc3@s'|]}|jkr|VqdS(N(R~(R.RZ(R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>2	s(RRRtcheckportabilityalerttcasecollisionauditorRRtbadmatchRRIRRmRRKtwvfsRZRqR^RtRRJRRRpRR&RtLookupError(RBRRRatexplicitonlyR^RtbadfnRRtccatabortRLRRRZRKRRRtrejected((RsRRas5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR&
	sD
	+

*%& c@sfd}gfd}|d}g}|jdtj|dt}	t|	d|	d|	d|	d}
|rg|
D]}j|r|^q}
nxt|jD]}|j|}
y~tj	|}|
j
|\}}jg|D]}|d	|^q|jg|D]}|d	|^q;Wqtj
k
r|jtd
||qXqW|sFxjD]}||jkr|jj|r||kr?|jj|r,|jj||jkr	qn|jtdj|nj|q?qqWnxJ|
D]B}|jslj|rM|jtdj|qMqMW|j
|
jfd
D|jfd|
D|fS(Nc@stjj|S(N(RRR(RZ(Ra(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR66	sc@sj|pj||S(N(RqRs(R R(RsR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR68	sRtcleaniiiiRbs#skipping missing subrepository: %s
s+not removing %s: file is already untracked
sremoving %s
c3@s'|]}|jkr|VqdS(N(R~(R.RZ(R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>a	sc3@s!|]}|kr|VqdS(N((R.RZ(R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>b	s(RRRtRRRmRRKRRRRaRRR
RR~RRRRlRWRLRJRqR^(RBRRRaRRRRtforgotRRaRZRRRtsubbadt	subforgot((RsRRaRs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRa5	sH
$(+(,"
'cC@s|j}d}|jj}x|j|D]}	|dkrY||	dkrYq1n|j|jr||	}
|jdd|
j|
j	n|j
d|	|jd||j|	d}q1Wxt|j
D]}tj||}|s |j|s t|jr|j|}
yC|j|pD|}|
j|||||dkrqd}nWqtjk
r|jtd|j|qXqqW|S(	NiRs
size flagss% 10d % 1s RfRis#skipping missing subrepository: %s
(RRRRRRt	startitemR^R@tsizeRntdataRJRRRRRKtanyR~Rt
printfilesRR
RtRRO(RBRRRfR`RRtrettdsRZtfcRRRtrecurse((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR~e	s2
	
%
'!
c	@s*fd}d}	|jd|dt}
|
d|
d|
d|
df\}}}
}|d|dkrg}t}nt}tj}t|}d}x|D]}|d7}tj||}|s|j	|st
|jr|jt
d|d	|d
t
dj|}y+|j|||||rXd}	nWqtjk
r|jt
d||qXqqW|jt
ddtj|
}|j}t|}d}x|D]fd
}|d7}|jt
d|d	|d
t
d|kp@j}|jks|sdks|s|krqn|jjr|jjr|jt
d|jq|jt
d|jnd}	qW|jt
dd|r$||
||}n|r|
}|||}t|}d}xf|D]^|d7}|jt
d|d	|d
t
d|jt
d|jd}	qWW|jt
ddn|
|}t|t|}d}xf|D]^|d7}|jt
d|d	|d
t
d|jt
d|jd}	qWxf|D]^|d7}|jt
d|d	|d
t
d|jt
d|jd}	qhW|jt
ddt|}t|}d}x||D]t|d7}|js.|j	r|jt
d|d	|d
t
d|jt
d|jqqW|jt
dd|j^|sx?|D]4|krqntj|jdtqWn|dj|WdQX|r&x|D]}|j |qWn|	S(Nc@stjj|S(N(RRR(RZ(Ra(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6	siRRiiit	searchingR
tunitRs#skipping missing subrepository: %s
c@s/x(jD]}j|dr
tSq
WtS(NRb(RRRmR(R(RZR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt	insubrepo	stdeletingR~Rcs"not removing %s: no tracked files
s#not removing %s: file is untracked
tskippings#not removing %s: file still exists
s<not removing %s: file is modified (use -f to force removal)
sLnot removing %s: file has been marked for add (use 'hg forget' to undo add)
sremoving %s
t
ignoremissing(!RtRmRRRRRRnRRRKRR~tprogressRRtremovefilesRR
RqRtdirsthasdirRRRlRRJR^RR`RRaRL(RBRRRaRER]RtwarningsRRRRRRRRLtsubsR
tcountRRRtdeleteddirsR~R"RRt	remainingtwarning((RZRaRs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR	s.
	

'(	


(!


(



(


(


('

#
c@sod}fd}t|jdkr|jr|jd}j}	j}
|
r|	j|
|dr||dSnx'j|D]}||d}qWxtjD]}j	|}
yFt
j||}|
j|t
jj|
js)d}nWqtjk
rf|jtdt
jj|qXqW|S(Nic@stjdjdtjj|}|j}jdrjj||}n|j||j	dS(NtoutputRtdecode(
R4RpRRRRRt
wwritedataR@R(RRR(RR^RaR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR@	s
is#skipping missing subrepository: %s
(RnR~RR5RtfindRIRRRRRtcatRRRt_pathRtRepoLookupErrorRtR(RBRRRiRaR^RR@R;RBtmfnodeRORRR((RR^RaRs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR4	s.%	


	
cC@s|jd}|r+tj||d<nt||}tj|d||}|jdrtj||d|dkrtj	t
dqn||||||S(s5commit the specified files or all outstanding changesRt	addremoveR4is5failed to mark all new/missing files as added/removedN(RpRt	parsedateRRRRRR8RRYR(RBRRRR^RRRi((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRX!
scC@s||jkro|j|}||jkrh|j|}|j|og|j|jkStSn||jkSdS(N(R5tfilectxtcmpRnR(RZRRRR
((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRm2
sc"@s.ddlmtj|tjr2|jn|jtdj}tj|tj}d}	}
}z|j
}	|j}
|jd}t
||}
|jdt|_|jj}z6d|j_d|d<t|||||}Wd||j_|jj|t|_X|||jj|jjtjdkrtg|j|d D]}|D]}|^qq}ntj}|r|jtd	|fj}j}tj |j!rFjtj j!n|jjg|D]}t"||s`|^q`}fd
}nb|jtd	|ffd}|j#dpj}|j#d
pj}t$d}t%d||}|
sIt%dtd|}j&}
n|j'}j(|d<j)|d|j*j!j*gd|
d|d|d|d
|d|d|}t+j,|j&}|r*|j&kr*|jkr*|jkr*|jkr*j*S|j-j.ddt/j0}zP|j#dr`d}nj1}|j-j2dd|d|j3|}Wd|j-j2dd|dX|j*kr|j4|t5|j6j*}|rI|j}x>|D]6} |j7d|j(t(|f||| <qW|j|n|r||}|ffg}!|r|!j8d fntj9||!qnWdQX|r|j*kr|r|jtdn|jtdt:j;||j*ddnWdt<j=|
|	X|S(!Ni(Rsamending changeset %s
tamendRstemporary amend commit for %sRiscopying changeset %s to %s
c@syf|}|j}j||j|jdd|kdd|kdj|}|SWntk
rzdSXdS(NRR;tisexecR R(Rnt
memfilectxRRRpRRR(Rtctx_RRRntmctx(RRR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt	filectxfn
s
	
c@s*yj|SWntk
r%dSXdS(N(R:RRR(RR?R(told(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRA
s
RWRscommit.amendRRtamend_sourceRottextR~RARgRRs
new-committsecrets"moving bookmarks %r from %s to %s
s$stripping intermediate changeset %s
sstripping amended changeset %s
ttopicsamend-backup((>R4RRt	isenabledtcreatemarkersoptRRRRRRRRttransactionRR7Rt	callhookst
_bookmarkstactiveRXtrecordchangeRmR}RgRnRoR#RtR~RWRR	t
pathcopiesRRmRpRRRRRRRRt	stripdescRBRQRtdrafttphaseRt	commitctxRRt
nodebookmarksRRqt
createmarkersRRtlockmodtrelease("RBRRRBRgRR^tbaseRTRRtnewidttrRtactivebookmarkRtstR3R~RWRRZRARRt	pureextratnewtnewdesctphtcommitphasetbmstmarkstbmtobs((RRRRBs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR<>
s

	

 	"+
	
		
	
&cC@s2|jr|jSt|||d|dtS(NRtunchangedmessagedetection(RRRm(RRR+R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR
s
cC@s|std}ng|jdD]}|r%|^q%}|jddd}	xm|r|jjddj|}
|
rt|||||
}	}Pn|jqVWt	||||}t
j}t
j|j
|j}
|jj|
|
o|
jo|j
}|jj||j|jd|d|}tjdd	|}t
j||r}||}n|jstjtd
n|r||	krtjtdn|S(Ns$Leave message empty to abort commit.RciR=tcommittemplateRtpendings(?m)^HG:.*(
|$)R4sempty commit messagescommit message unchanged(RR0tinsertRRRBRQRtbuildcommittemplateR7tbuildcommittextRR?RR	tcurrenttransactionRR@twritependingRRWRgRRRRRY(RRR+RRRReRtformsttemplatetextREt
committexttolddirRYRgt
editortextRD((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR
s:(	!
c
C@s|j}t||d\}}t||di||t}x?|jjdD]+\}}	|dkrR|	|jj|<qRqRW|sd}n|j|j	|d||j
S(NRfR=R4R(RBRVRRR7RtconfigitemsR}R+R
RR(
RRR+RRERBRFR}R0R1((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRi$s		
cC@s3djg|jdD]}|rd|^qS(Ns
sHG: %s(RR0(R[R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pythgprefix5sc
C@s[g}|j|j|j}}}|jrN|j|jn|jd|jd|jttd|jt||jd|jttd|j|jr|jttdn|j	r|jttd|j	nt
j|rP|jttd|jn|j
g|D]}ttd|^q]|j
g|D]}	ttd	|	^q|j
g|D]}	ttd
|	^q|j
g|D]}	ttd|	^q|rA|rA|rA|jttdn|jdd
j|S(NR4s>Enter commit message.  Lines beginning with 'HG:' are removed.sHG: --suser: %ssbranch mergesbranch '%s's
bookmark '%s's
subrepo %ssadded %ss
changed %ss
removed %ssno files changeds
(RRRRRqRsRRWRRRtisactivewdirparentt_activebookmarkRR(
RRR+RtedittextRRRRRZ((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRj8s0&


#&#0000
c	C@sv|dkri}n||}|j}|jdr|r||krg|D]0}|j|krT|j|krT|^qTr|jjtdn|jdsxL|D]A}|jr|j|kr|jjtd|qqWn|jj	r=|jj
tdt||jfn5|jj
rr|jj
tdt||fndS(NR<screated new head
tclose_branchs reopening closed branch head %d
scommitted changeset %d:%s
(RRRoRpRRRBRtRtclosesbranchRR@RRR^(	RRRtbheadsR^RRoR R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytcommitstatusTs	
">
$/cC@s#|jdtj|d||S(NR(RtRRRR(RRR^((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytpostcommitstatussc9@s	|\}}j}j}	||kr9|}ni|j	|jdt}
|d}tj|||tfd|j	D}j
sxH|jtj
dD](}
j|
j|
f|
<qWfd}xTjtj
|D]7}
|
kr'j|
j|
f|
<q'q'Wtj||jd|ddtdtd	t}nn|jd|d}xA|D]9}x0|D](}
j|
j|
f|
<qWqWtj|t|j}t|j}t|j}t|j}t|j}|j|jt|j}t}t|	}||}||}||kr|}|}|}||B}ttt}}}n|jd|d}t|j}t|j}t|j}||B}|||O}||M}||8}||@}||8}||M}|||@O}||8}|}|tkr||}||O}||8}n|j} xq|D]i}!|jj|!}"|"r|"kr|j|"d
kr|j |"|j!|"| tf|"<qqWt}x1|D])}
|j|
dkrT|j |
qTqTW||8}x1|D])}
|j|
dkr|j |
qqW||8}t}#x?|D]7}
|j"|
}$t#j$j%|$r|#j |
qqW||#8}t}%x?|D]7}
|j"|
}$t#j$j%|$r.|%j |
q.q.W||%8}igt&dfd
6gt&dfd6gt&dfd6gt&dfd6gt&dfd6gt&dfd6dt&dfd6dt&dfd6}&d}'d}(d})d}*|jdrI|*}'}(})n|
rX|'}+n|(}+t},|&d}-|jds|&d}-n||&d
|*f||&d
|*f||&d
|+f||&d|*f||&d|*f||-|(f||&d|*f||&d|*f|#|&d|)f||&d|*f|%|&d|)f||&d|*f||&d|*ff
}.xtj'D]\}
\}/}0|j"|
}$x`|.D]X\}1\}2}3}4|
|1krqn|2dk	r|2j(|
|4r|4|'kr|,j |
q|(|4ks||
j)|
rtj*||/}5j+t&d|/|5f|jd s|
ryt,j-|$|5qt,j.|$|5qqnj/s|0rt0|3t1s|3|
}3nj|3|/qn|0rj2|3|/nPqWqrW|jd sV	d"}6t3|g|6D]}7|&|7d^q	t4|||&|
|,n|r	xq|D]f}8y'|j5|8j6j	|8||Wqc	t7k
r	t8j9d!|8t:jfqc	Xqc	WnWdQXdS(#NRc3@s!|]}|r|VqdS(N((R.R(R(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>scS@stS(N(R(R R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR6sc@su|krdS|jkr#dS|d}x!D]}|j|r4dSq4Wjdj||fdS(NRbs%s: %s
(RRRLRJ(RR[tpath_RZ(RRRRB(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs

RRtunknowntignoredRRRs
reverting %s
treverts
adding %s
R&sremoving %s
Rtdropsforgetting %s
Rasundeleting %s
tundeletesno changes needed to %s
tnoopsfile not managed: %s
iiiit	no_backups#saving current version of %s as %s
RFs(subrepository '%s' does not exist in %s!(RR&R(;RR5RRpRRRRRRRRRIRRRJRKRRtRmR#RRRRR}R}R~RRR?RRR&RXRRRRZRRRqR;torigpathRRRR\R^Rt
basestringRLt_revertprefetcht_performrevertRRRRRYR(9RBRRRoRR^R9RRRBRRt
targetsubsRORR`tkindRRRt_deletedR}RtmodaddedtsmftdeladdedRt
dsmodifiedtdsaddedt	dsremovedtlocalchangestmergeaddRTRZRjtremovunkRit
dsremovunktactionstbackupinteractivetbackuptcheckRtdsmodifiedbackupRtbackupanddelt	disptableRJRKRtxlistR[tdobackuptbaknametneeddataRR((RRRRBs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs<	

%&")

*	


 










%
#	



	

	

		

%
#	+
'
	cG@sdS(s9Let extension changing the storage layer prefetch contentN((RRR~((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRsc"@s|\}}j}g}	i|	d6}
fd}tjjdt}x|ddD]p}
|rjjtd|
}|dkrjj	|
q|	j
j|
qdjj	|
qdWx^|ddD]N}
||
ytj
j|
Wntk
r$nXjj|
qWx0|ddD] }
||
jj|
qHWd}||kr|tkrjj}qjj}nt}|rcg|d	dD]}
j|
^q}tj||
}tjjd
t}t|_t|_jjddt}|retjjd|d
|}n$tjdj|d
|}tj|}||krdnd	}y:tj|d|\}}|rtj|}nWn/tj k
r}t!j"td|nXt#||}|dkrCt}nt$}x|D]}t%|r|j&j'|kr|j&j'}j|}tj(j|j)|}tj*|||j|n|j+|qSW|j,} |j-d| r]y#tj.j|dddWq]tj k
rY}t!j"t/|q]Xn~n6x3|d	dD]#}
||
|rr||
qrqrWx?|ddD]/}
|
|kr||
jj0|
qqWjj}||kr|tkrjj}nx*|ddD]}
||
||
qWt1j2|}!xT|dd|dd|d	dD],}
|
|!krxjj3|!|
|
qxqxWdS(sfunction that actually perform all the actions computed for revert

    This is an independent function to let extension to plug in and react to
    the imminent revert.

    Make sure you have the working directory locked when calling this function.
    Rc@s-|}j||j|jdS(N(twwriteRRn(RZR(RR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytcheckouts
tcachedRais(forget added file %s (yn)?$$ &Yes $$ &NoRRRR_RNtrevertalternateinteractivemodeR^RRKserror parsing patch: %siRjR&RN(4RRtpathauditorR	RmRBtpromptchoiceRRRRqRRR`RRRRRRtnormalR#RRRRvRwRxRRzR{RUtreversehunksR|RRYR,RR"R$R'RRJRR@RRRRR&R	RNR("RRoRRRRR9RRtexcluded_filestmatcher_optsRt
audit_pathRZRRR*ttorevertRRRRzR)RKR(R^RRRRORiRRR((RRs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRs	
		



	*			'$	
!!
#


-c@s"ddtttfd}|S(sReturns a function object to be used as a decorator for making commands.

    This function receives a command table as its argument. The table should
    be a dict.

    The returned function can be used as a decorator for adding commands
    to that command table. This function accepts multiple arguments to define
    a command.

    The first argument is the command name.

    The options argument is an iterable of tuples defining command arguments.
    See ``mercurial.fancyopts.fancyopts()`` for the format of each tuple.

    The synopsis argument defines a short, one line summary of how to use the
    command. This shows up in the help output.

    The norepo argument defines whether the command does not require a
    local repository. Most commands operate against a repository, thus the
    default is False.

    The optionalrepo argument defines whether the command optionally requires
    a local repository.

    The inferrepo argument defines whether to try to find a repository from the
    command line arguments. If True, arguments will be examined for potential
    repository locations. See ``findrepo()``. If a repository is found, it
    will be used.
    c@s%fd}|S(Nc@sW|_|_|_r=|tf<n|tf<|S(N(tnorepotoptionalrepot	inferrepoR(tfunc(RRRRtoptionstsynopsisR(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt	decoratorA
s			((RRRRRRR(R(RRRRRRs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR1?
s!	(N(RRR(RR1((Rs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytcommand!
st
graftstatesgraft in progresss1use 'hg graft --continue' or 'hg update' to aborttupdatestateslast update was interrupteds,use 'hg update' to get a consistent checkoutcC@s`xYtD]Q\}}}}}|r.|r.qn|jj|rtj|d|qqWdS(sLook for an unfinished multistep operation, like graft, and abort
    if found. It's probably good to check this right before
    bailifchanged().
    RoN(tunfinishedstatestvfsRlRRY(RRXRZt	clearabletallowcommitR[Ro((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRlk
s
cC@sxNtD]F\}}}}}|r|jj|rtj|d|qqWxNtD]F\}}}}}|rX|jj|rXtj|j|qXqXWdS(s[Check for unfinished operations (as above), and clear the ones
    that are clearable.
    RoN(RRRlRRYRRR(RRZRRR[Ro((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytclearunfinishedv
sshg graft --continuec@std}x4tD],\}}|jj|r||tfSqW|dt|jp{tfdjD}|r|tdt	fSdS(sCheck for an unfinished operation and return the command to finish
    it.

    afterresolvedstates tupples define a .hg/{file} and the corresponding
    command needed to finish it.

    Returns a (msg, warning) tuple. 'msg' is a string and 'warning' is
    a boolean.
    scontinue: %sc3@s$|]}j|jVqdS(N(Rtdirty(R.R(t
workingctx(s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pys	<genexpr>
ss	hg commitN(NN(
RtafterresolvedstatesRRlRmRRRRtRR(RtcontmsgRZR[R((Rs5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt
howtocontinue
s

!cC@sVt|\}}|dk	rR|r;|jjd|qR|jjd|ndS(sInform the user about the next action after completing hg resolve

    If there's a matching afterresolvedstates, howtocontinue will yield
    repo.ui.warn as the reporter.

    Otherwise, it will yield repo.ui.note.
    s%s
N(RRRRBRLR(RR[R/((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytcheckafterresolved
s
cC@sLt|}d}|dr)|d}ntjtd|d|dS(sRaise an abort suggesting how to properly continue if there is an
    active task.

    Uses howtocontinue() to find the active task.

    If there's no task (repo.ui.note for 'hg commit'), it does not offer
    a hint.
    iisno %s in progressRoN(RRRRRYR(RttaskRERo((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pytwrongtooltocontinue
s
	

t
dirstateguardcB@s;eZdZdZdZdZdZdZRS(snRestore dirstate at unexpected failure.

    At the construction, this class does:

    - write current ``repo.dirstate`` out, and
    - save ``.hg/dirstate`` into the backup file

    This restores ``.hg/dirstate`` from backup file, if ``release()``
    is invoked before ``close()``.

    This just removes the backup file at ``close()`` before ``release()``.
    cC@s]||_t|_t|_d|t|f|_|jj|j|jt	|_dS(Ns
.backup.%s.%d(
t_repoRt_activet_closedtidt_suffixRt
savebackupRkRm(RRR((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR
s			cC@s|jr|jndS(N(Rt_abort(R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt__del__
s	cC@sf|js.td|j}tj|n|jjj|jj|jt	|_t
|_dS(Ns2can't close already inactivated backup: dirstate%s(RRRRRYRRtclearbackupRkRRmR(RR[((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR
s		

	cC@s/|jjj|jj|jt|_dS(N(RRt
restorebackupRkRRR(R((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR
s
cC@sH|jsD|js7td|j}tj|n|jndS(Ns4can't release already inactivated backup: dirstate%s(RRRRRRYR(RR[((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyRV
s			
(R(R)R)RRRRRV(((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyR
s				(t
__future__RRRRRRti18nRRRRRRRR4RRR	R
RRRR
RRRURRRRRRRRRRRRRRR"R,R2RCRRRMRURRRRmRRRRRRRRRRR4RDRRRRRRRRRRRRR*R7RVRYRjRqRtt	ExceptionRuRRRpRRRRRRRRRRRR&RaR~RR4RXRmR<RRRiRsRjRzR{RRRRthookst
outgoinghookstsummaryhookstsummaryremotehooksRRlRRRRRR(((s5/usr/lib/python2.7/dist-packages/mercurial/cmdutil.pyt<module>s(					

	&	
				-		-X		A8cU			a&								/				+	0	v	(			(			0			~	0