-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/mercurial/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/mercurial/filemerge.pyc

ó
Ì\,Tc@s)ddlmZddlmZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZdd„Zed„Zgd„ZiZdd„Zd	„Zd
„Zd„Zd„Zed
eƒd„ƒZedeƒd„ƒZedeƒd„ƒZedeƒd„ƒZdd„Zedeedƒƒdd„ƒZ edeedƒƒdd„ƒZ!edeƒdd„ƒZ"dd„Z#d„Z$d d!d"d#d$Z%ddgZ&d%„Z'dd&„Z(ej)ƒZ*dS('iÿÿÿÿ(tshort(t_NtcCs|jd|d||ƒS(Nsmerge-toolst.(tconfig(tuittooltparttdefault((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt_toolstrscCs|jd|d||ƒS(Nsmerge-toolsR(t
configbool(RRRR((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt	_toolboolscCs|jd|d||ƒS(Nsmerge-toolsR(t
configlist(RRRR((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt	_toollistscs‡‡‡fd†}|S(s;return a decorator for populating internal merge tool tablecsDdˆ}d||jjƒ|_|t|<ˆ|_ˆ|_|S(Ns	internal:s``%s``
(t__doc__tstript	internalsttrymerget	onfailure(tfunctfullname(tnameRR(s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt	decorators

		((RRRR((RRRs7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pytinternaltoolscCsº|tkr|Sx|dD]t}t|||ƒ}|s;qntj|t||dƒƒ}|rtj|t||dƒƒ}|r‹|SqqWt||d|ƒ}tjtj|ƒƒS(Ntregkeyt	regkeyalttregnamet	regappendt
executable(RR(RR	tutilt	lookupregtfindexet
expandpath(RRtkntktptexe((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt	_findtool$s
csW‡fd†}ˆjddƒ}|r\tˆ|ƒ}|rO|tj|ƒfS||fSntjjdƒ}|r~||fSx{ˆjdƒD]j\}	}
tj|j	d|	gƒ}||ƒrŽ||
|	|t
ƒrŽtˆ|
ƒ}|
tj|ƒfSqŽWi}x^ˆjdƒD]M\}
}|
jdƒd	}||krtt
ˆ|d
dƒƒ||<qqW|jƒ}tg|jƒD]\}}||f^qƒ}ˆjddƒ}|rè||krÏ||fS|jd	d|fƒn|jdƒxK|D]C\}}||d||ƒrütˆ|ƒ}|tj|ƒfSqüW|sO|rSdSdS(Ncs
|}|r|d|7}ntˆ|ƒsf|rLˆjtdƒ|ƒq	ˆjtdƒ|ƒn£|r™tˆ|dƒr™ˆjtdƒ|ƒnp|rÌtˆ|dƒr̈jtdƒ|ƒn=tjƒrtˆ|dƒrˆjtdƒ|ƒntStS(	Ns specified for scouldn't find merge tool %s
tsymlinkstool %s can't handle symlinks
tbinarystool %s can't handle binary
tguistool %s requires a GUI
(	R%twarnRtnoteRRR(tTruetFalse(RtpatR&R'ttmsg(R(s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pytcheck4sRt
forcemergetHGMERGEsmerge-patternsRsmerge-toolsRitpriorityt0tmergethgmergesinternal:promptsinternal:merge(Nshgmerge(sinternal:promptN(sinternal:mergeN(RR%Rt
shellquotetostenvirontgettconfigitemstmatchtrootR,tsplittintR	tkeystsortedtitemstinserttNonetappend(trepoRtpathR'R&R/tforcettoolpathR5R-RtmfttoolsR"tvtttnamesR#tuimerge((Rs7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt	_picktool3sF

!&2

cCsDd|krdSd|kr dSd|kr0dSd|kr@dSdS(sGuess the EOL type of a filets
s
s
N(RC(tdata((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt_eoltypeuscCswttj|ƒƒ}|rstj|ƒ}t|ƒ}|rs|j||ƒ}||krptj||ƒqpqsndS(s/Convert EOL markers in a file to match origfileN(RRRtreadfiletreplacet	writefile(tfiletorigfilettostyleRQtstyletnewdata((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt	_matcheolstpromptc	Csm|j}|jƒ}|jtdƒ|dƒrMt|||||||ƒSt|||||||ƒSdS(sXAsks the user which of the local or the other version to keep as
    the merged version.sK no tool found to merge %s
keep (l)ocal or take (o)ther?$$ &Local $$ &OtheriN(RRFtpromptchoiceRt_iothert_ilocal(	REtmynodetorigtfcdtfcotfcattoolconfRtfd((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt_ipromptŒs	
tlocalcCsdS(s6Uses the local version of files as the merged version.i((RER`RaRbRcRdRe((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyR_šstothercCs)|j|jƒ|jƒ|jƒƒdS(s6Uses the other version of files as the merged version.i(twwriteRFRQtflags(RER`RaRbRcRdRe((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyR^Ÿs%tfailcCsdS(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((RER`RaRbRcRdRe((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt_ifail¥sc	CsN|\}}}}|rdS|\}}	}
}|j}yt||d|ƒ}
Wn“tjk
ræt||dƒjƒ}
djƒ}|
|krçdjg|D]}d|d^q¡ƒ}tjtdƒ||
|fƒ‚qçnX|
rJt	j	|||	|
dt
d|ƒ}|s(|jd	ƒd
S|
dkrJtj
||ƒqJndS(Nitpremergetkeeps, t's6%s.premerge not valid ('%s' is neither boolean nor %s)tquiettlabels premerge successful
i(RRterrortConfigErrorR	tlowerR=tjoinRtsimplemergeR+tdebugRtcopyfile(RERetfilestlabelsRRHR'R&tatbtctbackRRntvalidRKt_validtr((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt	_premerge­s,	*$
R4sFmerging %s incomplete! (edit conflicts, then use 'hg resolve --mark')
c		Cs³|\}	}
}}|rB|jjtdƒ|jƒƒtdfSt|||d|ƒ}
|
r©|\}}}}|j}tj||||d|dtƒ}
t|
fStdfS(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.s5warning: internal:merge cannot merge symlinks for %s
iR{Rrt
no_minimali(RR)RRFR,RƒRwR+(RER`RaRbRcRdReRzR{RRHR'R&R‚R|R}R~RR((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt_imergeÊs
	$
ttagmergesrautomatic tag merging of %s failed! (use 'hg resolve --tool internal:merge' or another merge tool of your choice)
c		Cstj||||ƒS(s?
    Uses the internal tag merge algorithm (experimental).
    (R†R4(	RER`RaRbRcRdReRzR{((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt
_itagmergeástdumpc	Cs£t|||d|ƒ}	|	r™|\}
}}}
|jƒ}tj|
|
dƒ|j|d|jƒ|jƒƒ|j|d|jƒ|jƒƒnt|	fS(su
    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``.R{s.locals.others.base(RƒRFRRyRjRQRkR,(RER`RaRbRcRdReRzR{R‚R|R}R~RRf((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt_idumpës	#&c	Cst|||d|ƒ}	|	rw|\}
}}}
|\}}}}d}i|jƒd6t|ƒd6t|jƒƒd6t|jƒƒd6d|jƒkd6d|jƒkd	6d|jƒkd
6}|j}t||
ddƒ}d
|kr||}}ni|d6|d6|d6|d6}tj	d||d„ƒ}tj
|d|d|jd|d|jƒ}	t
|	fStdfS(NR{RtHG_FILEt
HG_MY_NODEt
HG_OTHER_NODEtHG_BASE_NODEtltHG_MY_ISLINKtHG_OTHER_ISLINKtHG_BASE_ISLINKtargss$local $base $others$outputRhtbaseRitoutputs\$cSstjtj|ƒƒS(N(RR6t	localpath(ts((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt<lambda>st tcwdR8touti(RƒRFRtstrt	changectxRkRR	RtinterpolatetsystemR<tfoutR+R,(RER`RaRbRcRdReRzR{R‚RRHR'R&R|R}R~RRštenvRR’RT((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt_xmergeÿs.
	"#
cCs¶|jƒdkr!|jƒ}ntjjƒ}||d<||d<||d<|d|}d|j|dƒ}d|tj|ƒf}|r¦|j	ƒd}nt
j|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.
    ttempltctxREtconflictmarkers%s:is%s %siiPiNiH(tnodeRCtp1t
templatekwtkeywordstcopytljustt	templatert	stringifyt
splitlinesRtellipsis(RER£ttemplateRrtpadtpropsttemplateresulttmark((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt_formatconflictmarkers


s
{node|short} s"{ifeq(tags, "tip", "", "{tags} ")}s{if(bookmarks, "{bookmarks} ")}s*{ifeq(branch, "default", "", "{branch} ")}s!- {author|user}: {desc|firstline}c
CsÀ|jƒ}|jƒ}|j}|jddtƒ}tj|dtƒ}tjddi|d6ƒ}tt	|dƒt	|dƒƒ}	t
||||d|	ƒt
||||d|	ƒgS(	sjFormats the given labels using the conflict marker template.

    Returns a list of formatted labels.
    RtmergemarkertemplatetquotedtcacheR¤iiN(RœRRt_defaultconflictmarkerR«tparsestringR,RCtmaxtlenR´(
RERbRcR{tcdtcoRR¯ttmplR°((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt
_formatlabels;s	#csC‡fd†}|j|ƒs"dSˆj}|jƒ}	|jƒpX|jƒpX|jƒ}
d|jƒ|jƒk}tˆ||	|
|ƒ\}}
|jd||	|
|fƒ|tkrÝt|}|j	}|j
}nt}t}t
dƒ}||
|
|f}|s)|ˆ||||||ƒSˆj|	ƒ}|d|ƒ}|d|ƒ}|d}tj||ƒ||jƒkr«|jt
dƒ||jƒ|	fƒn|jt
d	ƒ|	ƒ|jd
|||fƒ|jddd
ƒ}|d
krt}n$|st}ntˆ|||ƒ}|ˆ||||||||||fd|ƒ\}}|s·|rŒ|r™|j||	ƒq™n
tj|ƒtj|ƒtj|ƒ|S|rt||dƒsèdt||dƒkrtjd|jƒtjƒrd}qnt}dt||dƒkr^t}|jt
dƒ|	dƒr^d}q^n|rÓ|rÓt||dƒs–dt||dƒkrÓtj||ƒrÓ|jt
dƒ|	dƒrÐd}qÐqÓnt||dƒrõt ||ƒn|r|r%|j||	ƒq%n
tj|ƒtj|ƒtj|ƒ|S(sperform a 3-way merge in the working directory

    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
    cs…dtjj|jƒƒ|f}tjd|ƒ\}}ˆj|jƒ|jƒƒ}tj|dƒ}|j|ƒ|j	ƒ|S(Ns%s~%s.tprefixtwb(
R7RFtbasenamettempfiletmkstempt
wwritedataRQtfdopentwritetclose(RÀR£tpreRfRRQtf(RE(s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyttempWs"

RŽs/picked tool '%s' for %s (binary %s symlink %s)
smerging %s failed!
R“Ris.origsmerging %s and %s to %s
smerging %s
smy %s other %s ancestor %s
RtmergemarkerstbasicR{tcheckconflictst	conflictsR/s!^(<<<<<<< .*|=======|>>>>>>> .*)$iR\s0was merge of '%s' successful (yn)?$$ &Yes $$ &NotcheckchangedtchangedsJ output file %s appears unchanged
was merge successful (yn)?$$ &Yes $$ &NotfixeolN(!tcmpRCRRFtisbinaryRkRORxRRRR¡R+RtwjoinRRytstatusRt_defaultconflictlabelsR¿R)tunlinkRR
tretsearchRQt	MULTILINER,R]tfilecmpR[(RER`RaRbRcRdR{RËRRfR'R&RRHRRRReR|R}R~Rtmarkerstyletformattedlabelst	needcheckR‚tchecked((REs7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt	filemergeMsŽ
		$	
	
)		!



 



(+R¥Rti18nRRRwR;RsR«R§R7RÃRÙRÜR†R	R,RR
RRCRR%RORRR[RgR_R^RmRƒR+R…R‡R‰R¡R´R¸R×R¿Rátvaluest
i18nfunctions(((s7/usr/lib/python2.7/dist-packages/mercurial/filemerge.pyt<module>sDH0		B						r

Copyright © 2017 || Recoded By Mr.Bumblebee