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: //usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyo
�
1�3\c
@@s�	ddlmZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZddlm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z*ddl+m,Z,m-Z-e(j.Z.dd	e/ed
�fgZ0dde/ed
�fgZ1ddded�ed�fddded�ed�fdde/ed�fgZ2ddged�ed�fddged�ed�fgZ3ddded�ed �fd!d"ded#�ed$�fgZ4d%d&ded'�ed(�fd)d*ded+�ed,�fgZ5d-d.ded/�ed0�fgZ6dd1ded2�ed3�fd-d.ded/�ed0�fgZ7d4d5e/ed6�fd7d8e/ed9�fd!d:ded;�ed<�fd=d>e/ed?�fdd@e/edA�fdBdCe/edD�fge7Z8dEdFe/edG�fd7d8e/ed9�fddHe/edI�fddJe/edK�fgZ9dLdMe/edN�fdOdPe/edQ�fdRdSe/edT�fdUdVe/edW�fgZ:ddXe/edY�fd4dZe/ed[�fdd\e/ed]�fge:d^d_ded`�ed<�fdd@e/edA�fddadedb�edc�fgZ;dddededf�edg�fgZ<dhdidedj�edk�fgZ=dldme/edn�fgZ>dodpe?edq�fddre?eds�fddtdedu�fgZ@dvZAdw�ZBdx�ZCdy�ZDdz�ZEe/d{�ZFe/d|�ZGd}�ZHd~eIfd��YZJd��ZKd��ZLd��ZMd��ZNd��ZOd��ZPd��ZQd��ZRd��ZSd��ZTd��ZUd��ZVd�eUd��ePfd�eUd��eTfd�eUd��eRfd�eUd��eQfd�eUd��eOfd�eVeSffZWd��ZXd��ZYe?d��ZZe[d��Z\d��Z]d��Z^e[e/d��Z_d��Z`d��Zae?e/e/dd��Zbd��Zcd��Zde/d��Zee/e/e/e/d��Zfd��Zgd��Zhd�eIfd���YZid�d��Zje?d��Zkd��Zle?d��ZmgZngZoiZpiZqd��ZrgZsiZtd��Zud��Zvd��Zwd�e?e/e/d��Zxe?e/e/d��Zye/d��Zzd��Z{d�d�d��Z|d��Z}d�e~fd���YZd��Z�d�eIfd���YZ�d��Z�d��Z�d��Z�d��Z�d��Z�e/d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�dd��Z�e/e/de?d��Z�d��Z�d��Z�d��Z�e/e/d��Z�d��Z�d��Z�e?e/d��Z�e(j��Z�e(j��Z�e(j��Z�d�e[e?ed��ed��fd�e[e?ed��ed��fgZ�e?d��Z�d��Z�d�ed��fgZ�d��Z�d��Z�d��Z�dS(�i(tabsolute_importNi(t_(thextnullidtnullrevtshort(t	bookmarkst	changelogtcopiestcrecordt
dirstateguardtencodingterrort	formattert
logcmdutiltmatchtmerget	mergeutiltobsoletetpatchtpathutiltphasestpycompattrevlogtrewriteutiltscmutiltsmartsettsubrepoutilt
templatekwt	templatertutiltvfs(tdateutilt
stringutiltnsdry-runs)do not perform actions, just print outputttconfirmsask before applying actionstetsshsspecify ssh command to usetCMDt	remotecmds,specify hg command to run on the remote sidetinsecures>do not verify server certificate (ignoring web.cacerts config)tItincludes)include names matching the given patternstPATTERNtXtexcludes)exclude names matching the given patternstmtmessagesuse text as commit messagetTEXTtltlogfilesread commit message from filetFILEtdtdates(record the specified date as commit datetDATEtutusers&record the specified user as committertUSERtTttemplatesdisplay with templatetTEMPLATEtstyles,display using template map file (DEPRECATED)tSTYLEtpRs
show patchtgtgitsuse git extended diff formattlimits!limit number of changes displayedtNUMtMs	no-mergessdo not show mergeststats(output diffstat-style summary of changestGtgraphsshow the revision DAGtattextstreat all files as texttbinarys+generate binary diffs in git mode (default)tnodatessomit dates from diff headerstwsignore-all-spaces'ignore white space when comparing linestbsignore-space-changes+ignore changes in the amount of white spacetBsignore-blank-liness(ignore changes whose lines are all blanktZsignore-space-at-eols#ignore changes in whitespace at EOLtnoprefixs&omit a/ and b/ prefixes from filenamess
show-functions%show which function each change is intreverses&produce a diff that undoes the changestUtunifieds"number of lines of context to showtroots&produce diffs relative to subdirectorytDIRttttoolsspecify merge tooltTOOLtst
similaritys-guess renamed files by similarity (0<=s<=100)t
SIMILARITYtStsubrepossrecurse into subrepositoriestcRsopen changelogtmanifests
open manifesttdirsopen directory manifests:^HG: ------------------------ >8 ------------------------$cC@stjtjf}t||�S(N(t
crecordmodtuihunkRt
recordhunkt
isinstance(txthunkclasses((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytishunk�scC@s^t�}xN|D]F}t|�r|jj�r||kr|j|jj��qqW|S(N(tsetRhtheadert	isnewfiletaddtfilename(tchunkstoriginalchunkstnewlyaddedandmodifiedfilestchunk((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytnewandmodified�s	
	cC@s
|jd�S(Nt|(tsplit(tcmd((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytparsealiases�sc@s8d��|j���fd�}t|d|��S(Nc@sS|jdd�}x:tj�fd��D] \}}||d||�q+WdS(NtlabelR#c@s�S(N(((targs(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt<lambda>�R#(tpopRt	difflabel(torigRxtkwRwRqR2((Rxs7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt	wrapwrite�s%c@s��||�S(N((Rxtkwargs(toldwriteR~(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytwrap�stwrite(R�tsetattr(tuiR�((R�R~s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytsetupwrapcolorwrite�s
		cC@s�yG|rF|r'tj|tj�}n	tj}tj||||�SWn=tjk
r�}|jd|j�|jtd��nXt	j|||�S(Ns%s
sfalling back to text mode
(
Rbt
testdecoratorttestchunkselectort
chunkselectortfilterpatcht
fallbackerrortwarnR0RR(R�t
originalhunkst	usecursesttestfilet	operationtrecordfnR%((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytfilterchunks�s	cC@sftj|�}|jdd�}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(RbtcheckcursestconfigR�R�R�(R�R�R�R�R�R�t	newchunkstnewopts((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytrecordfilter�s
c
@s�tj|�}|j�sR|r4td�|}ntd�}tj|��n|jd�sn|j�n���fd���fd�}	t|||	||�S(Ns)running non-interactively, use %s insteadsrunning non-interactivelyR9c'	@s+t|dt�|d}t|j��dk}|rPtjtd���nd�}|jd�}|s�g}	|	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|j���Wq�tk
r�q�Xq�W|
j|
j|
j}g|D]}||kr�|^q�}|s+|jtd��dSt|
j�}�rI|}n1g|D]$}||ksn||krP|^qP}i}|r�|jjd
�}yt j!|�Wq�t"k
r�}|j#t#j$kr��q�q�Xnz�x�|D]�}t%j&d|j'dd�dd|�\}}t j(|�|j)d||f�t*j+|j,|�|dt�|||<q�Wt-�}x6|D].}|j.�}||kry|j/|�qyqyW|j0�} |j1d�|jdt2�r;t3j4t3j5|j6�}!|j7|!dddd|j8�}"|j9d�|j/|"�|j1d�ng|D]}t j:|j,|��^qB|r�t;j<||j=��}#t>j||j?j@�dt2dtd|#�n| r*y@|j)d�|j)|jA��tjB|||ddd�Wq*tjk
r&}tjt%jC|���q*Xn~g|D]}$|j,|$�^q4}�|||t%jD|��SWdy�|j?}%x}|jE�D]o\}&}|j)d||&f�|%|&d kr�|%jF|&�nt*j+||j,|&�dt�t j:|�q�W|rt jG|�nWnt"k
r%nXXdS(!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||f��dS(Ns%s: %s(RtAbort(tftmsg((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytfailstforceRtoptst
whitespacetchangesserror parsing patch: %ssno changes to record
isrecord-backupstprefixt/Rt.Rasbackup %r as %r
tcopystattreviewR#tactiontdifftrepopathtbranchmergetmatchersapplying patch
teolmodeNsrestoring %r to %r
R"(HtcheckunfinishedtTruetNonetlentparentsRR�RtgettappendtexplicitdirtbadtstatustcheckcommitpatternsRtdifffeatureoptsRLRBtshowfuncR�t
parsepatcht
PatchErrortupdateRrRitfilestAttributeErrortmodifiedtaddedtremovedRtjointostmkdirtOSErrorterrnotEEXISTRtmkstemptreplacetclosetdebugRtcopyfiletwjointstringioRmR�ttelltseektFalseRbtdiffhelptextt
patchhelptexttreadtedittpathttruncatetunlinkRt
matchfilestkeystmergemodtdirstatetp1tgetvaluet
internalpatchtbytestrt	strkwargst	iteritemstnormallookuptrmdir('R�trepoR0RR�twctxRR�R�tvdirsR�tdiffoptstoriginaldiffRoRnR�terrRpt
contendersthtchangedR�tnewfilesR�ttobackuptbackupst	backupdirtfdttmpnametfpR_tfnametdopatcht	patchtextt
reviewedpatchR/tnfR�trealname(t	backupallt
commitfunctfilterfn(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
recordfunc�s�
				
	

%	


	



)
 " 	
c
@s-|j���|||||�SWdQXdS(N(twlock(R�R�R0RR�(R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
recordinwlock�s
(	RtbyteskwargstinteractiveRRR�R�tusernameR�(
R�R�R�t
cmdsuggestR�R�tpatsR�R�R((R�R�R�R�s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytdorecord�s
�tdirnodecB@s;eZdZd�Zd�Zd�Zd�Zd�ZRS(s�
    Represent a directory in user working copy with information required for
    the purpose of tersing its status.

    path is the path to the directory, without a trailing '/'

    statuses is a set of statuses of all files in this directory (this includes
    all the files in all the subdirectories too)

    files is a list of files which are direct child of this directory

    subdirs is a dictionary of sub-directory name as the key and it's own
    dirnode object as the value
    cC@s.||_tg�|_g|_i|_dS(N(R�RitstatusesR�tsubdirs(tselftdirpath((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt__init__�s		cC@s|jj||f�dS(s/Add a file in this directory as a direct child.N(R�R�(R
RmR�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
_addfileindir�scC@s�d|krx|jdd�\}}||jkr^tj|j|�}t|�|j|<n|j|j||�n|j||�||jkr�|jj	|�ndS(s�
        Add a file to this directory or to its direct parent directory.

        If the file is not direct child of this directory, we traverse to the
        directory of which this file is a direct child of and add the file
        there.
        R�iN(
RtR	RR�R�RtaddfileR
RRl(R
RmR�tsubdirtfilept
subdirpath((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR�scc@s8x1|jD]&\}}|tj|j|�fVq
WdS(s=Yield (status, path) for files directly under this directory.N(R�RR�R�(R
R�tst((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
iterfilepaths�scc@s�t|j�dkrI|jj�}||krI||jdfVdSnx%|j�D]\}}||fVqVWxB|jj�D]1}x(|j|�D]\}}||fVq�Wq�WdS(s
        Yield (status, path) obtained by processing the status of this
        dirnode.

        terseargs is the string of arguments passed by the user with `--terse`
        flag.

        Following are the cases which can happen:

        1) All the files in the directory (including all the files in its
        subdirectories) share the same status and the user has asked us to terse
        that status. -> yield (status, dirpath).  dirpath will end in '/'.

        2) Otherwise, we do following:

                a) Yield (status, filepath)  for all the files which are in this
                    directory (only the ones in this directory, not the subdirs)

                b) Recurse the function on all the subdirectories of this
                   directory
        iR�N(R�RRzR�RR	tvaluest	tersewalk(R
t	terseargstonlystRtfpathtdirobj((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR�s(t__name__t
__module__t__doc__RR
RRR(((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR�s				cC@sed}x?tj|�D].}||krtjtd�|��qqWtd	�}d}i}xO|D]G}|dd!}x't||�D]}	|j|	|�q�Wg||<qgWx+|j�D]\}
}||
j	|�q�WxH|j
j�D]7}x.|j|�D]\}
}	||
j	|	�qWq�Wg}
x-|D]%}
||
j
�|
j	||
�q8W|
S(s�
    Terse the status if all the files in a directory shares the same status.

    statuslist is scmutil.status() object which contains a list of files for
    each status.
    terseargs is string which is passed by the user as the argument to `--terse`
    flag.

    The function makes a tree of objects of dirnode class, and at each node it
    stores the information required to know whether we can terse a certain
    directory or not.
    R/RItrR5R8tiR_s'%s' not recognizedR#R�R�tdeletedtcleantunknowntignoredR�ii(R/RIRR5R8RR_(R�R�RR R!R"R�(RR�RR�RRtgetattrRRR�R	RRtsort(t
statuslistRtallstRZtrootobjtpstatust	tersedicttattrnamet
statuscharR�RRRt
tersedlist((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyttersedirs. 


cC@s:|j�}g|D]}d|^q}dj|�dS(s0Surround lineswith a comment char and a new lines# %ss
(t
splitlinesR�(trawtlinestlinetcommentedlines((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
_commentlines8scC@s�tjj|�}|j�s"dStj|d�}g|j�D]}||�rB|^qB}|r�djgt	|�D](}dt
j|jt
j�|�^qy�}td�|}ntd�}t|�S(Ns
s    %ssSUnresolved merge conflicts:

%s

To mark files as resolved:  hg resolve --mark FILEsNo unresolved merge conflicts.(R�t
mergestateR�tactiveRRR�t
unresolvedR�tsortedRtpathtoRURtgetcwdRR3(R�R4R/R�tunresolvedlistR�tmergeliststrR�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
_conflictsmsg>s+;cC@s td�||f}t|�S(Ns%To continue:    %s
To abort:       %s(RR3(tcontinuecmdtabortcmdR�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt_helpmessageSs	
cC@s
tdd�S(Nshg rebase --continueshg rebase --abort(R?(((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
_rebasemsgXscC@s
tdd�S(Nshg histedit --continueshg histedit --abort(R?(((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt_histeditmsg[scC@s
tdd�S(Nshg unshelve --continueshg unshelve --abort(R?(((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt_unshelvemsg^scC@s
tdd�S(Nshg graft --continueshg graft --abort(R?(((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt	_graftmsgascC@s
tdd�S(Ns	hg commitshg merge --abort(R?(((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt	_mergemsgescC@std�}t|�S(Ns�To mark the changeset good:    hg bisect --good
To mark the changeset bad:     hg bisect --bad
To abort:                      hg bisect --reset
(RR3(R�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
_bisectmsgisc@s
�fd�S(Nc@s|jj��S(N(Rtexists(R�(Rm(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRypR#((Rm((Rms7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytfileexistspredicateoscC@st|dj��dkS(Ni(R�R�R�(R�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt_mergepredicatersthisteditshistedit-statetbisectsbisect.statetgraftt
graftstatetunshelvetshelvedstatetrebasetrebasestateRcC@sdt|jjdd��}xBtD]:\}}}||krCq"n||�r"|||fSq"WdS(Ntcommandssstatus.skipstates(RiR�t
configlisttSTATES(R�tskiptstatetstatedetectionpredicatetmsgfn((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
_getrepostate�sc
C@s�t|�}d}|r�|\}}}td�|}|jdt|�d|�t|�}|r�|jd|d|�n|r�|�}	|jd|	d|�q�ndS(Nsstatus.morestatuss.The repository is in an unfinished *%s* state.s%s
Rw(RXRtplainR3R<(
R�tfmt
statetupleRwRURVt
helpfulmsgtstatemsgtconmsgthelpmsg((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
morestatus�s	cC@s*i}i}||kr$|g}n|j�}g}x�|D]�}t|�}|j|�d}	||krw|}	n3|s�x*|D]}
|
j|�r�|
}	Pq�q�Wn|	dk	r=|djd�s�|	jd�r�|||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.
    iR�N(R�RvtextendR�t
startswith(RuttabletstricttchoicetdebugchoiceR�tallcmdsR%taliasestfoundRI((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytfindpossible�s0

	
"
	cC@s�t|||�\}}||kr,||St|�dkr_t|�}tj||��n|ryt|j��dStj||��dS(s9Return (aliases, command table entry) for command string.iiN(RjR�R7RtAmbiguousCommandtlistRtUnknownCommand(RuRcRdReRgtclist((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytfindcmd�sc@s�|j���|j���|jd���t|�tj||�}|s^tjd��n|jd|�}t	|�dkr�tjt
d���ntj||d�||j
�}|j�j�|kr||j�krtjt
d���n|jd|�r*tjt
d	���n|jd
|�rTtjt
d���n|jd|�r~tjt
d
���ni}ddlm}xu|D]m}||��j�}	|	|kr�q�n�fd�}
|jdt�j��|	|f��j�}t�j��|d<�j�j�}�j�j�}
||kra||d}n|
|kr~||
d}
n|j|||
f�j��j�|
d�j�d�j�d|d|�}|j|�}|f|�j�<|jdt|��q�Wtj||ddt�|d}t	|j!��dkr�|j"|j�j��}|dk	r�ddlm#}|j$||ddt�q�n|j%t
d�t	|��WdQXWdQXWdQXdS(s/ Change the branch name of given revs to label tbranchessempty revision sets
roots(%ld)is,cannot change branch of non-linear revisionsschange branch ofs(a branch of the same name already existssmerge() and %lds&cannot change branch of a merge commitsobsolete() and %lds,cannot change branch of a obsolete changesetsheads(%ld) - head()s)cannot change branch in middle of a stack(tcontextc@s(y�|SWntjk
r#dSXdS(N(RtManifestLookupErrorR�(R�tnewctxR�(tctx(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt	filectxfn�ss*changing branch of '%s' from '%s' to '%s'
t
branch_changeiR9R6textratbranchsnew node id is %s
s
branch-changetfixphase(thgt
quietemptys changed branch on %d changesets
N(&R�tlockttransactiont
bailifchangedRtrevrangeRR�trevsR�RRtprechecktfirstR�Rxt	branchmapR#RqR�RtnodeRwtp2tmemctxtdescriptionR�R9R6t	commitctxtcleanupnodesR�R�R�R�RzR�R�(R�R�R�RwtrootsRUtreplacementsRqtrevt	oldbranchRuRwR�R�tmctnewnodeR�tnewidRz((Rts7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytchangebranch�sr


+

				
 cC@sUxNtjjtjj|d��sP|tjj|�}}||krdSqW|S(Ns.hg(R�R�tisdirR�tdirnameR�(R@toldp((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytfindrepo's
$c	C@s�|r9|jj�tkr9tjtd�d|��n|j�d \}}}}|sm|sm|sm|r�tjtd�d|��n|d}x0t|j	�D]}|j
|�jd|�q�WdS(s� enforce the precondition that working directory must be clean.

    'merge' can be set to false if a pending uncommitted merge should be
    ignored (such as when 'update --check' runs).

    'hint' is the usual hint given to Abort exception.
    soutstanding uncommitted mergethintisuncommitted changesN(R�R�RRR�RR�R�R7tsubstatetsubR~(	R�RR�R�R�R�RRtRZ((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR~/s	
cC@s�|jd�}|jd�}|rB|rBtjtd���n|r�|r�y@t|�rp|jj�}ndjtj	|�j
��}Wq�tk
r�}tjtd�|tj
|j�f��q�Xn|S(s3 get the log message according to -m and -l option R0R3s6options --message and --logfile are mutually exclusives
s"can't read commit message '%s': %s(R�RR�RtisstdiofilenametfinR�R�RtreadfileR.tIOErrorRt
strtolocaltstrerror(R�R�R0R3tinst((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
logmessageAs
"#cC@sHt|t�r |r@|dSn t|j��dkr@|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(RetboolR�R�(t	ctxorbooltbaseformname((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
mergeeditformTs	c@s@|s�s�r%���fd�S�r8�fd�StSdS(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|||d�d�d��S(Nt
finishdesctextramsgteditform(tcommitforceeditor(RR_RZ(R�R�R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRy{sc@st|||d��S(NR�(tcommiteditor(RR_RZ(R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRy�R#N(R�(R�R�R�R�R�((R�R�R�s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytgetcommiteditores

cC@s|g}xftj|dt�D]O\}}}|dkrW|jtj|||!��q|j|||!�qWdj|�S(NR/tstringR#(RtscantemplateR�R�R!t	escapestrR�(ttmpltpartsttyptstarttend((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt_escapecommandtemplate�s% cC@s/|s
|Stj|t|��}|j|�S(s�Expand a literal template 'tmpl' in a way suitable for command line

    '\' in outermost string is not taken as an escape character because it
    is a directory separator on Windows.

    >>> from . import ui as uimod
    >>> ui = uimod.ui()
    >>> rendercommandtemplate(ui, b'c:\\{path}', {b'path': b'foo'})
    'c:\\foo'
    >>> rendercommandtemplate(ui, b'{"c:\\{path}"}', {'path': b'foo'})
    'c:{path}'
    (R
t
maketemplaterR�t
renderdefault(R�R�tpropsRW((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytrendercommandtemplate�s
cC@su|j�}tj|j|�}tj|j|dtjd|�}i|d6}|rh|j|�n|j|�S(s�Expand a literal template 'tmpl' byte-string against one changeset

    Each props item must be a stringify-able value or a callable returning
    such value, i.e. no bare list nor dict should be passed.
    tdefaultst	resourcesRt(	R�R
ttemplateresourcesR�R�RtkeywordsR�R�(RtR�R�R�ttresRWtmapping((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytrendertemplate�s	
c
C@sidd6dd6dd6dd6d	d
6dd6dd
6}|d!k	rPd|d<n|d!k	rid|d<n|d!k	r�|d!k	r�d|d<n|d!k	r�d|d<d|d<d|d<ng}xMtj|dt�D]6\}}}	|dkr|j|||	!�q�n|}
x�|
|	kr|jd|
|	�}|dkrc|jtj||
|	!��Pn|jtj||
|!��|d|	kr�tj	t
d���n||d|d!}|d}
y|j||�Wqtk
rtj	t
d�|��qXqWq�Wd j|�S("sConvert old-style filename format string to template string

    >>> _buildfntemplate(b'foo-%b-%n.patch', seqno=0)
    'foo-{reporoot|basename}-{seqno}.patch'
    >>> _buildfntemplate(b'%R{tags % "{tag}"}%H')
    '{rev}{tags % "{tag}"}{node}'

    '\' in outermost strings has to be escaped because it is a directory
    separator on Windows:

    >>> _buildfntemplate(b'c:\\tmp\\%R\\%n.patch', seqno=0)
    'c:\\\\tmp\\\\{rev}\\\\{seqno}.patch'
    >>> _buildfntemplate(b'\\\\foo\\bar.patch')
    '\\\\\\\\foo\\\\bar.patch'
    >>> _buildfntemplate(b'\\{tags % "{tag}"}')
    '\\\\{tags % "{tag}"}'

    but inner strings follow the template rules (i.e. '\' is taken as an
    escape character):

    >>> _buildfntemplate(br'{"c:\tmp"}', seqno=0)
    '{"c:\\tmp"}'
    s{node}tHs{rev}tRs{node|short}R�s${sub(r"[^\w]", "_", desc|firstline)}R/s7{if(revwidth, pad(rev, revwidth, "0", left=True), rev)}Rt%s{reporoot|basename}RNs{total}tNs{seqno}R"s3{pad(seqno, total|stringify|count, "0", left=True)}s{pathname|basename}RZs-{if(pathname|dirname, pathname|dirname, ".")}R5s
{pathname}R@R/R�iis)incomplete format spec in output filenameis-invalid format spec '%%%s' in output filenameR#N(
R�RR�R�R�tfindR!R�RR�RtKeyErrorR�(
tpatttotaltseqnotrevwidthtpathnametexpandertnewnameR�R�R�RR"R_((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt_buildfntemplate�sP






%

cK@s2|s
|St||�}t||tj|��S(N(R�R�RR(RtR�R�R�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytmakefilename�scC@s|p|dkS(sATrue if the given pat looks like a filename denoting stdin/stdoutt-((R�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR��st_unclosablefilecB@s>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cC@s
||_dS(N(t_fp(R
R�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRscC@sdS(N((R
((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR�scC@s
t|j�S(N(titerR�(R
((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt__iter__scC@st|j|�S(N(R#R�(R
tattr((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt__getattr__	scC@s|S(N((R
((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt	__enter__scC@sdS(N((R
texc_typet	exc_valuetexc_tb((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt__exit__s(RRRR�R�R�R�R�(((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR��s					twbcK@sn|dk}t|�rO|j�}|r9|jj}n|jj}t|�St|||�}t||�S(NRtrb(RR�(R�R�R�tfoutR�R�R�topen(RtR�tmodeR�twritableR�R�tfn((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytmakefileobjs
cC@s�|d}|d}|d}d}|r?|r?td�}nZ|rZ|rZtd�}n?|sl|sl|r�|r�td�}q�|s�td�}q�n|r�tj|��nd}	|r�|r�|j�j}	n�|rHd|jkrtjtd	���n|jd
�s|d
}n|jj	|�}
t
|
�r�|
}	q�nH|rc|jj	d�}	n-|r�|j|�}t
|�r�|}	q�n|r�t|	t
j
�r�q�tj|	d�r�|	j}	q�|	dk	r�tjtd
�|	��q�q�n|	s�|stjtd���n|s<tj|td���ntjj|�sjtjtd�|��nt
j
tjtj�dt�|d d�}	n|	S(s:opens the changelog, manifest, a filelog or a given revlogRR`Ras: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 enabledR�R#t_revlogs!%r does not appear to be a revlogscannot give path to non-revlogsinvalid argumentssrevlog '%s' not foundtauditi����s.iN(R�RRR�t
unfilteredRtrequirementstendswithtmanifestlogt
getstorageR�tfileReRRtsafehasattrR�tCommandErrorR�R�tisfiletvfsmodRRR9R�(R�Rutfile_R�treturnrevlogtcltmfRaR�Rtdirlogtfilelog((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytopenstoragesd



"cC@st||||dt�S(spObtain a revlog backing storage of an item.

    This is similar to ``openstorage()`` except it always returns a revlog.

    In most cases, a caller cares about the main storage object - not the
    revlog backing it. Therefore, this function should only be used by code
    that needs to examine low-level revlog implementation details. e.g. debug
    commands.
    R�(R�R�(R�RuR�R�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
openrevlog\s
c	@s��j��i��jd���jd���d�	�����	fd�}���������	f	d�}���fd�}���fd�}tj|�}|s�tjtd���nt|�dkr�tjtd	���n|j	�}	t
jj|	�o+t
jj
|	���s�t|�dksYtj|d
�rqtjtd���ntj|	�r�tjtd�|	��q�n|}
�r�|}
ng}xE|D]=}||�}
|
s�q�n|j|
||	|
�|
f�q�W|s tjtd
���nd
}xV|D]N\}}
x?|
D]7\}}}|||||�|�r@|d7}q@q@Wq-W|d
kS(Ntaftertdry_runc@sg}�rd}nd}tj�|g�dt�}x��j|�D]�}�j|}|j|�}|j|�}||kr�|r�|dkr��jtd�|�n|rI|dkrI�jtd�|�qIqIn|j	|||f�qIW|S(Nt?s?rtglobbeds&%s: not copying - file is not managed
Rs2%s: not copying - file has been marked for remove
(
RRR�twalkR�treltexactR�RR�(R�tsrcst	badstatesR/tabsRUR�R�(R�R�R�R�R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytwalkpatss$	
c
@s�tj�j�|�}d|krY|jdd�\}}�jj|�d|}n�j|��}�j|�}�j|�}	�j|}
tj	�|��j
|�}|dk	r��jt
d�|�j|���j|��f�tStjj|�}t}
|r~||kr~�jj|��jj|�kr~�sl�jt
d�|�tSt}t}
q~n�r�|s��rR|
dkrR�dsR|
dkrt
d�}�r�d}nd	}�r�t
d
�|}q-t
d�|}n-t
d�}�r!t
d
�}nt
d�}�j||��j|�tSn�r�|s��r��jt
d�||f�n�jt
d�||f�tSnB�s�y�|r�tj|�ntjj|�p�d}tjj|�stj|�n|
r4|d}tj|	|�tj||�ntj|	|d��t}Wq�tk
r�}|jtjkr��jt
d�|�t}q��jt
d�|tj|j�f��r�t
d
�}nt
d�}tSq�Xn�j s�|r@�r �j!t
d�||f�q@�j!t
d�||f�n|�|<tj"���||d�d���r��r��r�|r�|
r��j#j$dd�}�j%j&|d|�n�j'|g�ndS(NR�is*%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--forces;('hg rename %s' to replace the file by recording a rename)
s7('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
R�s	~hgrenameR�s!%s: deleted in working directory
s%s: cannot copy - %s
smoving %s to %s
scopying %s to %s
tdryruntcwdR�tremoveemptydirsR�((Rt	canonpathRUtrsplitR�t	normalizeR8R�Rt
checkportableR�R�R�RR�R�R�tlexistsR�R�R�R�tmakedirstrenameRR�R�R�tENOENTRR�R�tverboseR�tdirstatecopyR�t
configbooltwvfst
unlinkpathtforget(tabssrctrelsrctotargetR�t	abstargettabspathtabsnamet	reltargetttargettsrcRUtprevsrcRFtsamefileR�tflagsR�t	targetdirttmpt	srcexistsR�R�(	R�RRR�RR�ttargetsR�R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR��s�

		
	



	  


c@s�tjj|�r�tj�j�|�}tj|�}�r^ttjj	|�d��nt|���r��tt
j�7�n��fd�}n'�r��fd�}n�fd�}|S(Nic@s tjj�tj|���S(N(R�R�R�Rt	localpath(R@(tdesttstriplen(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRyR#c@s(tjj�tjjtj|���S(N(R�R�R�tbasenameRR$(R@(R%(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRysc@s�S(N((R@(R%(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRyR#(R�R�R�RRRURR$R�RtRtossep(R�R%R�tabspfxtres(Rt
destdirexistsR�(R%R&s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyttargetpathfnsc@sutj|�r!�fd�}nPtj�j�|�}t|�t�dd�krJ��fd�}tj|�}t|���r��ttj	�7�nt
jjt
jj
�t
jj|�d��r5|��}tt
jj|�d�}|r|ttj	�7}n||�|kr5|�q5n��fd�}n'�rb�fd�}n�fd�}|S(Nc@s(tjj�tjjtj|���S(N(R�R�R�R'RR$(R@(R%(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRysic@s`d}xS�D]K}tjj�tj|d�|�}tjj|�r
|d7}q
q
W|S(Nii(R�R�R�RR$R
(R&tscoreRZRW(R%R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytevalpath"s
&ic@s tjj�tj|���S(N(R�R�R�RR$(R@(R%R&(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRy5sc@s(tjj�tjjtj|���S(N(R�R�R�R'RR$(R@(R%(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRy:sc@s�S(N((R@(R%(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRy=R#(tmatchmodtpatkindRRRUR�RR$RR(R�R�R�R�Rt(R�R%R�R*R)R.R-t	striplen1(RR+R�(R%R�R&s7/usr/lib64/python2.7/site-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 copy(R9R�R�Rt
expandpatsRR�RR�RzR�R�R�tislinkR/R0RtendswithsepR�(R�R�RR�RRR�R,R2R%ttfntcopylistR�R�terrorst
targetpathRRR�((
R�RR+RR�RR�R#R�R�s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytcopyhsL
'u(%%	
#c%C@s�ddlm}|jd�}|jd�}	|jd�pI|jd�}
|jd�pg|jd�}|jd�}|jd�}
|jd	�}|jd
�}|jd�}|jd�}|jd
�}|d}|d}t|jd�p�d�}|sd$d$tfSt}t||�}|r:|}	n|	rO|	j�}	nd$}	|jd|	pgd�t	|�dkr�|j
|t�n|jd�r�|
s�|r�tj
td���n||}||p�t}n�|rwy?||}||}||dkr(|d}|t}nWn tjk
rK|\}}nX|j�tkr�|jtd��q�n|\}}d$}|r||dkr�|||j��n||dkr�|j|j�|j��n|jd�s�|r|jj|pd�n|jdt�}t�}y9tj|||d|d|d|dd$d|d�WnFtjk
r�}|s�tj
tj|���n|r�t}q�nXt|�}|r�|	r|j
|	�qq8|jd�s�|r�d$}ntj||p
g�}t|d$d�}|jd�r;d$}ntd|tj |��}i}x%t!D]} t"| ||||�qcWi}!|r�t|!d+<n|j#j$|!d ��O|j%|	|
|d!|d"|d#|�}x t&D]} t'| ||�q�WWd$QXn2|jd�s|r*|p$d}n|j(�}tj)�}"z�t�}y,tj*||||"||||dd$�Wn.tjk
r�}tj
t+j,|���nX|jd�r�d$}ntdd%�}|j-||j�|j�f|	d|d&|"d|
d|d|d"|�}#|#j%�}Wd$|"j.�X|jd�rc|rc|jtd'��n@|jd�r�|s�t/|�|
kr�tj
td(���ntd)�}$|r�td*�t0|�}$n|$||fS(,s�Utility 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.

    :patchdata: a dictionary containing parsed patch data (such as from
                ``patch.extract()``)
    :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(RqRmR0R9R6RxtnodeidR�R�t	no_committ
import_branchtbypasststripR�R[ismessage:
%s
R#R�snot a Mercurial patchs\warning: import the patch as a normal revision
(use --exact to import the patch as a merge)
tdefaulttpartialR�R�gY@s
import.normalR�R�tallowemptycommittimportRteditorRwNs
import.bypassRus3warning: can't check exact import with --no-commit
s%patch is damaged or loses informationsapplied to working directorys
created %s(R�RB(1R#RqR�tfloatR�R�R�R?R�R�R�RRR�Rt	RepoErrorR�R�t
setparentsR�t	setbranchRiRR�RR�R�RlRR�R�R�R�textrapreimporttextrapreimportmapR�tconfigoverrideR�textrapostimporttextrapostimportmapRxt	filestoret	patchrepoR!tforcebytestrR�R�RR(%R�R�t	patchdataR�R�tmsgst
updatefuncRqR�R0R9R6RxR;R�R�tnocommittimportbranchR�R?R�tsimtrejectstcmdline_messageR"RAR�R%R/R�RDRwtidfunct	overrideststoreR�R�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyttryimportonews�


	



	
			


			(cC@s�tj|�}g|j�D]}|r|j�^q}	|j�}
|rY|	j�n|	rl|	d}nt}|jd|�|jd�|j	dd|j
��|jd|j��|j	dd|j|j���|j
|
o�|
d	kd
d|
�|j	dd
t|��|jdt|��t|	�dkrc|jdt|	d��n|jd|jtjt|	�dd��xAtD]9}t|||�}
|
dk	r�|jd|
�q�q�W|j	dd|j�j��|jd�|j�rUtj||||d|�}xa|D]\}}|j|d|�q/Wn7tj||||d|�}|jddj|��dS(NiRts# HG changeset patch
R9s
# User %s
s
# Date %d %d
R6s
#      %s
R@Rxs# Branch %s
R�s
# Node ID %s
s
# Parent  %s
iR�tnames# %s
tdescs%s
s
R�RwR�R#(RtbinnodeR�R�RxRRRRqRYR�R9R6t
formatdatet	condwriteRR�tdatat
formatlistRtmaplisttextraexporttextraexportmapR�R�trstriptisplainRtdiffuiR�R�(R�RtRZRt
switch_parentR�R�R�R@R�RxtprevtheaderidRjt	chunkiterRqRw((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
_exportsingle)s@+


"
+

c
	C@szxst|d�D]b\}}||}	|jd�sL|jjd|�n|j�t||	|||||�qWdS(s,Export changesets to stdout or a single fileit<s%s
N(t	enumerateRbR�tnotet	startitemRn(
R�R�RZR%RjR�RR�R�Rt((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt_exportfileTs

cC@s't|�}td�|D��}tj�}	xgt|d�D]V\}
}||}t||d|d|
d|�}
|	j|
g�j|
|f�q>Wx�|	D]�}
tj	||
��f}|j
jd|
�xH|	|
D]<\}
}|j�||}t
||||||
|�q�WWdQXq�WdS(s,Export changesets to possibly multiple filescs@s!|]}tt|��VqdS(N(R�tstr(t.0R�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pys	<genexpr>asiR�R�R�s%s
N(R�tmaxRtsortdictRpR�t
setdefaultR�R
tmaybereopenR�RqRrRn(R�R�tbasefmt
fntemplateRjR�RR�R�tfilemapR�R�RtR%RZ((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt_exportfntemplate]s 
#


shg-%h.patchcC@sXtj|||�|s8t|||d|||�nt|||||||�dS(s�export changesets as hg patches

    Args:
      repo: The repository from which we're exporting revisions.
      revs: A list of revisions to export as revision numbers.
      basefm: A formatter to which patches should be written.
      fntemplate: An optional string to use for generating patch file names.
      switch_parent: If True, show diffs against second parent when not nullid.
                     Default is false, which always shows diff against p1.
      opts: diff options to use for generating the patch.
      match: If specified, only export changes to files matching this matcher.

    Returns:
      Nothing.

    Side Effect:
      "HG Changeset Patch" data is emitted to one of the following
      destinations:
        fntemplate specified: Each rev is written to a unique file named using
                            the given template.
        Otherwise: All revs will be written to basefm.
    s	<unnamed>N(Rt
prefetchfilesRsR}(R�R�RzR{RjR�R((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytexportss
cC@sitj|||�t|dd�}tj|j|di��#}t|||||||�WdQXdS(s*Export changesets to the given file streamR]s	<unnamed>RN(RR~R#R
R�Rs(R�R�R�RjR�RR%RZ((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
exportfile�sc	C@sr|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�tjtj|�}|jdd|j|dddd
��|jd�dS(sdutility function to display obsolescence marker in a readable way

    To be used by debug function.tindexs%i tprednodes%s t	succnodesR]R�tflags%X tparentnodess{%s} tseps, R6s(%s) tmetadatas{%s}tfmts%r: %rs
N(R�R�RR�R�RaRctmapRR�R`R6R�R:RzRtrapplytmaybebytestrt
formatdictRY(RZtmarkerR�tsuccsR�tmetatsmeta((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
showmarker�s"("(c@s�tj|��tj|�}i���fd�}xnt||idd6|�D]P}|j�}|�krS|jtd�|tj	�|�f�d|SqSWt
jtd���dS(s;Find the tipmost changeset that matches the given date specc@s3|j�}�|d�r/|�|j�<ndS(Ni(R6R�(RttfnsR5(tdftresults(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytprep�sR�sfound revision %s from %s
s%ds revision matching date not foundN(R t	matchdateRtmatchalltwalkchangerevsR�R�R�RtdatestrRR�(R�R�R6R/R�RtR�((R�R�s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytfinddate�s#iicc@s/x(tr*|V||kr|d9}qqWdS(Ni(R�(t
windowsizet	sizelimit((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytincreasingwindows�s	cC@s�|jd�p|jd�}|jd�rFtj||d�}n[|rp|jj�tkrptj�}n1|r�|jd�}ntj	|�}|j
�|S(Ntfollowtfollow_firstR�sreverse(:.)(R�RRR�R�RRtbasesetR�tspansetRR(R�R�R�R�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt	_walkrevs�s
t
FileWalkErrorcB@seZRS((RR(((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR��sc@s�t�}g�t|�t|��}���fd�}����fd�}xW|�D]L\}	}
�j|	�}t|�s�|
dkr_�r�tjtd�|	��nt	d��q�q_n|
dkr�t|�d}n|j
|
�}|j|�h}
x�|||�D]�\}}}�sC||krkqqkn(||
krUqn|rk|
j|�n|j
|g�j|	�|j|�|r�j|�qqWq_W|S(s�Walks 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	@s�t��}g}x�tjd|d�D]�}|j|�}|�krPq)n||kr`Png}x<|j|�D]+}|tkrv|j|j|��qvqvW|j|�}|j||�o�|j|�f�q)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(
R�Rtxrangetlinkrevt
parentrevsRR�R�trenamedtreversed(	R�tlasttcl_countR�tjR�tparentlinkrevsR@R"(R�tminrevR�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
filerevgen�s c3@s��d}xe�j�D]W}�rc||krKtjtd�|��n|||j�fVq|dfVqWx�D]}|VqyWdS(NR�s/cannot follow file not in parent revision: "%s"(R�RR�RtfilenodeR�(tpctxRmt
filename_node(RR�RR�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt	iterfiless


s$cannot follow nonexistent file: "%s"sCannot walk via filelogiN(RitminRvR�R�R�RR�RR�R�R�R�RxR�Rl(R�RR�R�tfncachetwantedtmaxrevR�R�R�R�R�R�t	ancestorsR�tflparentlinkrevstcopied((RR�RR�R�s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytwalkfilerevs�s>	
	
t
_followfiltercB@seZed�Zd�ZRS(cC@s+||_t|_t�|_||_dS(N(R�RtstartrevRiR�t	onlyfirst(R
R�R�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR@s		c@s��fd�}�jtkr+|�_tS|�jkr��jsY�jj�j�nx�||�D])}|�jkrf�jj|�tSqfWn^�js��jj|�j��n|�jkr��jj|��jj||��tStS(Nc@sF�jr#�jjj|�dd!Std��jjj|��SdS(NiicS@s
|tkS(N(R(Rf((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRyKR#(R�R�RR�tfilter(R�(R
(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytrealparentsGs		(R�RR�R�RlR�tremoveR�(R
R�R�tparent((R
s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRFs$			(RRR�RR(((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR�?sc
@s3�jd���jd�p*�jd��t�����sFgSt��	�j�pt�j�ot�jd�}i��j��j�s��r���	ny|syt�������	Wqtk
rt}x;�j	�D]%}|dks|�j
kr�Pq�q�WgSqXn|ro�r>tjt
d���ndtf����fd��Y}|��	nx��jd	d�D]|}�|j�}t��}t�d
�d�}	x@tj||	dd�D]%}
|j|
�r��	|
g�	q�q�Wq�W����������	f
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.t	all_filesR�R�R�R�s5can only follow copies/renames for explicit filenamest
lazywantedsetc@s5eZ�fd�Z���fd�Zd�ZRS(c@st�|_t��|_dS(N(RiR�(R
(R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR�sc@s�||jkrtS||jkr&tS|jj|��|�}g|j�D]}�|�rO|^qO}|r�|�|<|jj|�tStSdS(N(RiR�R�R�tdiscardR�Rl(R
tvalueRtR�tmatches(tchangeR�R(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt__contains__�s+
cS@s$|jj|�|jj|�dS(N(R�R�Ri(R
R�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR��s(RRRR�R�((R�R�RR�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR��stpruneii����ic	3@sh�rB�j�rBt�	d�jd�����fd�}n�fd�}t�
�}t}x�t�D]�}g}xXtj|�D]G}t|d�}|dkr�t
}Pq�||�r�|j|�q�q�Wxct|�D]U}�j|�}�|��|s)���fd�}|�}n��|�q�Wx|D]}�|�VqAW|rmPqmqmWdS(NR�R�c@s�j|�o|�kS(N(R(R�(tffR�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytwant�sc@s
|�kS(N((R�(R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR��sc3@sJ�rt��}n�j�}x"|D]}�|�r(|Vq(q(WdS(N(R�R�(tfiterR�(tallfilesRtR(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
fns_generator�s
(
talwaysR�R�R�R�R�RR�tnextR�R�R�R7(	R�titt
stopiterationR�tnrevsRR�R�R�(
R�R�R�R�RR�tprepareR�R�R�(RtR�s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytiterate�s4
((R�R�RitanypatsR�t__getitem__R�R�R�R�R[RR�RtobjectR�R�R�RR�R(R�RR�R�tslowpathR�R�R�R�tstopRfR�((
R�R�R�R�RR�R�R�R�R�s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR�esD	(		
% *(c@s��fd�}g���fd�}g}|d}	d}
tj|�\}}|s^|rytj|||j�}
n|j�dt��tj�|�}
|j}x�t	|j
|
dt	|	j�dtdtdt��D]�}�j
|�}|s |r�||	kr�|jj|�r�|
r3|
|�n|j|�|jsP|r||jtd��j|�d	d
�q|q�q�Wx�t	|	j�D]�}|	j|�}yltj|��}|jd�r��j|j||�t|��n"�j|j||�t|��Wq�tjk
rD|jtd�||��q�Xq�W|jd�s�|	j|��}�j�fd
�|D��n�S(Nc@stjj�|�S(N(R�R�R�(R�(R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRy�R#c@s�j|�p�j||�S(N(R�R�(Rfty(R�R(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRy�R#tincludeexactR^R!R"tfulls
adding %s
Rwsui.addremove.addeds#skipping missing subrepository: %s
R�c3@s'|]}|�j�kr|VqdS(N(R�(RuR�(R(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pys	<genexpr>s(R�RtcheckportabilityalerttcasecollisionauditorR�tnarrowmatchR�R/tbadmatchR7R�R�R�R�RR
R�RR�RR�R�t
subdirmatcherR�RaRlRtLookupError(R�R�RR�texplicitonlyR�R�tbadfntnamesR�tccatabortR�R�R�R�R�tsubpathR�tsubmatchtrejected((R�RR�s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRl�sH
	!+

%& cC@s|j||<|jjd||jf�xN|jd�D]=}||}x*|jD]}|j|�j||�qTWq:WdS(Nsadding %s = %s
sfilelog("path:.hgsub")(RUR�R�R�R�R�t
addwebdirpath(R�t
serverpathtwebconfRRtR�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR� s

c@sY|r$|r$tjtd���n�fd�}g���fd�}|d}	g}
|jdtj�|�dt�}t|j	|j
|j|j�}|r�g|D]}
�j
|
�r�|
^q�}nx�t|	j�D]�}|	j|�}y�tj|��}|j|�d|d|�\}}�jg|D]}
|d|
^q?�|
jg|D]}
|d|
^qg�Wq�tjk
r�|jtd	�||��q�Xq�W|srx��j�D]�}
|
|jkr�|jj|
�r�|
|
krk|jj|
�rX|jj|
�|jkr5q�n|jtd
��j|
��n�j|
�qkq�q�Wn|r�td�}x|D]}|jtd�||f�}|d
kr6xv|d
kr2xA|j|�dD],\}}|jd|t j!|�f�q�W|jtd�||f�}q�Wn|dkrHq�q�|dkrd|j"|�q�|dkr�|j#|�}||3Pq�|dkr�Pq�q�WnxV|D]N}
|j$s��j
|
�s�|r�|jtd��j|
�dd�q�q�W|sO|	j|����j�fd��D��|
j�fd�|D��n�|
fS(Ns/cannot specify both --dry-run and --interactivec@stjj�|�S(N(R�R�R�(R�(R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRy,R#c@s�j|�p�j||�S(N(R�R�(RfR�(R�R(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRy.R#RR RRR�s#skipping missing subrepository: %s
s+not removing %s: file is already untracked
s�[Ynsa?]$$ &Yes, forget this file$$ &No, skip this file$$ &Skip remaining files$$ Include &all remaining files$$ &? (display help)sforget %s %siis%s - %s
iiisremoving %s
Rwsui.addremove.removedc3@s'|]}|�j�kr|VqdS(N(R�(RuR�(R(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pys	<genexpr>tsc3@s!|]}|�kr|VqdS(N((RuR�(R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pys	<genexpr>us(%RR�RR�R�R/R�R�R7R�R�RR R�R�R�R�RRaR�R�R�RR�RFRR�R�R�tpromptchoicetextractchoicesR�RtlowerR�R�R(R�R�RR�R�RRR�R�R�tforgotRZRR�R�R�R�tsubbadt	subforgott	responsesRmRR_RWtfnindex((R�RR�R�s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR)sz
$$+(," $
 cC@s�d}|jp"ddh|j�@}x�|j|�D]�}|j�|jd|�|r�||}	|jdd|	j�|	j��n|jd|�|j	||j
|��d}q5Wx�t|j�D]�}
t
j|
|�}|s
|j|
�s
t|j��r�|j|
�}yC|j|
�p1|}
|j|||||
�dkr^d}nWq�tjk
r�|jtd	�|j|
��q�Xq�q�W|S(
NitsizeRRts
size flagss% 10d % 1s R�is#skipping missing subrepository: %s
(RtdatahintR�RrRqR�R�RRbRYR�R7R�R/R�R�tanyR�R�t
printfilesRR�R�RR(R�RtR/RZR�R^trett	needsfctxR�tfcR�R�R�trecurse((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR�xs.

%
'!
c	@s��fd�}	d}
|jd|dt�}|d|d|d|df\}}
}}|d�|dkr�g}t}nt}t�j�}|jtd�d	t|�d
td��}x�|D]�}t	j
||�}|s|j|�st|j
��r�|j��j|�}y.|j|�|||||�rNd}
nWq�tjk
r�|jtd�|	|��q�Xq�q�W|j�tj|�}|j
�}|jtd
�d	t|�d
td��}x�|D]����fd�}|j��|kp�j��}�|jks�|s��dks�|�s��|kr\q�n|jj��r�|jj��r�|jtd�|j���q�|jtd�|j���nd}
q�W|j�|r�||||
}nz|r�|}||
|}|jtd�d	t|�d
td��}xV|D]N�|j�|jsh�|kr�|jtd�|j���nd}
qCW|j�n�||}|jtd�d	t|�t|
�d
td��}x>|D]6�|j�|jtd�|j���d}
q�Wx>|
D]6�|j�|jtd�|j���d}
q+W|j�t|�}|jtd
�d	t|�d
td��}xZ|D]R�|js�|j��r�|j�|jtd�|j��dd�q�q�W|j�|s�|j��s|sxT|D]I��|
krGq/n|jj dd�}|jj!�dtd|�q/Wn|dj"|�WdQXn|r�x|D]}|j#|�q�Wn|
S(Nc@stjj�|�S(N(R�R�R�(R�(R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRy�R#iRR iiit	searchingR�tunitR^s#skipping missing subrepository: %s
tdeletingR�c@s/x(�jD]}�j|d�r
tSq
WtS(NR�(R�RbR�R�(R�(R�R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt	insubrepo�sR�s"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
Rwsui.addremove.removedR�Rt
ignoremissingR�($R�R�R�R�R7R�tmakeprogressRR�R/R�R�R�R�t	incrementR�tremovefilesRR�R�tcompleteRtdirsthasdirR�RRFR�R�RR�R�RRRR�(R�R�R/R�R�R�R^RtwarningsR�R�RZR�R�RR R�tsubstprogressR�R�R�tdeleteddirsR�RR�Rlt	remainingR�twarning((R�R�R�s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR��s�.
	
'




!


















	#
cC@sr||j�}|r1|j�j||�}n|j�|jd|�|jdd|�|jd|�dS(s�Hook for adding data to the formatter used by ``hg cat``.

    Extensions (e.g., lfs) can wrap this to inject keywords/data, but must call
    this method first.RtRbs%sR�N(RbR�t
wwritedataRrRqR�(RZRtR�R�tdecodeRb((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt_updatecatformatter
	s
c@s�d}tj���������fd�}	t�j��dkr��j�r��j�d}
|j}�j�}yK|r�||j|
�dr�tj	|�j
�g��|	|
�dSWq�tk
r�q�Xntj	|�j
�g��x'�j��D]}
|	|
�d}qWx�t
�j�D]�}�j|�}yUtj|��}|j|��tjj�|j�tj���s�d}nWq5tjk
r�|jtd�tjj�|��q5Xq5W|S(Nic@s�d}�rdt��dtjj�|��}ytjtjj|��Wqdtk
r`qdXntj	�|��&}t
|��|�jd��WdQXdS(NR�R(R�R�R�R�R�RR�R�R
RyRR�(R�RmRZ(RzRtR{R�R�R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR�	s
is#skipping missing subrepository: %s
(RRR�R�R�R�tmanifestnodeR�RR~R�R�R�R7R�R�R/R�tcatR�R�R�t_pathR�RtRepoLookupErrorR�R(R�R�RtR�RzR{R�R�R�R�R�tmfltmfnodeRR�R�R�((RzRtR{R�R�R�s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR	s<%	




c	
C@s�|jd�}|r+tj|�|d<nt||�}tj|d||�}d}|jd�r}tj|d�}n|p�tj	��Z|r�tj
||d|�dkr�tjt
d���q�n||||||�SWdQXdS(s5commit the specified files or all outstanding changesR6t	addremoveR�R#is5failed to mark all new/missing files as added/removedN(R�R t	parsedateR�RRR�R
RtnullcontextmanagerRRR�R(	R�R�R�RR�R6R0R�tdsguard((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR�K	scC@s�||j�kro|j|�}||j�krh|j|�}|j|�og|j�|j�kStSn||j�kSdS(N(R`tfilectxtcmpRR�(R�tctx1tctx2RIRN((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR`	sc!@s�ddlm�tj|tj�r2|j�n|jtd����j�}|j	��v|j
��c|jd��M|d�|j
�}|j�j��|j�j��|jd�p��j�}|jd�p��j�}tj|�}t�j��dkrTtg|j��d D]}	|	D]}
|
^q9q/�}nt�j��}tj�||��|jd�r�tj|�d	|�r�tjtd
���nd�ks�d�krtj |��j!��\}}
}|rtj"||�qnt#j$j%|�}t&j'|�t�fd��j�D���t��d
k}|rt(j)|�����j*r��jt(j)�j*�����n|j��g|D]1}t+|�|�s�|�j,�kr�|^q�}�����fd�}n,|jtd��|f��fd�}t-||�}t.�d�}t/d|t0j1|��}|s�t/dt2d|�}�j3�}n|j
�}�j4�|d<�j5|d|j6��j*�j6�gd|d|d|d|d|d|d|�}t7j8|j3��}|r�|�j3�kr�|�j�kr�|�j�kr�|�j�kr��j6�Sd}|jd�r�t9j:}n|j;|�}|j<|t=�i|f�j6�6}d}|jd�rit>j?|d�d6}n|j@dd�}tjA||dd|d t2d!|d"|�|jB}t�jC��jD���@}x|D]}|jE|�q|Wt�jF���@} x| D]}|jG|�q�WWdQXWdQXWdQX|S(#Ni(Rqsamending changeset %s
tamendR9R6iRR#s5failed to mark all new/missing files as added/removeds.hgsubc3@s!|]}�|�r|VqdS(N((RuR�(R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pys	<genexpr>�	sic@s�y�|�kr�j|�S|�j�kr2dS�|}|j�}�j|||j�|j�dd|kdd|kd�j|��}|SWntk
r�dSXdS(NR4R2tisexecRfR�(	RR�R�Rt
memfilectxR�RbR�R�(R�tctx_R�tfctxRtmctx(RqR�tfilestoamendtoldR�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRu�	s


scopying changeset %s to %s
c@s*y�j|�SWntk
r%dSXdS(N(RR�R�(R�R%R�(R)(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRu�	s
scommit.amendR�R�tamend_sourceR�RJR�RuRwRDtsecretRqR�shistory-editing-backupR�Ryttargetphasetbackup(HR#RqRt	isenabledtcreatemarkersoptRRqRR�R�R|R}R�R:R�RwR�R9R6R RR�R�RiR�R�RRRRR�Rt	precommitt_statust
writestateR�R4R�RtcheckunresolvedRt
pathcopiesR�RRR�R�R�RR�R�R�RR�R�Rt	stripdescRR+R�RGRRt	fromlocalRR�R�R�R�tnormalR�tdrop(!R�R�R)RwRR�tbaseR9R6RR�R�Rt
commitsubstnewsubstatetmsR�R�RuR0R�RDt	pureextratnewtnewdesctcommitphaseR�R�tobsmetadataR-R�tnormalfilestremovedfiles((RqR�R(R�R)R�s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR"l	s�


	

"	%
 		
	 

#cC@s2|j�r|j�St|||d|dt�S(NR�tunchangedmessagedetection(R�R�R�(R�RtRR�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR�/
s
cC@s|std�}ng|jd�D]}|r%|^q%}|jdd�d}	xm|r�dj|�}
|jjd|
�r�t|||||
�}	}Pn|j�qVWt	||||�}t
j�}tj
|j�|j�}
|jj|
�|
o|
j�o|j}|jj||j�|j�d|d|d|jd	d
�}|}tjt|dtj�}|r�||j� }ntjdd
|�}tj
|�|r�||�}n|j�s�tjtd���n|r||	krtjtd���n|S(Ns$Leave message empty to abort commit.R�it	changesettcommittemplateR�tpendingR�R�R�Rs(?m)^HG:.*(
|$)R#sempty commit messagescommit message unchanged( RRttinsertR�R�R�R�tbuildcommittemplateRztbuildcommittextRR9R�tchdirRUtcurrenttransactionR�R�twritependingR�R9RwR�tretsearcht
_linebelowt	MULTILINER�R�R?RR�(R�RtRR�R�R�RDR%tformsttemplatetexttreft
committexttolddirttrRGt
editortextRJt
stripbelow((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR�5
sD(	!
cC@s�|j}tj|dd�}tj|||�}|jjjd�|jj	d�D��|skd}n|j
�|j|d|�|j�S(Ncs@s*|] \}}|tj|�fVqdS(N(Rt
unquotestring(Rutktv((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pys	<genexpr>k
sRFR#R�(
R�R
ttemplatespecR�RtchangesettemplaterRWtcacheR�tconfigitemst
pushbuffertshowt	popbuffer(R�RtRR�RTR�tspecRW((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRIg
s		
cC@s3djg|jd�D]}|rd|^q�S(Ns
sHG: %s(R�Rt(R�RI((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pythgprefixu
sc
C@s[g}|j�|j�|j�}}}|j�rN|j|j��n|jd�|jd�|jttd���|jt|��|jd�|jttd�|j���|j�r�|jttd���n|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|jd�d
j|�S(NR#s>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
(R�R�R�R�R�ReRR9R�RxRtisactivewdirparentt_activebookmarkRaR�(
R�RtRR�tedittextR�R�R�RZR�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRJx
s0&


#&#0000
c	C@s||dkri}n||}|j�}|jd�r�|r�||kr�g|D]0}|j�|krT|j�|krT|^qTr�|jjtd��n|jd�sxR|D]G}|j�r�|j�|kr�|jjtd�|j	��q�q�Wn|jj
rC|jjtd�|j	�|j�f�n5|jj
rx|jjtd�|j	�|f�ndS(NR"screated new head
tclose_branchs reopening closed branch head %d
scommitted changeset %d:%s
(R�R�R�R�RxR�R�RtclosesbranchR�t	debugflagR�RR(	R�R�RxtbheadsR�RtR�RfR((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytcommitstatus�
s	
">
*/cC@s#|jdtj|d||��S(NR(R�RRR�(R�RR�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytpostcommitstatus�
sc>@s�
tj|�}|\}}�j�}�j�}	||krH|}ni�|j��+
|jdt�}
|d}tj	|||��t
�fd�|jD��}�j�s�t
j�d��}
x9|j|
�D](}�j|��j|�f�|<q�W����fd�}xT�jt
j�|��D]7}|�kr<�j|��j|�f�|<q<q<Wtj|���|jd|d�dtdtd	t�}nn|jd|d��}xA|D]9}x0|D](}�j|��j|�f�|<q�Wq�Wtj|���t|j�}t|j�}t|j�}t|j�}t|j�}|j|j�t|j�}t�}||kr�|}|}|}||B}t�t�t�}}}n�|jd|d��}t|j�}t|j�}t|j�}||B}|||O}||M}||8}||@}||8}||M}|||@O}||8}|}|tkr�t|�}x*|D]"}||	kr�|j|�q�q�W||O}||8}n|j �}xq|D]i} |j!j"| �}!|!r�|!�kr�|j!|!d
kr�|j#|!�|j$|!|�tf�|!<q�q�Wt|�}"x*|D]"}||	kr{|"j|�q{q{W||"}#t�}x1|D])}|j!|dkr�|j#|�q�q�W||8}x1|"D])}|j!|dkr�|j#|�q�q�W|"|8}"t�}$x?|D]7}|j%|�}%t&j'j(|%�r@|$j#|�q@q@W||$8}t�}&x?|D]7}|j%|�}%t&j'j(|%�r�|&j#|�q�q�W||&8}igt)d�fd
6gt)d�fd6gt)d�fd6gt)d�fd6gt)d�fd6gt)d�fd6dt)d�fd6dt)d�fd6}'d}(d})d}*d}+|jd�r�|+}(})}*n|
r�|(},n|)},t�}-|'d}.|jd�s�|'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
}/x�t
�j*��D]x\}\}0}1|j%|�}%xT|/D]L\}2\}3}4}5||2kr(qn|3dk	r2	|3j+|�|5r�|5|(krc|-j#|�q�|)|5ks�||j,�|�r�tj-�||0�}6�j.t)d�|0|6f�|jd �s�|
r�t/j0|%|6�q�t/j1|%|6�q�q�n|jd �rL	�j2s	|1r/	�j|4|0�q/	qL	n|1rL	�j3|4|0�nPqWq�W|jd �s�	d"}7g|7D]}8|'|8d^qq	}9tj4}:tj};|:|�j5�g|;|g|9D]}<|<D]} | ^q�	q�	��t6||��|'|
|-�n|r�
xz|D]o}=y0|j7|=�j8�j|=|tj9|��Wq
t:k
ry
t;j<d!|=t=�j��f��q
Xq
WnWdQXdS(#NRc3@s!|]}�|�r|VqdS(N((RuRZ(R/(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pys	<genexpr>�
scS@stS(N(R�(RfR�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRy�
R#c@su|�krdS|�jkr#dS|d}x!�D]}|j|�r4dSq4W�jd�j|�|f�dS(NR�s%s: %s
(R�RbR�R�(R�R�tpath_R�(RtR/R�R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR��
s

tnode1RR!R"R RRIs
reverting %s
treverts
adding %s
Rlsremoving %s
R�R8sforgetting %s
Rsundeleting %s
tundeletesno changes needed to %s
tnoopsfile not managed: %s
iiiit	no_backups#saving current version of %s as %s
R�s(subrepository '%s' does not exist in %s!(RqRlRr(>RRR�R`R�R�R�R�RRR7R�R�R/R�R�R�R�R�R�R�RiR�R�R�RR!R�R"R RR�R9R�R�RlR8R�R�R�R
RtitemsR�RtorigpathRqRR�RRR�R~R�t_performrevertR�RqR�R�RR�R(>R�R�RtR�RR�R�R�R�R�RR�t
targetsubsR�RR�R�tkindR�R�R�t_deletedR!R tmodaddedt
dsmodifiedtdsaddedt	dsremovedtlocalchangestmergeaddR�RR�RtdeladdedRtremovunkRt
dsremovunktactionstbackupinteractiveR-tcheckR�tdsmodifiedbackupR�tbackupanddelt	disptableR�R�RctxlistR�tdobackuptbaknametneeddataR]toplisttprefetchR�tsublistR�((RtR/R�R�s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRq�
sV	

&")

*	
 










%
#

	



	

	

		

%
#	!		*


	c$@sj|\}}�j�}	g}
��fd�}�fd�}���fd�}
tj�jdt�}x��ddD]�}|r��jjtd�|�}|dkr�|
d|��jj	|�q�|
j
|�q{|
d|��jj	|�q{Wx��ddD]}||�|rw�jjtd	�|�}|dkrg|
d|�||�q�|
j
|�q|
d|�||�qWx=�d
dD]-}||�|
d
|��jj|�q�Wd}|	|kr|t
kr��jj}q�jj}nt�}|r�g�ddD]}||
kr,|^q,}tj�|�}tj�jdt�}t|_t|_d
}t}|	|kr�d}t}n|r�tj��j�d|d|�}n$tj�d�j�|d|�}tj|�}y:t�j|d|�\}}|rFtj|�}nWn/tjk
rx}tjtd�|��nXt||�}|dkr�t�}nt �}x1t!td�|D���D]}|
d|�q�Wx�|D]�}t"|�rm|j#j$�}|j#j$�|krm�j%|�} tj&�j�|j'|��}!t(j)| |!�|j|�qmn|j*|�q�W|j+�}"|j,d�|"r�y#tj-�j�|ddd�Wq�tjk
r�}tjt.j/|���q�Xn~nCx@�ddD]0}|
d|�||�|r	||�q	q	WxL�ddD]<}||krL|
d|�||��jj0|�qLqLW�jj}|	|kr�|t
kr��jj}nx7�ddD]'}|
d|�||�||�q�Wt1j2�|��}#xT�dd�dd�ddD],}||#kr6�jj3|#||�q6q6WdS(s�function 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.
    c@s-�|}�j||j�|j��dS(N(twwriteRbR(R�R�(RtR�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytcheckout�s
c@sWy/�jjdd�}�jj|d|�Wntk
rBnX�jj|�dS(NR�RR�(R�RRRR�R�R�(R�R�(R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytdoremove�s
c@sF�|\}}�jjs#|rB�jj�|d|�ndS(Ni(R�RR�(R�R�R�R�(R�R�R�(s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
prntstatusmsgstcachedRis(forget added file %s (Yn)?$$ &Yes $$ &NoR�s(remove added file %s (Yn)?$$ &Yes $$ &NoR8RqR�R�tapplyR�R�serror parsing patch: %scs@s*|] }t|�r|jj�VqdS(N(RhRjRm(RuR_((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pys	<genexpr>SsiR�RlRrN(4R�RtpathauditorRUR�R�R�RR�R8R�R�R�RR�R7RiRR�RR�RLRBR�R�R�R�treversehunksRR�R�RrR�R7RhRjRmR�RvR�RR�R�R�R�R�RR�RlRR4R:($R�R�RtR�R�RR�R�R�R�texcluded_filesR�R�R�t
audit_pathR�ReR7RpttorevertR/R�R�R�R�RoRnR�R�R�R_RRR�R�R�((R�RtR�R�s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyRw�s�		


	




	-			'$	#
!
#





-sgraft in progresss6use 'hg graft --continue' or 'hg graft --stop' to stoptupdatestateslast update was interrupteds,use 'hg update' to get a consistent checkoutcC@s�x_tD]W\}}}}}|s|r4|r4qn|jj|�rtj|d|��qqWx`tD]X\}}}}}|si|r�|r�qin|jj|�ritj|d|��qiqiWdS(s�Look for an unfinished multistep operation, like graft, and abort
    if found. It's probably good to check this right before
    bailifchanged().
    R�N(tunfinishedstatesRRFRR�(R�R�R�t	clearabletallowcommitR�R�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyR��scC@s�xNtD]F\}}}}}|r|jj|�rtj|d|��qqWxQtD]I\}}}}}|rX|jj|�rXtj|jj|��qXqXWdS(s[Check for unfinished operations (as above), and clear the ones
    that are clearable.
    R�N(R�RRFRR�RR�R�(R�R�R�R�R�R�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytclearunfinished�sshg graft --continuecC@s}td�}x4tD],\}}|jj|�r||tfSqW|djdtdtdt�ry|td�tfSdS(sCheck for an unfinished operation and return the command to finish
    it.

    afterresolvedstates tuples 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: %stmissingRRxs	hg commitN(NN(RtafterresolvedstatesRRFR�R�tdirtyR�(R�tcontmsgR�R�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt
howtocontinue�s
"cC@sVt|�\}}|dk	rR|r;|jjd|�qR|jjd|�ndS(s�Inform 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(R�R�R�R�Rq(R�R�R((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytcheckafterresolved�s
cC@sLt|�}d}|dr)|d}ntjtd�|d|��dS(s�Raise 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 progressR�N(R�R�RR�R(R�ttaskR�R�((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pytwrongtooltocontinue�s
	

(�t
__future__RR�R�RNti18nRR�RRRRR#RRRR	RbR
RRR
RRR/RR�RRRRRRRRRRRRRRRR�tutilsR R!R�R�t
dryrunoptstconfirmoptst
remoteoptstwalkoptst
commitoptstcommitopts2t
formatteroptsttemplateoptstlogoptsR�t
diffwsoptst	diffopts2t
mergetooloptstsimilarityoptstsubrepooptsR�tdebugrevlogoptsRPRhRrRvR�R�R�RR�RR-R3R<R?R@RARBRCRDRERGRHRSRXR`RjR�RoR�R�R~R�R�R�R�R�R�R�R�R�R�R�R�R�R:RIRLRJRMR\ReRfRnRsR}RR�R�R�R�R�t	ExceptionR�R�R�R�RlR�RR�R�RRR�RR"R�R�RIReRJRmRnRqRwthookst
outgoinghookstsummaryhookstsummaryremotehooksR�R�R�R�R�R�R�(((s7/usr/lib64/python2.7/site-packages/mercurial/cmdutil.pyt<module>s^"�																				F	%$						
	�d	1														&	W							D			
=	�	�	+						a&	�	-			O	v	
	4			�1			0		�#�