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/merge.pyc

Xc@@sddlmZddlZddlZddlZddlZddlZddlmZddl	m
Z
mZmZm
Z
mZddlmZmZmZmZmZmZmZmZmZejZejZdZdefd	YZd
Z e!dZ"dZ#d
Z$dZ%e!dZ&e!dZ'dZ(dZ)e!e*dZ+dZ,dZ-e!dZ.dZ/e!e*e!e!e*dZ0e*dZ1dS(i(tabsolute_importNi(t_(tbinthextnullhextnullidtnullrev(	tcopiestdestutilterrort	filemergetobsoletetscmutiltsubrepotutiltworkercC@s.|jd}|d |d}dj|S(Nsii(tsplittjoin(tdatatbits((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt
_droponode'st
mergestatecB@seZdZdZdZed*d*d*dZedZdZ	d*d*d*dZ
dZdZd	Z
d
ZdZejdZejd
ZejdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%d Z&d!Z'd"Z(d#Z)d$Z*d%Z+d&Z,d'Z-d(Z.d)Z/RS(+sXtrack 3-way merge state of individual files

    The merge state is stored on disk when needed. Two files are used: one with
    an old format (version 1), and one with a new format (version 2). Version 2
    stores a superset of the data in version 1, including new kinds of records
    in the future. For more about the new format, see the documentation for
    `_readrecordsv2`.

    Each record can contain arbitrary content, and has an associated type. This
    `type` should be a letter. If `type` is uppercase, the record is mandatory:
    versions of Mercurial that don't support it should abort. If `type` is
    lowercase, the record can be safely ignored.

    Currently known records:

    L: the node of the "local" part of the merge (hexified version)
    O: the node of the "other" part of the merge (hexified version)
    F: a file to be merged entry
    C: a change/delete or delete/change conflict
    D: a file that the external merge driver will merge internally
       (experimental)
    m: the external merge driver defined for this merge plus its run state
       (experimental)
    f: a (filename, dictonary) tuple of optional values for a given file
    X: unsupported mandatory record type (used in tests)
    x: unsupported advisory record type (used in tests)
    l: the labels for the parts of the merge.

    Merge driver run states (experimental):
    u: driver-resolved files unmarked -- needs to be run next time we're about
       to resolve or commit
    m: driver-resolved files marked -- only needs to be run before commit
    s: success/skipped -- does not need to be run any more

    smerge/statesmerge/state2cC@s#t|}|j||||S(sPInitialize a brand new merge state, removing any existing state on
        disk.(Rtreset(trepotnodetothertlabelstms((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytcleanTscC@st|}|j|S(s1Initialize the merge state, reading it from disk.(Rt_read(RR((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytread\s
cC@s||_t|_d|_dS(s^Initialize the merge state.

        Do not use this directly! Instead call read() or clean().N(t_repotFalset_dirtytNonet_labels(tselfR((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt__init__cs		cC@si|_i|_d|_d|_||_x0dD](}|t|kr4t||q4q4W|r{||_||_nd|_|j	rd|_
n	d|_
tj|j
jdti|_t|_dS(Ntlocalctxtotherctxtstutmerge(R&R'(t_statet_stateextrasR"t_localt_otherR#tvarstdelattrt_readmergedrivertmergedrivert_mdstatetshutiltrmtreeRRtTruet_resultsR R!(R$RRRtvar((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRks$					
					cC@si|_i|_d|_d|_x0dD](}|t|kr+t||q+q+Wd|_d|_t	}|j
}x|D]\}}|dkrt||_q|dkrt||_q|dkr5|jdd}|d}t
|dks|d	krd
}n|d|_||_q|dkrh|jd}|d|j|d<q|d
kr|jdd\}}	|	jd}
i}d}x6|t
|
kr|
|d||
|<|d7}qW||j|<q|dkr?|jdd}
g|
D]}t
|dkr|^q|_q|js|j|qqWi|_t|_|rtj|ndS(sAnalyse each record content to restore a serialized state from disk

        This function process "record" entry produced by the de-serialization
        of on disk file.
        R&R'R(tLtOtmsitumsR)itFDCtfitlN(R&R'(R+R,R"R-R.R/R0R1R3tsett_readrecordsRRtlenR#tislowertaddR7R R!R	tUnsupportedMergeRecords(R$R8tunsupportedtrecordstrtypetrecordRtmdstatetfilenamet	rawextrast
extrapartstextrastiRR?((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRsX				
			
	
1		cC@s|j}|j}|j||r.|S|jd	jd}|jd|jfxmt|D]_\}}|ddkrk|dj	d}|j
dd|ddj|f||<qkqkW|Sd	S(
sRead merge state from disk and return a list of record (TYPE, data)

        We read data from both v1 and v2 files and decide which one to use.

        V1 has been used by version prior to 2.9.1 and contains less data than
        v2. We read both versions and check if no data in v2 contradicts
        v1. If there is not contradiction we can safely assume that both v1
        and v2 were written at the same time and use the extract data in v2. If
        there is contradiction we ignore v2 content as we assume an old version
        of Mercurial has overwritten the mergestate file and left an old v2
        file around.

        returns list of record [(TYPE, data), ...]iR:itFisitN(t_readrecordsv1t_readrecordsv2t
_v1v2matchRR"tparentstappendRt	enumerateRtinsertR(R$t	v1recordst	v2recordstmctxtidxtrR((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRAs$cC@st}x^|D]V}|ddkr6|j|q|ddkr|jdt|dfqqWx"|D]}||krqtSqqWtSdS(NiR9RPi(R@RDRR R6(R$RYRZtoldv2trec((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRTs	
$
cC@sg}y}|jj|j}xWt|D]I\}}|dkr]|jd|d fq+|jd|d fq+W|jWn+tk
r}|jtjkrqnX|S(sread on disk merge state for version 1 file

        returns list of record [(TYPE, data), ...]

        Note: the "F" data from this file are one entry short
              (no "other file node" entry)
        iR9iRP(	Rtvfststatepathv1RWRVtclosetIOErrorterrnotENOENT(R$RGR>ROR?terr((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRRs
c
C@sg}y|jj|j}|j}d}t|}x||kr||}|d7}td|||d!d}|d7}||||!}||7}|dkr|d|d}}n|j||fq?W|jWn+tk
r}	|	j	t	j
krqnX|S(sread on disk merge state for version 2 file

        This format is a list of arbitrary records of the form:

          [type][length][content]

        `type` is a single character, `length` is a 4 byte integer, and
        `content` is an arbitrary byte sequence of length `length`.

        Mercurial versions prior to 3.7 have a bug where if there are
        unsupported mandatory merge records, attempting to clear out the merge
        state with hg update --clean or similar aborts. The 't' record type
        works around that by writing out what those versions treat as an
        advisory record, but later versions interpret as special: the first
        character is the 'real' record type and everything onwards is the data.

        Returns list of records [(TYPE, data), ...].iis>Iitt(RR`tstatepathv2RRBt_unpackRVRbRcRdRe(
R$RGR>RtofftendRHtlengthRIRf((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRSs*




cC@s^|jjjdd}|jdk	rZ|j|krZtjtddtdn|S(NtexperimentalR2s(merge driver changed since merge startedthints)revert merge driver change or abort merge(RtuitconfigR1R"R	tConfigErrorR(R$tconfigmergedriver((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyR2%s
cC@s,|jdkrtdn|j|jS(Ns+localctx accessed but self._local isn't set(R-R"tRuntimeErrorR(R$((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyR&8scC@s,|jdkrtdn|j|jS(Ns+otherctx accessed but self._other isn't set(R.R"RsR(R$((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyR'>scC@sLt|jpKt|jpK|jjj|jpK|jjj|jS(sWhether mergestate is active.

        Returns True if there appears to be mergestate. This is a rough proxy
        for "is a merge in progress."
        (tboolR-R+RR`texistsRaRh(R$((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytactiveDscC@s2|jr.|j}|j|t|_ndS(s*Write current state on disk (if necessary)N(R!t_makerecordst
_writerecordsR (R$RG((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytcommitPs	
cC@sg}|jdt|jf|jdt|jf|jrr|jddj|j|jgfnx|jjD]\}}|ddkr|jddj|g|fq|dt	ks|d	t	kr
|jd
dj|g|fq|jddj|g|fqWx_t
|jjD]H\}}djd|jD}|jd
d||ffqGW|jdk	rdj|j}|jd|fn|S(NR9R:R;sitdtDiitCRPcs@s%|]\}}d||fVqdS(s%s%sN((t.0tktv((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pys	<genexpr>hsR>s%s%sR?(RVRR-R.R2RR3R+t	iteritemsRtsortedR,R#R"(R$RGRzRRKRNRLR((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRwWs(	& &'"!cC@s|j||j|dS(s,Write current state on disk (both v1 and v2)N(t_writerecordsv1t_writerecordsv2(R$RG((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRxps
cC@s|jj|jd}t|}t|}|ddksFt|jt|jdx:|D]2\}}|dkrg|jdt	|qgqgW|j
dS(s/Write current state on disk in a version 1 filetwiR9s
RPs%s
N(RR`RatitertnexttAssertionErrortwriteRR-RRb(R$RGR>tirecordstlrecordsRHR((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRuscC@sd}|jj|jd}x|D]|\}}t|dksIt||krodd||f}}ndt|}|jt||t||q%W|jdS(sqWrite current state on disk in a version 2 file

        See the docstring for _readrecordsv2 for why we use 't'.tLOFRiRgs%s%ss>sI%isN(RR`RhRBRRt_packRb(R$RGt	whitelistR>tkeyRtformat((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRs&cC@s|jrt}n;tj|jj}|jjjd||j	d||j|jt
|j|jt
|j|jg|j
|<it
|jd6|j|<t|_dS(s/add a new (potentially?) conflicting file the merge state
        fcl: file context for local,
        fco: file context for remote,
        fca: file context for ancestors,
        fd:  file path of the resulting merge.

        note: also write the local version to the `.hg/merge` directory.
        smerge/R)tancestorlinknodeN(tisabsentRthashlibtsha1tpatht	hexdigestRR`RRRtfilenodetflagsR+RR,R6R!(R$tfcltfcotfcatfdthash((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRDs		  cC@s
||jkS(N(R+(R$tdfile((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt__contains__scC@s|j|dS(Ni(R+(R$R((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt__getitem__scC@stt|jS(N(RRR+(R$((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt__iter__scC@s
|jjS(N(R+tkeys(R$((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytfilesscC@s||j|d<t|_dS(Ni(R+R6R!(R$Rtstate((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytmarkscC@s|jS(N(R3(R$((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRJscc@s<x5|jjD]$\}}|ddkr|VqqWdS(s%Obtain the paths of unresolved files.iR)N(R+titems(R$R>tentry((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt
unresolvedscc@s<x5|jjD]$\}}|ddkr|VqqWdS(s*Obtain the paths of driver-resolved files.iRzN(R+R(R$R>R((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytdriverresolvedscC@s|jj|iS(N(R,t
setdefault(R$RK((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRNsc	C@s/||dkrtdfS|j|}|\}}}}}	}
}}|j|j}
|j|}|jd}|r|j|}nd}|j|||}|j||
|
}|jj|d|	d|}|j	}|j	}d|||krvd|||krv|j
tkr^||kr^|rs|jjj
td|qsqv||krv|}qvn|r|tkr|jjd	|}|jj||j||jn|jjj|d
ttj|j|j||||d|j\}}}n6tj|j|j||||d|j\}}}|dkr|j|=|jj|dt|_n|s|j|dn|r%d}|r|jrd
}qd}nB|jrd}n-|jr||jkrd}qd}n||f|j |<n||fS(s)rerun merge process for file path `dfile`trdiRtfileidtchangeidtxR?sQwarning: cannot merge flags for %s without common ancestor - keeping local flags
smerge/t
ignoremissingRR]R>tgtamtaN(!R6R+RR.RNtgetR"t_filectxorabsenttfilectxRRRRotwarnRRR`twwriteRRbtwvfst
unlinkpathR
tpremergeR-R#R,tpopR!RRR&R7(R$t
preresolveRtwctxt
stateentryRRtlfiletafiletanodetofiletonodeRtoctxRNt
anccommitnodetactxtfcdRRtflotflaR>tcompleteR]tdeletedtaction((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt_resolvesn

(	

					cC@s(|tkrtj||S||SdS(N(RR
t
absentfilectx(R$thexnodetctxR>((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRscC@s|jt||S(sarun premerge process for dfile

        Returns whether the merge is complete, and the exit code.(RR6(R$RR((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRscC@s|jt||dS(sdrun merge process (assuming premerge was run) for dfile

        Returns the exit code of the merge.i(RR (R$RR((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytresolve scC@sd\}}}xh|jjD]W\}}|dkrD|d7}q|dkr|dkri|d7}qv|d7}qqW|||fS(sKreturn counts for updated, merged and removed files in this
        sessioniiR](iiiN(R7t
itervaluesR"(R$tupdatedtmergedtremovedR]R((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytcounts&s

cC@s<tg|jjD]"\}}|ddkrt^qS(s0get unresolved count for this merge (persistent)iR)(RBR+RR6(R$R>R((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytunresolvedcount4scC@s|igd6gd6gd6gd6gd6}xL|jjD];\}\}}|dk	r9||j|ddfq9q9W|S(s2return lists of actions to perform on the dirstateR]R>RRRsmerge resultN(R7RR"RV(R$tactionsR>R]R((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyR9s
)"!cC@s5|jjjtk}t|j|j|dS(s-record remove/add/get actions in the dirstateN(Rtdirstatetp2Rt
recordupdatesR(R$tbranchmerge((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt
recordactionsAscC@sd|j|<dS(s]queues a file to be removed from the dirstate

        Meant for use by custom merge drivers.iR]N(iR](R7(R$R>((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytqueueremoveFscC@sd|j|<dS(sYqueues a file to be added to the dirstate

        Meant for use by custom merge drivers.iRN(iR(R7(R$R>((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytqueueaddLscC@sd|j|<dS(scqueues a file to be marked modified in the dirstate

        Meant for use by custom merge drivers.iRN(iR(R7(R$R>((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytqueuegetRsN(0t__name__t
__module__t__doc__RaRhtstaticmethodR"RRR%RRRARTRRRSRt
propertycacheR2R&R'RvRyRwRxRRRDRRRRRRJRRRNRRRRRRRRRRR(((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyR-sV#		7	"			(																	K									cC@s|jj||dd}dddg}||krdjg|D]}d|d^qC}tjtd||||fn|S(NtdefaulttaborttignoreRs, t's$%s.%s not valid ('%s' is none of %s)(RoRpRR	RqR(RtsectiontnameRptvalidRtvalidstr((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt_getcheckunknownconfigXs*cC@sl|dkr|}n|jjj|ok|jj|ok|jj||jkok||j||S(N(R"RtaudittchecktisfileorlinkRt	normalizetcmp(RRR[R>tf2((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt_checkunknownfilebs	c@sLt}ttt|dd}t|dd}|sDfd}	x|jD]\}
\}}}
|dkrt||||
r|j|
qqd|dkrdt||||
|dr|j|
qqdqdWtg|D]}|jj|r|^q}||}|	|||	||n!x|jD]\}
\}}}
|d	krQ|\}}t||||
}|jj|
r|}n|}|sd
|tfdf||
<qa|s|dkr
d
|
|
dt|fdf||
<qa|dkr)j|
qa|dkrEj|
nd
|t	fdf||
<qQqQWx.t
D] }
|jjt
d|
qrWrtjt
dnx.t
D] }
|jjt
d|
qWx`|jD]R\}
\}}}
|
|k}|dkr|\}d
||f|
f||
<qqWdS(s
    Considers any actions that care about the presence of conflicting unknown
    files. For some actions, the result is to abort; for others, it is to
    choose a different action.
    R*tcheckunknowntcheckignoredc@s<|dkrj|n|dkr8j|ndS(NRR(tupdate(t	conflictsRp(tabortconflictst
warnconflicts(s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytcollectconflictsvstctdctdgitcmRsremote createdRR;s#remote differs from untracked localRs%s: untracked file differs
sLuntracked files in working directory differ from files in requested revisions%s: replacing untracked file
N(RR(R@RRRRDRt_ignoreR R"R6RRoRRR	tAbort(RRR[tforceRt
mergeforceRt
unknownconfigt
ignoredconfigRR>R;targstmsgRtignoredconflictstunknownconflictstfl2tanct	differentRptbackupR((RRs3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt_checkunknownfilesjs^			"!

"	 "	cC@si}d}|rd}nx6|jD](}||kr(|ddf||<q(q(W|sx0|jD]}||krgd||<qgqgWn|S(s
    Forget removed files

    If we're jumping between revisions (as opposed to merging), and if
    neither the working directory nor the target rev has the file,
    then we need to remove it from the dirstate, to prevent the
    dirstate from listing the file when it is no longer in the
    manifest.

    If we're merging, and the other revision has removed a file
    that is not present in the working directory, we need to mark it
    as removed.
    R>R]sforget deletedsforget removedN(R>Nsforget removed(RR"R(RR[RRR;R>((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt_forgetremoveds	cC@s9t|}|rAx9dD]1}x(||D]\}}}|j|q*WqWx(|dD]\}}}|j|qYWxA|dD]5\}}}|\}}	|j||j|qWx(|d	D]\}}}|j|qWxV|d
D]G\}}}|\}
}}}}
|r-|j|
n|j|qWni}x_t|D]Q}tj|}||krtjtd|||fn|||<qTWd}}}x{t|j	D]g\}}|j
|r|j
|rtjtd
||fn|d}|d}|}qWdS(NRRR>RtcdRR]tdmRR;s(case-folding collision between %s and %sRQs5case-folding collision between %s and directory of %st/(RRR>RRR(R@RDtdiscardRRtnormcaseR	RRRt
startswith(RtwmfRtpmmfR;R>RRRRtf1tfatmoveRtfoldmaptfoldt
foldprefixtunfoldprefixtlastfull((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt_checkcollisionsB



cC@stS(svrun the preprocess step of the merge driver, if any

    This is currently not implemented -- it's an extension point.(R6(RRRR((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytdriverpreprocessscC@stS(strun the conclude step of the merge driver, if any

    This is currently not implemented -- it's an extension point.(R6(RRRR((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytdriverconclude	sc	@s|d-k	r!|jr!d-}niiiif\}	}
}}gtj||gddD]}
|
j^qe|rtj|||}|\}	}
}}n|jjt	d|jj
dt|t|t|f|jj
d||fj|j|j}}}t|	j
}|j|
j
d|krtfdjDr|dcd7<qn|d-k	r|j|}|j|}n|j|}i}x
|jD]\}\\}}\}}|r|r||kr|	j|d-}|d-k	rnd	|||t|jfd
|f||<qd	||d-t|jfdf||<q||}|j|}d|||k}||kr||krd
d.df||<q||krM||krM||kr1d|fdf||<qd|tfdf||<q|rx||krxd|fdf||<q|r||krd|tfdf||<qd	|||t|jfdf||<q|r||krq||
krS|
|}||kr3d	||d-t|jfdf||<qd||fd|f||<q||	kr|	|}d	|||t|jfd|f||<q||kr|||kr|rd/||<qd|d-|t|jfdf||<q|ddkrd0||<qd1||<qq|r||kr4q||
kr|
|}||krd	||d-t|jfd!f||<qd"||fd#|f||<q||	kr!|	|}||krd	|||t|jfd$|f||<qd	|||t|jfd%|f||<q||kr|sLd&|fd'f||<q|skd&|fd'f||<qd(||jfd)f||<q|||kr|rd&|fd*f||<qd+d-||t|jfd,f||<qqqW|||fS(2s
    Merge wctx and p2 with ancestor pa and generate merge action list

    branchmerge and force are as passed in to update
    matcher = matcher to filter file lists
    acceptremote = accept the incoming changes without prompting
    RcS@s
|jS(N(trev(R((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt<lambda>ssresolving manifests
s) branchmerge: %s, force: %s, partial: %s
s% ancestor: %s, local: %s, remote: %s
s.hgsubstatec3@s$|]}j|jVqdS(N(tsubtdirty(R}R((R(s3/usr/lib/python2.7/dist-packages/mercurial/merge.pys	<genexpr>0st+R;sboth renamed from sboth createdR?R~sremote unchangedtesupdate permissionsRsremote is newersversions differs%remote directory rename, both createdRs$remote directory rename - move from slocal copied/moved from R]s
remote deleteRsprompt changed/deletediRR>sremote deleteds
other deleteds$local directory rename, both createdRs"local directory rename - get from sremote copied from sremote moved from Rsremote createdRsremote created, get or mergesremote recreatingRsprompt deleted/changedN((R]Ns
remote delete(R>Nsremote deleted(R]Ns
other deleted(R"talwaysRRUtmanifestRtmergecopiesRotnoteRtdebugRtR@tvaluesRtanytsubstatetmatchestdiffRRR RRR6(RRRtpaRRtmatchertacceptremotetfollowcopiestcopytmovewithdirtdivergetrenamedeleteRtrettm1tm2tmatcopiedR2RR>tn1tfl1tn2R
RRRtnolR((Rs3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt
manifestmerges		9#&+






c	C@sx|jD]\}\}}}|dkr_||kr_||j||r_d||<q
|dkr
||kr
||j||r
||=q
q
WdS(s[Resolves false conflicts where the nodeid changed but the content
       remained the same.RR]sprompt sameRN(R]Nsprompt same(RRR"(	RRR[tancestorRR>R;RR((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt_resolvetrivials
"0
0c
@st|dkr_t||||d|||||	\}
}}t|||||
|	n|jjtd||tdjd|Dfi}
d\}}xq|D]i}|jjtd|t|||||||||	\}
}}t|||||
|	|dks>t|t|krG|}n|dkskt|t|krt|}nxt|
j	D]\}}|\}}}|jj
d|||f||
kr|
|}||kr||j|q|g||<qi|g|6|
|<qWqW|jjtdi}
xt|
jD]\}}t|dkr|jd\}t
fd	dDr|jjtd
||fd|
|<qPqnd|kr|jjtd||dd|
|<qPnd
|kr|d
dt
fd|d
dDr|jjtd||
|<qPqn|jjtd|xTt|jD]@\}x1D])\}}}|jjd||fqWqW|jd\}|jjtd||fd|
|<qPqPW|jjtdt||||d|
|jdkrt|||}|
j|n|
||fS(sDCalculate the actions needed to merge mctx into wctx using ancestorsiis5note: merging %s and %s using bids from ancestors %s
s and cs@s|]}t|VqdS(N(tstr(R}R((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pys	<genexpr>ss"
calculating bids for ancestor %s
s %s: %s -> %s
s 
auction for merging merge bids
c3@s|]}|dkVqdS(iN((R}R(R?(s3/usr/lib/python2.7/dist-packages/mercurial/merge.pys	<genexpr>ss %s: consensus for %s
R~s %s: picking 'keep' action
Rc3@s|]}|kVqdS(N((R}R(tga0(s3/usr/lib/python2.7/dist-packages/mercurial/merge.pys	<genexpr>ss %s: picking 'get' action
s% %s: multiple bids for merge action:
s  %s -> %s
s( %s: ambiguous merge - picked %s action
send of auction

N(NN(RBRDRRoR,RRR"RRR-RVRtallRRFR#RR(RRR[t	ancestorsRRR5R6R4RRR9R:tfbidsREtdiverge1t
renamedelete1R>RR;RRRztbidst_ft	fractions((RHR?s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytcalculateupdatess~		*
$	$	
  	$
	"c
c@s|jj}tj}|j}|jj}ytj}Wn1t	k
rm}|j
t
jkrdnd	}nXd}x|D]\}	}
}|jj
d|	|f|r|jjtd|	n||	y|||	dtWn6t	k
r#}|jjtd|	|jfnX|dkrD||	fVd}n|d7}q{W|dkrl||	fVn|rytjWqt	k
r}|j
t
jkrn|jjtd|jqXnd	S(
sSapply removes to the working directory

    yields tuples for progress updates
    is
 %s: %s -> r
sremoving %s
Rs update failed to remove %s: %s!
idisCcurrent directory was removed
(consider changing to repo root: %s)
N(RotverboseRRtwjoinRRtostgetcwdtOSErrorRdReR"R-R,RR6Rtstrerrortroot(
RRRRtunlinkRSRtcwdRfROR>RRtinst((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytbatchremovesF		

	cc@s|jj}|j}|j}|j}d}|jj|dt|jxb|D]Z\}\}	}
}|jjd||f|r|jjt	d|n|
r)|j
|}tj|||}
y)|jj
|rtj||
nWq)tk
r%}|jtjkr&q&q)Xn|jj|ra|jj|ra|jj|n||||j|	dt|dkr||fVd}n|d7}qSWWdQX|dkr||fVndS(	suapply gets to the working directory

    mctx is the context to get from

    yields tuples for progress updates
    it
expectedcounts
 %s: %s -> g
sgetting %s
tbackgroundcloseidiN(RoRRRRRtbackgroundclosingRBR-R,RRSRtorigpathRRtrenameRVRdRetisdirtislinkt
removedirsRR6(RR[RRRtfctxRRoROR>RR
RtabsftorigR(((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytbatchget5s8			
%"	c5
C@sd+\}}}tj||jj|j|}	g}
x$|jD]\}}|jqLWt|d}
|
jt|d|
j|dx|
D]\}}}|\}}}}}|dkrqn|d,krt	j
||}n$|jjd||f||}|d,krAt	j
||}n
||}||}||krn||}n|j
|dt}|	j||||||kr|r|
j|qqW|jj}td}td	}|jj}x`|
D]X}tjj|j|r|jjd
|||tj|j|qqWtd|jD}g|dD]}|ddkry|^qyrtj||||||nd} tj|jd
t|f|d}!x=|!D]5\}"}#| |"7} ||| d|#d|d|qWt |d}tj|jd
t!||f|d}!x=|!D]5\}"}#| |"7} ||| d|#d|d|qdWt |d}g|dD]}|ddkr|^qrtj||||||nx^|dD]R\}}}|jjd||f| d7} ||| d|d|d|qWx^|dD]R\}}}|jjd||f| d7} ||| d|d|d|qeWx^|dD]R\}}}|jjd||f| d7} ||| d|d|d|qWx5|dD])\}}}|jjd||fq'Wx|dD]\}}}|jjd||f| d7} ||| d|d|d||\}$}%|jj"td|$|f|||j#||j
|$j$|%tj|j|$|d7}q_Wx|dD]\}}}|jjd||f| d7} ||| d|d|d||\}$}%|jj"td |$|f|j#||j
|$j$|%|d7}q8Wx|d!D]\}}}|jjd"||f| d7} ||| d|d|d||\}%||tj%|j|d#|%kd$|%k|d7}qW|o|
o|	j&}&|&rO|	j't(||	|d%|}'t)|	j*}(|'s|||t+t |(dfSg})x<|
D]4\}}}||(kr|)j|||fqqW|)}
ng}*x|
D]\}}}|jjd&||f| d7} ||| d|d|d||dkrtj||||j,|||q\n|||	j-||\}+},|+s\|d7}|*j|||fq\q\Wxj|*D]b\}}}|jjd'||f| d7} ||| d|d|d||	j.||q;	W|	j'|	j/}-|&r
|-r
|	j0d(kr
t1||	|d%|s
t+|-d}-n|	j'n|	j2\}.}/}0||.7}||/7}||07}|	j3}1|1r
t)d)|dD}2xB|1j4D]4\}3}4||3j|4|2j5d*|4Dqy
Wg|dD]}|d|2kr
|^q
|d<n||d,d|d|||||-fS(-sapply the merge action list to the working directory

    wctx is the working copy context
    mctx is the context to be merged into the working copy

    Return a tuple of counts (updated, merged, removed, unresolved) that
    describes how many files were affected by the update.
    iRRR;s.hgsubstates! preserving %s for resolve of %s
RtupdatingRsremoving %s
cs@s-|]#\}}|dkrt|VqdS(R~N(RB(R}R;R?((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pys	<genexpr>sR]gMbP?titemttotaltunitRR>s
 %s: %s -> f
iRs
 %s: %s -> a
Rs %s: %s -> am
R~s
 %s: %s -> k
Rs %s: %s -> dm
smoving %s to %s
Rs %s: %s -> dg
sgetting %s to %s
R(s
 %s: %s -> e
R?RRs %s: %s -> m (premerge)
s %s: %s -> m (merge)
R(cs@s|]}|dVqdS(iN((R}R((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pys	<genexpr>scs@s|]}|dVqdS(iN((R}R((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pys	<genexpr>1s(iiiN(6RRtp1RRtsortRtextendR"R
RRoR-RRRDRVRRRtprogressRTRtlexistsRSRRtsumR
tsubmergeRR\RBRhR,RRtsetflagsR2RyR!R@RtmaxRERRRRJR"RRRtdifference_update(5RRRR[t	overwriteRRRRRtmovesR;R?tmergeactionsR>RRRRRRRRRRRRt	_updatingt_filesRpt
numupdatesRtztprogRORjtf0Rtusemergedrivertproceedtunresolvedft
newactionst
tocompleteRR]Rt	msupdatedtmsmergedt	msremovedtextraactionstmfilesR~tacts((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytapplyupdates[s
*





-%
#(
#-
#
#
#
 
"
 "
	
(
	









4c
C@sxL|jdgD]8\}}}|r;|jj|q|jj|qWx3|jdgD]\}}}|jj|qbWx3|jdgD]\}}}|jj|qWxL|jdgD]8\}}}|r|jj|q|jj|qWx3|jdgD]\}}}|jj|qWx#|jdgD]\}}}qSWxL|jdgD]8\}}}|r|jj|qy|jj|qyWx|jdgD]\}}}|\}}}}	}
|rb|jj|||kr|	r'|jj|n||krI|jj	||q_|jj	||qq||kr|jj|n|	r|jj|qqWx|jd	gD]w\}}}|\}}|r|jj||jj||jj	||q|jj||jj|qWxk|jd
gD]W\}}}|\}}|r|jj||jj	||q?|jj|q?WdS(s$record merge actions to the dirstateR]R>RRR(R~RR;RRN(
RRtremovetdropRDtnormallookuptotherparenttnormalR*R7(
RRRR>RRRRRRRRtflag((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyR9s`""""""""""c	1C@s	|}	|d5ks|jr't}
nt}
|j|d5}|j}|d}
d5g}|d5k	r||g}n|d5kr|jjddtj	|\}}}||j
}n|o|}||}|dd5kr|jjdddgdgkrd|jj
|
j
|j
}gt|pJtgD]}||^qK}q|
j|d|g}n|
j
|j
t|
t|f\}}}}|s!t|dkrtjtd	ntj|}t|jr!tjtd
q!n|r||gkrNtjtdnU||
gkr|r|
j|jkrtjtdd
tdqn|r|js|jrtjtdd
tdnxt|jD]}|j|jqWn]|ss|
|krj|j ddtd|dd|j dd|ddddd7S||
g|gfkrs|j!dt}|s|	d5krdt"j#||
j
g}||j
|kr|
g}qm|r4td}|	d5krtd}ntd}tj|d
|qmtd}td}tj|d
|qp|
g}qsn|jj$ddt} |r|g}t} n.||gkr|
g}n|dst} n|r|j!dtrt} nt%|||||||| d|d|\}!}"}#d |!krEd }$|!|$\}%}&}t&j'|}'|$|'d!<|%d"kr|jj(td#|'drd8|!|$<qB|$|
krd9|!|$<qBd:|!|$<qE|%d)krE|&\}(})}*}+}||)j)},|jj(td*|'ddkr8d+|,tfd,f|!|$<qB|!|$=qEnt*d-d.j+D}-xV|!j,D]H\}$\}%}&}|%|-krg|-|%<n|-|%j-|$|&|fqnWt.j/|j0s$|r|s|j!dtd/trt1||j2d5q$t1||j2|-nx_t|"j,D]K\}$}.|jj3td0|$x"|.D]}/|jj3d1|/qdWq7Wx_t|#j,D]K\}$}.|jj3td2|$x"|.D]}/|jj3d1|/qWqW|s|t|df\}}}}n|
sP|j ddtd|d||j4j5d3|j6nt7||-|||d4|}0|
s|j8j9|j:||t;||-|t.j<|j=d3|s|j8j>|jn|j8j?nWd5QX|
s	|j dd|d|d|0d6n|0S(;sq
    Perform a merge between the working directory and the given node

    node = the node to update to, or None if unspecified
    branchmerge = whether to merge between branches
    force = whether to force branch merging or file overwriting
    matcher = a matcher to filter file lists (dirstate not updated)
    mergeancestor = whether it is merging with an ancestor. If true,
      we should accept the incoming changes for any prompts that occur.
      If false, merging with an ancestor (fast-forward) is only allowed
      between different named branches. This flag is used by rebase extension
      as a temporary fix and should be avoided in general.
    labels = labels to use for base, local and other
    mergeforce = whether the merge was run with 'merge --force' (deprecated): if
      this is True, then 'force' should be True as well.

    The table below shows all the behaviors of the update command
    given the -c and -C or no options, whether the working directory
    is dirty, whether a revision is specified, and the relationship of
    the parent rev to the target rev (linear, on the same named
    branch, or on another named branch).

    This logic is tested by test-update-branches.t.

    -c  -C  dirty  rev  |  linear      same    cross
     n   n    n     n   |    ok        (1)       x
     n   n    n     y   |    ok        ok       ok
     n   n    y     n   |   merge      (2)      (2)
     n   n    y     y   |   merge      (3)      (3)
     n   y    *     *   |   discard   discard   discard
     y   n    y     *   |    (4)       (4)      (4)
     y   n    n     *   |    ok        ok       ok
     y   y    *     *   |    (5)       (5)      (5)

    x = can't happen
    * = don't-care
    1 = abort: not a linear update (merge or update --check to force update)
    2 = abort: uncommitted changes (commit and merge, or update --clean to
                 discard changes)
    3 = abort: uncommitted changes (commit or update --clean to discard changes)
    4 = abort: uncommitted changes (checked in commands.py)
    5 = incompatible options (checked in commands.py)

    Return the same tuple as applyupdates().
    isupdate with no targets3.9R*tpreferancestort*Risoutstanding uncommitted mergesoutstanding merge conflictss7merging with a working directory ancestor has no effectsnothing to mergeRns#use 'hg update' or check 'hg heads'suncommitted changessuse 'hg status' to list changest	preupdatetthrowtparent1tparent2RQRR	tmissings6commit and merge, or update --clean to discard changess+commit or update --clean to discard changessnot a linear updates'merge or update --check to force updateR6R4Rs.hgsubstateR>Rsjlocal%(l)s changed %(f)s which other%(o)s deleted
use (c)hanged version or (d)elete?$$ &Changed $$ &DeleteR]s
prompt deleteRsprompt keepRRsrother%(o)s changed %(f)s which local%(l)s deleted
use (c)hanged version or leave (d)eleted?$$ &Changed $$ &DeletedRsprompt recreatingcs@s|]}|gfVqdS(N((R}R;((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pys	<genexpr>Dssa am f g cd dc r dm dg m e ktbranchs<note: possible conflict - %s was renamed multiple times to:
s %s
s9note: possible conflict - %s was deleted and renamed to:
tupdatestateRNi(iiii(R]Ns
prompt delete(RNsprompt keep(RNsprompt keep(@R"R)R R6twlockRURot
deprecwarnRt
destupdateRt
configlistt	changelogtcommonancestorsheadsRRRERGRBR	RRRRtlistRRRRR0R%t
bailifchangedthookR&Rt
foregroundt
configboolRQR
t
partextrastpromptchoiceRtdictRRRVRtfscasesensitiveRR R*RR`RRRRtbeginparentchanget
setparentsRRYRt	setbranchtendparentchange(1RRRRREt
mergeancestorRR4RRtpartialtwctplRmtpasR#t_markt_actRwRtcahsRtfp1tfp2txp1txp2RR(R&RRRnR6tactionbyfileR9R:R>R;RtpromptsRRRRRRtfltnftstats((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyRs
0	


	

$!/6		
		
		



		
"


!
&c	
C@s|jj|dj|j}t||jtt|jd|d|}t}|j}|rt|dkr||kr|j||dj}n|j	j
|j|dj||j	j|j
tj||j|j|j	j|S(sDo a graft-like merge.

    This is a merge where the merge ancestor is chosen such that one
    or more changesets are grafted onto the current changeset. In
    addition to the merge, this fixes up the dirstate to include only
    a single parent (if keepparent is False) and tries to duplicate any
    renames/copies appropriately.

    ctx - changeset to rebase
    pctx - merge base, usually ctx.p1()
    labels - merge labels eg ['local', 'graft']
    keepparent - keep second parent if any

    t.RRii(Rt
isancestorRRR6RRURBRRRRRtcurrenttransactionRtduplicatecopiesR#R(	RRtpctxRt
keepparentRRtpotherRU((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pytgraftys%!$


(2t
__future__RRdRRTR4tstructti18nRRRRRRRRQRRR	R
RRR
RRtpackRtunpackRiRtobjectRRR"RRRR R!R"RDRFR RQR\RhRRRR(((s3/usr/lib/python2.7/dist-packages/mercurial/merge.pyt<module>s@(@			-	
	P		+		
X	-	&	T