HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //proc/self/root/lib64/python2.7/site-packages/mercurial/filemerge.pyo
�
1�3\c@@s.ddlmZddlZddlZddlZddlZddlmZddlm	Z	m
Z
ddlmZm
Z
mZmZmZmZmZmZmZmZmZmZddlmZmZd�Zd	�Zd
�ZiZiZej �Z!e!j"Z"e!j#Z#e!j$Z$ed�Z%ed�Z&d
e'fd��YZ(d�Z)d�Z*d�Z+d�Z,d�Z-d�Z.e!de"�dd��Z0e!de"�dd��Z1e!de"�dd��Z2e!de"�dd��Z3d�Z4dd�Z5d�Z6d �Z7e!d!e$ed"�d#e6�dd$��Z8e!d%e$ed"�d#e6�dd&��Z9e!d'e$ed"�d#e6�dd(��Z:ddd)�Z;e!d*e#d#e6�d+��Z<e!d,e#d#e6�d-��Z=e!d.e#ed/��dd0��Z>e!d1e$d2e?d3e?�dd4��Z@e!d5e#d2e?d3e?�dd6��ZAdd7�ZBdd8�ZCd9�ZDddgZEdd:�ZFd;�ZGd<�ZHd=�ZIejJd>��ZKdd?�ZLd@�ZMdA�ZNdB�ZOdC�ZPdD�ZQddE�ZRddF�ZSdG�ZTeTdde!�ejU�ZVdS(Hi(tabsolute_importNi(t_(tnullidtshort(tencodingterrort	formattertmatchtpycompatt	registrartscmutiltsimplemergettagmerget
templatekwt	templatertutil(tprocutilt
stringutilcG@s|jd|d||�S(Nsmerge-toolst.(tconfig(tuittooltparttargs((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_toolstr&scG@s|jd|d||�S(Nsmerge-toolsR(t
configbool(RRRR((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt	_toolbool)scC@s|jd|d|�S(Nsmerge-toolsR(t
configlist(RRR((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt	_toollist,ss�file '%(fd)s' was deleted in other%(o)s but was modified in local%(l)s.
What do you want to do?
use (c)hanged version, (d)elete, or leave (u)nresolved?$$ &Changed $$ &Delete $$ &Unresolveds�file '%(fd)s' was deleted in local%(l)s but was modified in other%(o)s.
What do you want to do?
use (c)hanged version, leave (d)eleted, or leave (u)nresolved?$$ &Changed $$ &Deleted $$ &Unresolvedt
absentfilectxcB@sneZdZd�Zd�Zd�Zd�Zd�ZeZ	d�Z
d�Zd�Zd	�Z
d
�ZRS(s�Represents a file that's ostensibly in a context but is actually not
    present in it.

    This is here because it's very specific to the filemerge code for now --
    other code is likely going to break with the values this returns.cC@s||_||_dS(N(t_ctxt_f(tselftctxtf((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt__init__Ms	cC@s|jS(N(R(R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytpathQscC@sdS(N(tNone(R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytsizeTscC@sdS(N(R%(R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytdataWscC@stS(N(R(R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytfilenodeZscC@s;|j�o9|j�|j�ko9|j�|j�kS(sVcompare with other file context

        returns True if different from fctx.
        (tisabsentR!R$(R tfctx((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytcmp^scC@sdS(Nt((R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytflagsgscC@s|jS(N(R(R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt	changectxjscC@stS(N(tFalse(R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytisbinarymscC@stS(N(tTrue(R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyR)ps(t__name__t
__module__t__doc__R#R$R&R'R(R1t
_customcmpR+R-R.R0R)(((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyRGs										cC@sE|tkr|St||d|�}|jd�r8|St||�S(Nt
executablespython:(t	internalsRt
startswithtfindexternaltool(RRtcmd((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt	_findtoolsscC@s |jd�r|Stj|�S(Nspython:(R8Rt
shellquote(R:((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_quotetoolpath{scC@s�xdD]w}t|||�}|s+qntj|t||d��}|rtj|t||dd��}|r~|SqqWt||d|�}tjtj|��S(Ntregkeyt	regkeyalttregnamet	regappendR,R6(R>R?(RRt	lookupregRtfindexet
expandpath(RRtkntktptexe((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyR9�s
"c@s��jdd��t�fd��d������fd�}�jdd�}|r�t�|�}|r��|�r�dS|r�|t|�fS||fSntjjd	�}	|	r�|r��|	�r�dS|	|	fSn|o��}
x��j	d
�D]�\}}t
j
|jd|g�}
|
|�r�|||||
|�r�|r��|dd
t�r��j
td�tj|�tj|�f�nt�|�}|t|�fSq�Wi}t�}x}�j	d�D]l\}}|jd�d}||kr#tt�|d��||<nt�|d�r�|j|�q�q�W|j�}tg|j�D]%\}}||kre||f^qe�}�jdd�}|r�||||||�r�||kr�|r�||fS|jdd|f�q�n|jd�xK|D]C\}}||d|||�rt�|�}|t|�fSqW|si|si|r�|r�t|�r��j
td�|�ndSdS(Ntmergesstrict-capability-checkc@s6|tkr&|o%t|jj|�St�||�S(N(R7tcapabilitiestgetR(Rt
capabilitytstrict(R(s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt
hascapability�scS@s|tkot|jtkS(N(R7t	mergetypetnomerge(R((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt
supportscd�sc@s+|}|r%td�||f}nt�|�sn|rT�jtd�|�q'�jtd�|�n�|r��|d��r��jtd�|�n�|r��|d��r��jtd�|�nS|r��|�r�n=tj�r#t�|d�r#�jtd�|�ntStS(	Ns%s (for pattern %s)scouldn't find merge tool %s
tsymlinkstool %s can't handle symlinks
tbinarystool %s can't handle binary
tguistool %s requires a GUI
(	RR;twarntnoteRRTRR1R/(RtpatRRRStchangedeletettmsg(RNtstrictcheckRQR(s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytcheck�s"Rt
forcemerges:prompttHGMERGEsmerge-patternsR,RSRMs�warning: check merge-patterns configurations, if %r for binary file %r is unintentional
(see 'hg help merge-tools' for binary files capability)
smerge-toolsRitprioritytdisabledthgmergesno tool found to merge %s
s:merge(s:promptN(s:promptN(NR`(s:promptN(s:mergeN(RR/RR;R%R=RtenvironRKtconfigitemsRtrootR1RURRtbytestrtsettsplittintRRtaddtkeystsortedtitemstinserttappendtlen(trepoRR$RSRRRXR[tforcettoolpathR`t	binarycapRWRtmfttoolsR_RFtvtttnamesRGtuimerge((RNRZRQRs9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt	_picktool�sj	

$#	"

cC@sDd|krdSd|kr dSd|kr0dSd|kr@dSdS(sGuess the EOL type of a filess
s
s
N(R%(R'((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_eoltype�scC@stt|j��}|rptj|�}t|�}|rp|j||�}||krmtj||�qmqpndS(s/Convert EOL markers in a file to match origfileN(RzR'Rtreadfiletreplacet	writefile(tfiletbackttostyleR'tstyletnewdata((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt	_matcheolstpromptc
	C@s�|j}|j�}	|j�j�r9tjd��nt|�}
|	|
d<y$|j�r�|jt	|
d�}dddg|}ng|j�r�|jt
|
d�}dddg|}n/|jtd�|
d�}dddg|}|dkrt||||||||�S|dkrGt
||||||||�S|dkrrt||||||||�SWn=tjk
r�|jd�t||||||||�SXd	S(
sfAsks the user which of the local `p1()` or the other `p2()` version to
    keep as the merged version.s/in-memory merge does not support file conflictstfditlocaltothert
unresolvedsikeep (l)ocal%(l)s, take (o)ther%(o)s, or leave (u)nresolved for %(fd)s?$$ &Local $$ &Other $$ &Unresolveds
N(RR$R.t
isinmemoryRtInMemoryMergeConflictsErrort
partextrasR)tpromptchoicet_localchangedotherdeletedmsgt_otherchangedlocaldeletedmsgRt_iothert_ilocalt_ifailtResponseExpectedtwrite(
RotmynodetorigtfcdtfcotfcattoolconftlabelsRR�tpromptstindextchoice((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_iprompts@	
	

R�cC@sd|j�fS(s=Uses the local `p1()` version of files as the merged version.i(R)(RoR�R�R�R�R�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyR�<sR�c	C@sW|j�r%t|�j�t}n(t|�j|j�|j��t}d|fS(s=Uses the other `p2()` version of files as the merged version.i(R)t_underlyingfctxifabsenttremoveR1R�R'R-R/(	RoR�R�R�R�R�R�R�tdeleted((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyR�As	"tfailcC@s;|j�r1t|�j|j�|j��ndtfS(s�
    Rather than attempting to merge files that were modified on both
    branches, it marks them as unresolved. The resolve command must be
    used to resolve these conflicts.i(R)R�R�R'R-R/(RoR�R�R�R�R�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyR�Ms%cC@s(|j�r |j�|j�S|SdS(s�Sometimes when resolving, our fcd is actually an absentfilectx, but
    we want to write to it (to do the resolve). This helper returns the
    underyling workingfilectx in that case.
    N(R)R.R$(tfilectx((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyR�Xsc	C@s�|\}}}	}
}|
s3|j�s3|j�r7dS|\}}}}
|j}ddg}yt||d|	�}Wn�tjk
rt||dd�j�}||krdjg|D]}d|d^q��}tjtd�|||f��qnX|r�|dkrK|s&t	}nt
|�d	krK|jd
�qKntj||||dt
d|�}|s�|jd
�dS||kr�t||
�q�ndS(Nitkeepskeep-merge3tpremergeR,s, t's6%s.premerge not valid ('%s' is neither boolean nor %s)itbasetquiettlabels premerge successful
i(R)RRRtConfigErrorRtlowertjoinRt_defaultconflictlabelsRnRmRR1tdebugt_restorebackup(RoR�R�R�R�tfilesR�RRqRSRRtscriptfntunusedRRt	validkeepR�Rut_validtr((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt	_premergebs6	*	$
cC@s�|\}}}	}
}|
rE|jjtd�||j�f�tS|j�s]|j�r�|jjtd�||j�f�tStS(Ns2warning: internal %s cannot merge symlinks for %s
s@warning: internal %s cannot merge change/delete conflict for %s
(RRURR$R/R)R1(RoR�R�R�R�R�R�RRqRSRRR�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_mergecheck�sc
	C@s:|j}
tj|
|||d|d|	�}t|tfS(s)
    Uses the internal non-interactive simple merge algorithm for merging
    files. It will fail if there are any conflicts and leave markers in
    the partially merged file. Markers will have two sections, one for each side
    of merge, unless mode equals 'union' which suppresses the markers.R�tmode(RRR1R/(RoR�R�R�R�R�R�R�R�R�RR�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_merge�s	$tunionsJwarning: conflicts while merging %s! (edit, then use 'hg resolve --mark')
tprecheckc		C@s%t|||||||||d�
S(s�
    Uses the internal non-interactive simple merge algorithm for merging
    files. It will use both left and right sides for conflict regions.
    No markers are inserted.R�(R�(	RoR�R�R�R�R�R�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_iunion�s	RIc		C@s%t|||||||||d�
S(s�
    Uses the internal non-interactive simple merge algorithm for merging
    files. It will fail if there are any conflicts and leave markers in
    the partially merged file. Markers will have two sections, one for each side
    of merge.RI(R�(	RoR�R�R�R�R�R�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_imerge�s
tmerge3c		
C@sS|st}nt|�dkr1|jd�nt|||||||||�	S(s
    Uses the internal non-interactive simple merge algorithm for merging
    files. It will fail if there are any conflicts and leave markers in
    the partially merged file. Marker will have three sections, one from each
    side of the merge and one for the base content.iR�(R�RnRmR�(	RoR�R�R�R�R�R�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_imerge3�s

	c
	C@sF|\}
}}}
}tj|j|||d|d|	�}t|fS(s:
    Generic driver for _imergelocal and _imergeother
    R�tlocalorother(RRR1(RoR�R�R�R�R�R�R�R�R�RRqRSRRR�R�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_imergeauto�s	smerge-localcO@s(tdd||�\}}||tfS(sg
    Like :merge, but resolve all conflicts non-interactively in favor
    of the local `p1()` changes.R�R�(R�R/(Rtkwargstsuccesststatus((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_imergelocal�ssmerge-othercO@s(tdd||�\}}||tfS(sg
    Like :merge, but resolve all conflicts non-interactively in favor
    of the other `p2()` changes.R�R�(R�R/(RR�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_imergeother�sRsjautomatic tag merging of %s failed! (use 'hg resolve --tool :merge' or another merge tool of your choice)
c	C@s+tj||||�\}	}
|	|
tfS(s?
    Uses the internal tag merge algorithm (experimental).
    (RRIR/(RoR�R�R�R�R�R�R�R�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt
_itagmerge�stdumpRSRRc	C@s�t||�}	|j�}
ddlm}t||j�rOtjd��ntj	|	d|j
��|j|
d|j�|j
��|j|
d|j�|j
��tdtfS(s
    Creates three versions of the files to merge, containing the
    contents of local, other and base. These files can then be used to
    perform a merge manually. If the file to be merged is named
    ``a.txt``, these files will accordingly be named ``a.txt.local``,
    ``a.txt.other`` and ``a.txt.base`` and they will be placed in the
    same directory as ``a.txt``.

    This implies premerge. Therefore, files aren't dumped, if premerge
    runs successfully. Use :forcedump to forcibly write files out.
    i(tcontexts0in-memory merge does not support the :dump tool.s.locals.others.base(t_workingpathR$R,R�t
isinstancetoverlayworkingfilectxRR�RR}tdecodeddatatwwriteR'R-R/(RoR�R�R�R�R�R�R�R�taR�R�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_idump�s
##t	forcedumpc		C@s%t||||||||d|�S(sS
    Creates three versions of the files as same as :dump, but omits premerge.
    R�(R�(	RoR�R�R�R�R�R�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt
_forcedumpsc		C@stjd��dS(Ns5in-memory merge does not support external merge tools(RR�(	RoR�R�R�R�R�R�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt
_xmergeimms	c	&
C@s�|\}	}
}}}
|j�s-|j�r`|jjtd�|	|j�f�tddfS|\}}}}t||�}t|j|	d�}t	||||j
j|j��d|k��+}|\}}}d}|d \}}t|�dkr
|d}nd}i
|j�d	6t
|�d
6t
|j�j��d6t
|j�j��d6d
|j�kd6d
|j�kd6d
|j�kd6|d6|d6|d6}|j}d|kr�|}|}ni|d6|d6|d6|d6|d6|d6|d6}tjd||d��}t||	d�rd|jjtd�|	|j�f�n|
dkr�|
d|}|jjd|�|j|d |jd!|d"d#�}n|jjd$|
|
f�d%}y*dd&lm}|j|
d'|	�} Wn*tk
r/tjtd(�|
��nXt| |
d�}!|!dkrptjtd)�|
|
f��ntj |�}"dd*lm!}#|#j"||d+|
|!i|"d6t#�\}$}%|%r�d}n|jjd,|�t#|tfSWdQXdS(-Ns7warning: %s cannot merge change/delete conflict for %s
iRs$outputR,iiR�tHG_FILEt
HG_MY_NODEt
HG_OTHER_NODEtHG_BASE_NODEtltHG_MY_ISLINKtHG_OTHER_ISLINKtHG_BASE_ISLINKtHG_MY_LABELtHG_OTHER_LABELt
HG_BASE_LABELR�R�toutputt
labellocalt
labelothert	labelbases\$cS@stjtj|��S(N(RR<Rt	localpath(ts((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt<lambda>DR,RTs"running merge tool %s for file %s
t slaunching merge tool: %s
tcwdRat
blockedtagt	mergetools%launching python merge script: %s:%s
i(t
extensionss
hgmerge.%ss&loading python merge script failed: %ss%s does not have function: %s(thookRIsmerge tool returned: %d
($R)RRURR$R/R%R�Rt_maketempfilestwvfsR�RnRR.tnodeR-RtinterpolateRR�R�tsystemRcR,R�tloadpatht	ExceptionRtAborttgetattrRt
shellsplitR�t
pythonhookR1(&RoR�R�R�R�R�R�R�R�RRqRSRRR�R�RR�Rt	temppathstbasepatht	otherpathtlocaloutputpathtoutpathtmylabelt
otherlabelt	baselabeltenvRR|R:R�R�tmodtmergefntargslistR�trettraised((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_xmerges�
!


			
	cC@s�|j�dkr!|j�}ni|d6}|j|�}d|j|d�}d||f}|r}|j�d}ntj|d	�S(
s�Applies the given template to the ctx, prefixed by the label.

    Pad is the minimum width of the label prefix, so that multiple markers
    can have aligned templated parts.
    R!s%s:is%s %siiPiNiH(R�R%tp1t
renderdefaulttljustt
splitlinesRtellipsis(R!ttemplateR�tpadtpropsttemplateresulttmark((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_formatconflictmarkerfs
cC@s&|j�}|j�}|j�}|j}	|	jdd�}
|d	k	rct|	|d|
�}
ntj|
�}
tj|	|�}tj	|	|
dt
jd|�}td�|D��}
t
|||d|
�t
|||d|
�g}t|�dkr"|jt
|||d|
��n|S(
sjFormats the given labels using the conflict marker template.

    Returns a list of formatted labels.
    Rtmergemarkertemplatetdefaultst	resourcescs@s|]}t|�VqdS(N(Rn(t.0R�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pys	<genexpr>�siiiN(R.RRR%RRt
unquotestringRttemplateresourcest
maketemplaterR
tkeywordstmaxRRnRm(RoR�R�R�R�RtcdtcotcaRRttresttmplRt	newlabels((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt
_formatlabels}s"		#cC@s@|dkridd6dd6Sid|dd6d|dd6S(s�Return a dictionary of extra labels for use in prompts to the user

    Intended use is in strings of the form "(l)ocal%(l)s".
    R,R�tos [%s]iiN(R%(R�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyR��scC@s |j|j�|j��dS(N(R�R'R-(R�R((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyR��sc
C@s-|j�rdSddlm}t||�}tj|||�}|j|jj	�ol|j|j
j	�}t||j�r�|r�|t
|jj	�d}	|r�||	j|j�|j��n||	S|rt||j�rtj||j��qtj||�n|j|d|�SdS(s�Makes and returns a filectx-like object for ``fcd``'s backup file.

    In addition to preserving the user's pre-existing modifications to `fcd`
    (if any), the backup is used to undo certain premerges, confirm whether a
    merge changed anything, and determine what line endings the new file should
    have.

    Backups only need to be written once (right before the premerge) since their
    content doesn't change afterwards.
    i(R�RoN(R)R%R,R�R�R
torigpathR8R�R�tvfsR�R�RnR�R'R-RR}tcopyfiletarbitraryfilectx(
RoRtwctxR�R�R�R�Rtinworkingdirtrelpath((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_makebackup�s"#c
#@s^d��jjdd�}|r6tjd|��n�fd����fd�}|d|�}|d|�}|}	|r�|	jd�r�tjj|	�\}	}
n�d	|	�\}}	t	|d
��}|j
|j��WdQX|j�nz|||	fVWd�r#t
j��n6tj|�tj|�|	rY|rYtj|	�nXdS(s�Writes out `fco` and `fca` as temporary files, and (if uselocalpath)
    copies `localpath` to another temporary file, so an external merge tool may
    use them.
    texperimentaltmergetempdirprefixtprefixc@s�tjj|�\}}dtjj|�|f}�rttjj�|�}|rb||7}nt|d�}n4tjd|dd|�\}}tj|d�}||fS(Ns%s~%stwbR,Rtsuffix(	tosR$tsplitexttbasenameR�topenRtmkstemptfdopen(R,R$tfullbasetexttpretnameR"R�(ttmproot(s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytmaketempfrompath�s
"c@sT�||j��\}}�j|j�|j��}|j|�|j�|S(N(R$t
wwritedataR'R�tclose(R,R!R"R8R'(R:Ro(s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyttempfromcontext�s


R�R�s.origR�trbN(R%RRRtmkdtemptendswithR/R$R0R2R�treadR<tshutiltrmtreeRtunlink(
RoR�R�R�tuselocalpatht
tmprootprefixR=tbtctdRR"tsrc((R:RoR9s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyR��s0



c	#C@s�|j|�stdtfS|j}	|j�}
|j�pR|j�pR|j�}d|j�|j�k}|j�p�|j�}
t	||	|
|||
�\}}d}|t
kr�|jd�r�|td�}n|r�|jd�r�t}|j
d�dkr]|djdd�\}}|s9t}nd	|ksQd
|krct}qcnt}|r�tjtd�|��n|}n|	jd||
tj|�tj|�tj|
�f�|t
krt
|}|j}|j}|j}t}n9|j�rt}nt}t}td
�}d}t}|||||f}|tkr�|||||||||�\}}t||fS|r�||j�kr�|	jtd�||j�|
f�q�|	jtd�|
�n|	jd|||f�|rp||||||||�rp|rc|j�rOtjd��n|	j||
�ntdtfSt ||	|||�}ddd|f}d}z�|	j!dd�}|r�t"|	|d�}n|}|s�t#}n|}|dkrt$|||||d|�}n|r�|tkr�|} d}!|dkrK|}!n|dksc|dkr�t$||||| d|!�} nt%||||||d| �}||tfS|||||||||d|�\}"}}|"rt&|||	|||�}n|rR|rE|j�r1tjd��n|	j||
�nt'|	�nt||fSWd|r�|dk	r�|j(�nXdS(s�perform a 3-way merge in the working directory

    premerge = whether this is a premerge
    mynode = parent node before merge
    orig = original local filename before merge
    fco = other file context
    fca = ancestor file context
    fcd = local file context for current/destination file

    Returns whether the merge is complete, the return value of the merge, and
    a boolean indicating whether the file was deleted from disk.R�s	internal:tinternalspython:t:iiis\t/sinvalid 'python:' syntax: %ss?picked tool '%s' for %s (binary %s symlink %s changedelete %s)
smerging %s failed!
smerging %s and %s to %s
smerging %s
smy %s other %s ancestor %s
s0in-memory merge does not support merge conflictsRtmergemarkerstbasicRR�N()R+R1R%R/RR$R0R-R)RyR7R8RntcounttrsplitRR�RR�RRdROt	onfailureR�R�R�Rt	fullmergeRPR�R�RUR)RRR�R R�t_checkt_onfilemergefailureR�(#R�RoR&R�R�R�R�R�R�RR�RSRRRXRRqR�t
invalidsyntaxtscripttfuncRORRR�t
isexternalR�R�R�RR�tinternalmarkerstyletmarkerstyletformattedlabelstpremergelabelst	labeltoolt	needcheck((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt
_filemerges�

	$!			
					'
)

			
cC@std�}tj|��dS(Ns0merge halted after failed merge (see hg resolve)(RRtInterventionRequired(tmsg((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt
_haltmerge�scC@si|jdd�}|dkrOtd�}|j|d�dkrOt�qOn|dkret�ndS(NRIs
on-failureR�s,continue merge operation (yn)?$$ &Yes $$ &Noiithalt(RRR�Rc(RtactionRb((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyRU�s
cC@sttjd|tj��S(Ns!^(<<<<<<< .*|=======|>>>>>>> .*)$(tbooltretsearcht	MULTILINE(R'((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pythasconflictmarkers�sc
C@ss|j�}|\}}}}|rmt||d�sOdt||d�krmt|j��rmd}qmnt}	dt||d�kr�t}	|jtd�|d�r�d}q�n|r8|	r8t||d�s�dt||d�kr8|dk	r8|j
|�r8|jtd	�|d�r5d}q5q8n|dk	rot||d
�rott||�|�n|S(Ntcheckconflictst	conflictsR[iR�s0was merge of '%s' successful (yn)?$$ &Yes $$ &NotcheckchangedtchangedsJ output file %s appears unchanged
was merge successful (yn)?$$ &Yes $$ &Notfixeol(
R$RRRjR'R/R1R�RR%R+R�R�(
RoR�RRR�R�R�R�Rtchecked((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyRT�s,
 
cC@s|j|j��S(N(twjoinR$(RoR!((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyR��scC@s%tt|||||||d|�S(NR�(R`R1(RoR&R�R�R�R�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyR��scC@s%tt|||||||d|�S(NR�(R`R/(RoR&R�R�R�R�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt	filemerge�sc
C@s�x�|jj�D]�\}}d|}|t|<|td|<|t|<tg|jj�D]\}}|r[|^q[�}|rddj|�}	|jt	j
d|	�|_qqWtd�td�td�d	S(
s9Load internal merge tool from specified registrarobj
    RLs	internal:s    (actual capabilities: %s)s, s

%ss*    (actual capabilities: binary, symlink)s!    (actual capabilities: binary)s"    (actual capabilities: symlink)N(t_tablet	iteritemsR7tinternalsdocRjRJRkR�R4RtsysstrR(
RtextnametregistrarobjR8RXtfullnameRFRuRJtcapdesc((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytloadinternalmerge�s


4

(Wt
__future__Rt
contextlibR/RgRBti18nRR�RRR,RRRRRR	R
RRR
RRtutilsRRRRRR7Rut
internalmergetinternaltoolRPt	mergeonlyRSR�R�tobjectRR;R=R9RyRzR�R%R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R1R�R�R�RRR�R R�R�R)tcontextmanagerR�R`RcRURjRTR�R�RrR{tvaluest
i18nfunctions(((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt<module>s�R								,			
	k		,
	
$						

	K				*9�