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/usr/lib64/python2.7/site-packages/mercurial/merge.pyc
�
1�3\c@@s0ddlmZddlZddlZddlZddlZddlmZddlm	Z	m
Z
mZmZm
Z
mZmZddlmZddlmZmZmZmZmZmZmZmZmZmZmZejZ ej!Z"d�Z#d	Z$d
Z%dZ&dZ'd
Z(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2dZ3dZ4dZ5dZ6dZ7dZ8dZ9dZ:dZ;dZ<dZ=dZ>dZ?d Z@d!ZAdZBd"ZCd#ZDd$ZEd%ZFd&ZGd'eHfd(��YZId)�ZJeKd*�ZLd+eHfd,��YZMd-�ZNd.�ZOd/�ZPeKd0�ZQeKd1�ZRd2�ZSd3�ZTd4�ZUeVd5�ZWd6�ZXeKeVd7�ZYd8�ZZd9�Z[d:�Z\d;�Z]ej^d<e_�d=eHfd>��Y�Z`eKd?�Zad@�ZbeKeVeKeKeVeKeKdA�ZceVeVdB�ZdeVe_e_eVeVdC�ZedS(Di(tabsolute_importNi(t_(taddednodeidtbinthextmodifiednodeidtnullhextnullidtnullrev(tattr(tcopiestencodingterrort	filemergetmatchtobsutiltpycompattscmutiltsubrepoutiltutiltworkercC@s.|jd�}|d |d}dj|�S(Nsi����i����(tsplittjoin(tdatatbits((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt
_droponode-stLtOtFtCtDtPtmtftltttXtxtutstrtputprtdtatgtptamtctdctcdtdgtdmtktetcmt
mergestatecB@s�eZdZdZdZed+d+d+d��Zed��Zd�Z	d+d+d+d�Z
d�Zd�Zd	�Z
d
�Zd�Zejd��Zejd
��Zejd��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d �Z&d!�Z'd"�Z(d#�Z)d$�Z*d%�Z+d&�Z,d'�Z-d(�Z.d)�Z/d*�Z0RS(,s�track 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)
    P: a path conflict (file vs directory)
    m: the external merge driver defined for this merge plus its run state
       (experimental)
    f: a (filename, dictionary) 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

    Merge record states (stored in self._state, indexed by filename):
    u: unresolved conflict
    r: resolved conflict
    pu: unresolved path conflict (file conflicts with directory)
    pr: resolved path conflict
    d: driver-resolved conflict

    The resolve command transitions between 'u' and 'r' for conflicts and
    'pu' and 'pr' for path conflicts.
    smerge/statesmerge/state2cC@s#t|�}|j|||�|S(sPInitialize a brand new merge state, removing any existing state on
        disk.(R8treset(trepotnodetothertlabelstms((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytclean�scC@st|�}|j�|S(s1Initialize the merge state, reading it from disk.(R8t_read(R:R>((s5/usr/lib64/python2.7/site-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:((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt__init__�s		cC@s�i|_i|_d|_d|_||_x0dD](}|t|�kr4t||�q4q4W|r{||_||_nd|_|j	r�t
|_n	t|_t
j|jjjd�t�i|_t|_dS(Ntlocalctxtotherctxtmerge(RIRJ(t_statet_stateextrasREt_localt_otherRFtvarstdelattrt_readmergedrivertmergedrivertMERGE_DRIVER_STATE_SUCCESSt_mdstatetMERGE_DRIVER_STATE_UNMARKEDtshutiltrmtreeRBtvfsRtTruet_resultsRCRD(RGR;R<R=tvar((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyR9�s$					
					cC@s�i|_i|_d|_d|_x0dD](}|t|�kr+t||�q+q+Wd|_t|_	t
�}|j�}x�|D]�\}}|tkr�t
|�|_q�|tkr�t
|�|_q�|tkr>|jdd�}|d}t|�dks|tttfkr%t}n|d|_||_	q�|ttttfkr}|jd�}|d|j|d<q�|tkr|jdd�\}}	|	jd�}
i}d}x6|t|
�kr�|
|d||
|<|d7}q�W||j|<q�|tkrT|jdd�}
g|
D]}t|�dkr*|^q*|_q�|j�s�|j|�q�q�Wi|_t|_|r�t j!|��ndS(	s�Analyse each record content to restore a serialized state from disk

        This function process "record" entry produced by the de-serialization
        of on disk file.
        RIRJsiiiN(RIRJ("RLRMRERNRORPRQRRRTRUtsett_readrecordstRECORD_LOCALRtRECORD_OTHERtRECORD_MERGE_DRIVER_STATERtlenRVtMERGE_DRIVER_STATE_MARKEDt
RECORD_MERGEDtRECORD_CHANGEDELETE_CONFLICTtRECORD_PATH_CONFLICTtRECORD_MERGE_DRIVER_MERGEtRECORD_FILE_VALUESt
RECORD_LABELSRFtislowertaddR[RCRDRtUnsupportedMergeRecords(RGR\tunsupportedtrecordstrtypetrecordRtmdstatetfilenamet	rawextrast
extrapartstextrastiR=R"((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyR@�s^				
			
	
	1		cC@s�|j�}|j�}|j||�r.|S|jdj�d}|jt|j�f�xmt	|�D]_\}}|dt
krk|djd�}|jdd�|ddj
|�f||<qkqkW|SdS(s�Read 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), ...]i����iisi����tN(t_readrecordsv1t_readrecordsv2t
_v1v2matchRBREtparentstappendR`Rt	enumerateRdRtinsertR(RGt	v1recordst	v2recordstmctxtidxR(R((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyR^�s$cC@s�t�}x^|D]V}|dtkr6|j|�q|dtkr|jtt|d�f�qqWx"|D]}||krqtSqqWtSdS(Nii(R]R_RkRdRRCRZ(RGRR�toldv2trec((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyRzs	
$
cC@s�g}y}|jj|j�}xWt|�D]I\}}|dkr]|jt|d f�q+|jt|d f�q+W|j�Wn+tk
r�}|j	t	j
kr��q�nX|S(s�read 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)
        ii����(RBRYtstatepathv1R}R|R_RdtclosetIOErrorterrnotENOENT(RGRnR!RvR"terr((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyRx#s
c
C@s$g}y�|jj|j�}|j�}d}t|�}x�||kr�|||d!}|d7}td|||d!�d}|d7}||||!}||7}|tkr�|dd!|d}}n|j||f�q?W|j�Wn+t	k
r}	|	j
t
jkr �q nX|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>Ii(RBRYtstatepathv2RARbt_unpacktRECORD_OVERRIDER|R�R�R�R�(
RGRnR!RtofftendRotlengthRpR�((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyRy9s*



cC@s^|jjjdd�}|jdk	rZ|j|krZtjtd�dtd���n|S(NtexperimentalRSs(merge driver changed since merge startedthints)revert merge driver change or abort merge(RBtuitconfigRRRERtConfigErrorR(RGtconfigmergedriver((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyRSas
cC@s5|jdkr'd}tj|��n|j|jS(Ns+localctx accessed but self._local isn't set(RNRERtProgrammingErrorRB(RGtmsg((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyRItscC@s5|jdkr'd}tj|��n|j|jS(Ns+otherctx accessed but self._other isn't set(RORERR�RB(RGR�((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyRJ{scC@sLt|j�pKt|j�pK|jjj|j�pK|jjj|j�S(s�Whether mergestate is active.

        Returns True if there appears to be mergestate. This is a rough proxy
        for "is a merge in progress."
        (tboolRNRLRBRYtexistsR�R�(RG((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytactive�scC@s2|jr.|j�}|j|�t|_ndS(s*Write current state on disk (if necessary)N(RDt_makerecordst
_writerecordsRC(RGRn((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytcommit�s	
cC@s
g}|jtt|j�f�|jtt|j�f�|jrr|jtdj|j|j	g�f�nx�|j
j�D]�\}}|dtkr�|jt
dj|g|�f�q�|dttfkr|jtdj|g|�f�q�|dtks |dtkrF|jtdj|g|�f�q�|jtdj|g|�f�q�Wx_t|jj��D]H\}}djd�|j�D��}|jtd||ff�q�W|jdk	rdj|j�}|jt|f�n|S(Nsiiics@s%|]\}}d||fVqdS(s%s%sN((t.0R5tv((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pys	<genexpr>�ss%s%s(R|R_RRNR`RORSRaRRURLt	iteritemstMERGE_RECORD_DRIVER_RESOLVEDRgtMERGE_RECORD_UNRESOLVED_PATHtMERGE_RECORD_RESOLVED_PATHRfRReRdtsortedRMRhRFRERi(RGRnRrR�RuRsR=((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyR��s8		
	 		"	cC@s|j|�|j|�dS(s,Write current state on disk (both v1 and v2)N(t_writerecordsv1t_writerecordsv2(RGRn((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyR��s
cC@s�|jj|jd�}t|�}t|�}|dtksFt�|jt|j	�d�x:|D]2\}}|t
krg|jdt|��qgqgW|j�dS(s/Write current state on disk in a version 1 filetwbis
s%s
N(
RBRYR�titertnextR_tAssertionErrortwriteRRNRdRR�(RGRnR!tirecordstlrecordsRoR((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyR��scC@s�tttf}|jj|jd�}x�|D]|\}}t|�dksRt�||krxtd||f}}ndt|�}|j	t
||t|�|��q.W|j�dS(sqWrite current state on disk in a version 2 file

        See the docstring for _readrecordsv2 for why we use 't'.R�is%s%ss>sI%isN(R_R`RdRBRYR�RbR�R�R�t_packR�(RGRnt	allowlistR!tkeyRtformat((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyR��s&cC@s�|j�rt}nAttj|j��j��}|jjj	d||j
��t||j�|j�t|j��|j�t|j��|j
�g|j|<it|j��d6|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/tancestorlinknodeN(tisabsentRRthashlibtsha1tpathtdigestRBRYR�RtMERGE_RECORD_UNRESOLVEDtfilenodetflagsRLR;RMRZRD(RGtfcltfcotfcatfdthash((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyRk�s		!  cC@s#t||g|j|<t|_dS(s�add a new conflicting path to the merge state
        path:    the path that conflicts
        frename: the filename the conflicting file was renamed to
        forigin: origin of the file ('l' or 'r' for local/remote)
        N(R�RLRZRD(RGR�tfrenametforigin((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytaddpath�scC@s
||jkS(N(RL(RGtdfile((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt__contains__�scC@s|j|dS(Ni(RL(RGR�((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt__getitem__scC@stt|j��S(N(R�R�RL(RG((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt__iter__scC@s
|jj�S(N(RLtkeys(RG((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytfilesscC@s||j|d<t|_dS(Ni(RLRZRD(RGR�tstate((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytmarkscC@s|jS(N(RU(RG((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyRqscc@sBx;|jj�D]*\}}|dttfkr|VqqWdS(s%Obtain the paths of unresolved files.iN(RLR�R�R�(RGR!tentry((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt
unresolveds
cc@s<x5|jj�D]$\}}|dtkr|VqqWdS(s*Obtain the paths of driver-resolved files.iN(RLtitemsR�(RGR!R�((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytdriverresolvedscC@s|jj|i�S(N(RMt
setdefault(RGRr((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyRu!sc
C@s4||ttfkr tdfS|j|}|\}}}}}	}
}}|j|j}
|j|�}|jd�}|r�|j|}nd}|j	|||�}|j	||
|
�}|jj
|d|	d|�}|j�}|j�}d|||kr|d|||kr||j�t
krd||krd|ry|jjjtd�|�qyq|||kr||}q|n|r|tkr�|jjd|�}||j|j�|�|j�n||jd	t�tj|j||j||||d
|j�\}}}n9tj|j||j||||d
|j�\}}}|dkr�|j|=|jj|d�t|_n|s�|j|t�n|r*d}|r�|j�r�t }qt!}nB|j�r�t"}n-|j�r||j#krt$}qt%}n||f|j&|<n||fS(s)rerun merge process for file path `dfile`iR�tfileidt	changectxR%R"sQwarning: cannot merge flags for %s without common ancestor - keeping local flags
smerge/t
ignoremissingR=N('tMERGE_RECORD_RESOLVEDR�RZRLRBRORutgetREt_filectxorabsenttfilectxR�R;RR�twarnRRRYR�RAR�tremoveR
tpremergeRNRFRMtpopRDR�R�t
ACTION_FORGETt
ACTION_REMOVEt
ACTION_GETRItACTION_ADD_MODIFIEDt
ACTION_ADDR[(RGt
preresolveR�twctxt
stateentryR�R�tlfiletafiletanodetofiletonodeR�toctxRut
anccommitnodetactxtfcdR�R�tflotflaR!tcompleteR(tdeletedtaction((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt_resolve$st


(	
		
					cC@s(|tkrtj||�S||SdS(N(RR
t
absentfilectx(RGthexnodetctxR!((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyR�rscC@s|jt||�S(sarun premerge process for dfile

        Returns whether the merge is complete, and the exit code.(R�RZ(RGR�R�((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyR�xscC@s|jt||�dS(sdrun merge process (assuming premerge was run) for dfile

        Returns the exit code of the merge.i(R�RC(RGR�R�((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytresolve~scC@s�d\}}}xh|jj�D]W\}}|dkrD|d7}q|dkr|tkri|d7}qv|d7}qqW|||fS(sKreturn counts for updated, merged and removed files in this
        sessionii(iiiN(R[t
itervaluesRER�(RGtupdatedtmergedtremovedR(R�((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytcounts�s

cC@stt|j���S(s0get unresolved count for this merge (persistent)(RbtlistR�(RG((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytunresolvedcount�scC@s|igt6gt6gt6gt6gt6}xL|jj�D];\}\}}|dk	r9||j|ddf�q9q9W|S(s2return lists of actions to perform on the dirstatesmerge resultN(	R�R�R�R�R�R[R�RER|(RGtactionsR!R(R�((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyR��s
"!cC@s5|jjj�tk}t|j|j�|�dS(s-record remove/add/get actions in the dirstateN(RBtdirstatetp2Rt
recordupdatesR�(RGtbranchmerge((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt
recordactions�scC@sdtf|j|<dS(s]queues a file to be removed from the dirstate

        Meant for use by custom merge drivers.iN(R�R[(RGR!((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytqueueremove�scC@sdtf|j|<dS(sYqueues a file to be added to the dirstate

        Meant for use by custom merge drivers.iN(R�R[(RGR!((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytqueueadd�scC@sdtf|j|<dS(scqueues a file to be marked modified in the dirstate

        Meant for use by custom merge drivers.iN(R�R[(RGR!((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytqueueget�sN(1t__name__t
__module__t__doc__R�R�tstaticmethodRER?RARHR9R@R^RzRxRyRt
propertycacheRSRIRJR�R�R�R�R�R�RkR�R�R�R�R�R�RqR�R�RuR�R�R�R�R�R�R�RRRR(((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyR8\sX-		:	"			(			,																N									cC@s�|jj||�}dddg}||kr�djg|D]}d|d^q=�}tjtd�||||f��n|S(NtaborttignoreR�s, t's$%s.%s not valid ('%s' is none of %s)(R�R�RRR�R(R:tsectiontnameR�tvalidR�tvalidstr((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt_getcheckunknownconfig�s*cC@s||j�rtS|dkr%|}n|jjj|�o{|jj|�o{|jj|�|jko{||j	||�S(N(
t
isinmemoryRCREtwvfstaudittchecktisfileorlinkR�t	normalizetcmp(R:R�R�R!tf2((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt_checkunknownfile�s	t_unknowndirscheckercB@s eZdZd�Zd�ZRS(sy
    Look for any unknown files or directories that may have a path conflict
    with a file.  If any path prefix of the file exists as a file or link,
    then it conflicts.  If the file itself is a directory that contains any
    file that is not tracked, then it conflicts.

    Returns the shortest path at which a conflict occurs, or None if there is
    no conflict.
    cC@st�|_t�|_dS(N(R]t_unknowndircachet_missingdircache(RG((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyRH�sc	C@s�|j�rtSx�tttj|���D]�}||jkrEdS||jkrZq,n|jj	j
|�r,|jj|�r�|jj
|�|jkr�|S|jj|�s�|jj|�dS|jj|�q,q,W|jj	j
|�r�|jj|�r�x�|jj|�D]i\}}}xW|D]O}tj|jj||��}|jj
|dt�}||jkr-|Sq-WqWndS(Ntisknown(RRCtreversedR�RtfinddirsRRRRRRR�RtlexistsRktisdirtwalktpconverttreljoinRZRE(	RGR:R�R!R.tdirsR�tfntrelf((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt__call__�s."'"
(RRR	RHR+(((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyR�s		c@sxt�}t��t��t��t|dd�}t|dd�}|jjdd�}	|s���fd�}
t�}x�|j�D]�\}\}
}}|
ttfkrt||||�r�|j	|�qX|	rX||krX||||�}|dk	r�j	|�qqXq�|
tkr�t|||||d�rX|j	|�qXq�q�W|�B}tg|D]}|jj
|�rp|^qp�}||}|
||�|
||�n!x|j�D]\}\}
}}|
tkr�|\}}t||||�}|jj
|�r(|}n|}|sPt|tfdf||<q�|sb|d	kr�t||dt|fd
f||<q�|d	kr��j	|�q�|dkr��j	|�nt|tfdf||<q�q�Wx�t��D]r}|jj}|�krJ|jj|�r3|td�|�q^|td
�|�q�|td�|�q�W�r�tjtd���nx]t��D]O}|jj|�r�|jjtd�|�q�|jjtd�|�q�Wx�|j�D]�\}\}
}}|
tkr�||kpH|�kpHt�fd�tj|�D��}|\}t||f|f||<q�q�WdS(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.
    RKtcheckunknowntcheckignoredR�smerge.checkpathconflictsc@s<|dkr�j|�n|dkr8�j|�ndS(NRR�(tupdate(t	conflictsR�(tabortconflictst
warnconflicts(s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytcollectconflictssisremote createdRs#remote differs from untracked localR�s,%s: untracked file conflicts with directory
s,%s: untracked directory conflicts with file
s%s: untracked file differs
sLuntracked files in working directory differ from files in requested revisions%s: replacing untracked file
s+%s: replacing untracked files in directory
c3@s|]}|�kVqdS(N((R�R.(t
pathconflicts(s5/usr/lib64/python2.7/site-packages/mercurial/merge.pys	<genexpr>hsN(R]RR�t
configboolRR�tACTION_CREATEDtACTION_DELETED_CHANGEDRRkREtACTION_LOCAL_DIR_RENAME_GETR�t_ignoretACTION_CREATED_MERGER�RCtACTION_MERGERZR�R�RRRRtAborttanyRR"(R:R�R�tforceR�t
mergeforcet
fileconflictst
unknownconfigt
ignoredconfigt
pathconfigR2tcheckunknowndirsR!R targsR�R�tallconflictsR0tignoredconflictstunknownconflictstfl2tanct	differentR�R�tbackupR�((R0R3R1s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt_checkunknownfiles	s~					"
!

"	 "%	cC@s�i}t}|rt}nx6|j�D](}||kr(|ddf||<q(q(W|s�x9|j�D](}||krgtddf||<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.
    sforget deletedsforget removedN(R�R�R�RER�(R�R�RR�R R!((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt_forgetremovedls	cC@s�|j�}|j�s�|j|�}|r�i}xg|j�D]Y\}}g||<x@|D]8\}}}	||�r]||j|||	f�q]q]Wq@W|}q�nt|�}
|r�xKtttt	t
tfD]1}x(||D]\}}}	|
j|�q�Wq�Wx(|t
D]\}}}	|
j|�qWxA|tD]5\}}}	|\}}|
j|�|
j|�q?Wx(|tD]\}}}	|
j|�q�WxV|tD]G\}}}	|\}
}}}}|r�|
j|
�n|
j|�q�Wni}xY|
D]Q}tj|�}||krPtjtd�|||f��n|||<q	Wd}}}x{t|j��D]g\}}|j|�r�|j|�r�tjtd�||f��n|d}|d}|}qWdS(s,
    Check for case-folding collisions.
    s(case-folding collision between %s and %sRws5case-folding collision between %s and directory of %st/N(tnarrowmatchtalwaystmatchesR�R|R]R�R�R�R�tACTION_CHANGED_DELETEDR6RkR�tdiscardtACTION_DIR_RENAME_MOVE_LOCALR7R:RtnormcaseRR;RR�R�t
startswith(R:twmfR�ROt
narrowactionsR tactionsfortypeR!RDR�tpmmfRR�tf1tfatmoveRItfoldmaptfoldt
foldprefixtunfoldprefixtlastfull((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt_checkcollision�sZ
%



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

    This is currently not implemented -- it's an extension point.(RZ(R:R>R�R=((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytdriverpreprocess�scC@stS(strun the conclude step of the merge driver, if any

    This is currently not implemented -- it's an extension point.(RZ(R:R>R�R=((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytdriverconclude�scc@sJxC|D];}x2tj|�D]!}||kr||fVPqqWqWdS(s�
    Generator that yields pairs of all the files in the manifest that are found
    inside the directories listed in dirs, and which directory they are found
    in.
    N(RR"(R:tmanifestR(R!R.((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt_filesindirs�s

cC@s�|j�}t�}t�}t�}t�}t�}	x�|j�D]�\}
\}}}
|ttttfkr�|jtj	|
��|j
|
�r�|j|
�q�n|tkr�|	j|
�n|tkr|\}}}}}|r|	j|�qn|t
krF|\}}|	j|�qFqFWx�|D]z}||krr||krb|j|�qr|j|�n||kr4||dttttfkr4|j|�q4q4Wx�|D]}}||	kr�t|�jd�}tj|||t|j���}t|fdf||<t|dfdf||<q�q�W|r3t|�jd�}x�t|||�D]�\}
}|
|	krh||\}}}
tj|||t|j���}|ttfkr�|||
f||<n#|d}t||fdf||<t|tfdf||<|j|�PqhqhWn|r|x(|D] }|jjtd�|�q@Wtjtd���nd	S(
s�
    Check if any actions introduce path conflicts in the repository, updating
    actions to record or handle the path conflict accordingly.
    it+slocal path conflictR"s
path conflictsremote path conflicts#%s: is both a file and a directory
s,destination manifest contains path conflictsN(RfR]R�R5R6R:R9R.RR"thasdirRkR�RTtbytestrstriptsafenameR�tACTION_PATH_CONFLICT_RESOLVEtACTION_PATH_CONFLICTRgR7R�R�R�RRR;(R:R�R�R�tmftlocalconflictstremoteconflictstinvalidconflictstcreatedfiledirstdeletedfilesR!R RDR�R[RR\R]RIR�R.tctxnametpnewtfl((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytcheckpathconflicts�st					"

$	
$




cC@s�tdg�}tdj��}x�t|j��D]�\}}||�rOq4|s_||=q4|d|kry||=q4|d|kr�tjtd�|dtd���q4tjtd�|��q4WdS(	s�
    Filters out actions that can ignored because the repo is narrowed.

    Raise an exception if the merge cannot be completed because the repo is
    narrowed.
    R5sa am c cm f g r eisBmerge affects file '%s' outside narrow, which is not yet supportedR�s'merging in the other direction may works-conflict in file '%s' is outside narrow cloneN(R]RR�R�RR;R(RORR�t	nooptypestnonconflicttypesR!R�((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt_filternarrowactionsEs

c
,@s�|d"k	r!|j�r!d"}niiiiif\}
}}}
}gt�j�||gdtj�D]}|j�^qk|r�tj|�||�}|\}
}}}
}nt	j
t|��}t	j
t|��}t	j
t|��}|jj
td��|jjd|||f�|jjd|�|f��j�|j�|j�}}}t|
j��}|j|j��d|kr��j�d"kr�t�fd��jD��r�t|d<q�n|�|g�j�kr�|	r�t|j|�j��}x6|
j�D](\}}||kr)|j|�q)q)Wx|D]}|j|�q\Wtj||�}tj||�}n|j|d|�}|d"kr�tjdd�}ni}x�|j�D]�\}\\} }!\}"}#| r�|"r�||kr�|
j|d"�}$|$d"k	rft|||$t |j!�fd	|$f||<q�t||d"t |j!�fd
f||<q�||}%|j"|�}&d|!|#|&k}'|"|%kr�|#|&kr�t#d#df||<q�| |%krE|!|&krE| |"kr)t$|#fd
f||<q�t%|#t fdf||<q�|'rp|"|%krpt$|#fd
f||<q�|'r�| |%kr�t%|!t fdf||<q�t|||t |j!�fdf||<q�| r.||kr�q�||krK||}(|(|kr+t||(d"t&|j!�fdf||(<q+t'||!fd|f||(<q�||
kr�|
|}(t||(|(t |j!�fd|(f||<q�||kr�| ||kr�|r�t(d"df||<q(t)|d"|t |j!�fdf||<q+| t*krt+d"df||<q+t(d"df||<q�q�|"r�||krCq�||kr�||}(|(|kr�t|(|d"t |j!�fdf||(<qt,||#fd|f||(<q�||
kr0|
|}(|(|krt|(||(t |j!�fd|(f||<qt|(||(t&|j!�fd|(f||<q�||kr�|s[t-|#fdf||<q|szt-|#fdf||<qt.|#|j!�fdf||<q�|"||kr�d"})x9|D]1}*|j/|*�r�||*|t0|*�})Pq�q�W|)d"k	r5|)|kr5t|)||t |j!�fd|f||)<q|rTt-|#fdf||<qt1d"||t |j!�fdf||<q�q�q�W|jj2d d!�r�t3|�||�n|j4�}+|+j�s�t5|+||�n|||
fS($s�
    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
    R�sresolving manifests
s) branchmerge: %s, force: %s, partial: %s
s% ancestor: %s, local: %s, remote: %s
s.hgsubstatec3@s$|]}�j|�j�VqdS(N(tsubtdirty(R�R'(R�(s5/usr/lib64/python2.7/site-packages/mercurial/merge.pys	<genexpr>�sRRwsboth renamed from %ssboth createdR"sremote unchangedsupdate permissionssremote is newersversions differs%remote directory rename, both createds&remote directory rename - move from %sslocal copied/moved from %ss
remote deletesprompt changed/deletedsremote deleteds
other deleteds$local directory rename, both createds$local directory rename - get from %ssremote copied from %ssremote moved from %ssremote createdsremote created, get or merges-local directory rename - respect move from %ssremote recreatingsprompt deleted/changedR�smerge.checkpathconflictsN((6RERPR�R{RtintrevRfR
tmergecopiesRtbytestrR�R�tnoteRtdebugR]tvaluesR.trevR<tsubstateRtdiffR�R�Rkt
matchfilestmatchmodtintersectmatchersR�R:RCR;R�tACTION_KEEPtACTION_EXECR�RZRTR�RRRR�R7R5R9RVRbR6R4RxROR{(,R:R�RtpaRR=tmatchertacceptremotetfollowcopiest
forcefulldifftcopytmovewithdirtdivergetrenamedeletetdirmoveR%trettboolbmtboolftboolmtm1tm2tmatcopiedt
relevantfilestcopykeyt	copyvaluet
movedirkeytfilesmatcherR�R�R!tn1tfl1tn2RHR\R,R�tnolRtdfR+RO((R�s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt
manifestmerge`s		$9&#
+





c	C@s�x�t|j��D]�\}\}}}|tkrn||krn||j||�rntddf||<q|tkr||kr||j||�r||=qqWdS(s[Resolves false conflicts where the nodeid changed but the content
       remained the same.sprompt sameN(R�R�RRRR�RER6(	R:R�R�tancestorR�R!R RDR�((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt_resolvetrivial!s(c
 
@s�ddlm}
t|�dkrot||||d|||||�	\}}}
t||||||	�n�|jjtd�||td�jd�|D��f�i}d\}}
xw|D]o}|jjtd�|�t|||||||||dt
�	\}}}t||||||	�|dksTt|�t|�kr]|}n|
dks�t|
�t|�kr�|}
nx�t|j��D]�\}}|\}}}|jj
d	|||f�||kr||}||kr||j|�q/|g||<q�i|g|6||<q�Wq�W|jjtd
��i}g}xDt|j��D]0\}}t|�dkrt|j��d\}�t�fd��dD��r|jjtd�||f��d||<|tkrl|j|�qlqlqnt|krW|jjtd
�|�|td||<qlnt|kr�|td�t�fd�|tdD��r�|jjtd�|��||<qlq�n|jjtd�|�xTt|j��D]@\}�x1�D])\}}}|jjd||f�qWq�Wt|j��d\}�|jjtd�||f��d||<|tkrl|j|�qlqlqlWxi|D]a}||\}\}}}|tks�t|��||kr�||dtkr�||=q�q�W|jjtd��|j�dkrVt|||�}|j|�n|
j|||||�}t||||d|�|||
fS(sDCalculate the actions needed to merge mctx into wctx using ancestorsi(tsparseis5note: merging %s and %s using bids from ancestors %s
s and cs@s|]}tj|�VqdS(N(RR�(R�RI((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pys	<genexpr>@ss"
calculating bids for ancestor %s
R�s %s: %s -> %s
s 
auction for merging merge bids
c3@s|]}|�dkVqdS(iN((R�R,(R"(s5/usr/lib64/python2.7/site-packages/mercurial/merge.pys	<genexpr>iss %s: consensus for %s
s %s: picking 'keep' action
c3@s|]}|�kVqdS(N((R�R,(tga0(s5/usr/lib64/python2.7/site-packages/mercurial/merge.pys	<genexpr>wss %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(RwR�RbR�RLR�R�RRRERZR�R�R�R|R�R�tallRTR�R�R�R�R�R�RMR.tfilterupdatesactionsR�( R:R�R�t	ancestorsRR=R�R�R�R>R�R�R�R�tfbidsR�tdiverge1t
renamedelete1R!R,R RDR�R+tdmstbidst_fR4tf0R�t	fractionst
prunedactions((R�R"s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytcalculateupdates0s�		
$	$	
  	$
	"
 	cC@sAytj�SWn,tk
r<}|jtjkr6dS�nXdS(N(RtgetcwdtOSErrorR�R�RE(R�((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt_getcwd�sc
c@sI|jj}t�}d}x�|D]�\}}}|jjd||f�|rn|jjtd�|�n||j�y||jdt�Wn6t	k
r�}	|jj
td�||	jf�nX|dkr�||fVd}n|d7}q"W|dkr||fVn|rEt�rE|jj
td�|j�nd	S(
sSapply removes to the working directory

    yields tuples for progress updates
    is
 %s: %s -> r
sremoving %s
R�s update failed to remove %s: %s!
idisCcurrent directory was removed
(consider changing to repo root: %s)
N(
R�tverboseR�R�R�RRR�RZR�R�tstrerrortroot(
R:R�R�R�tcwdRvR!RDR�tinst((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytbatchremove�s,		cc@s�|jj}|j}|j}d}|jj|dt|���~xv|D]n\}\}	}
}|jjd||f�|r�|jjtd�|�n|
rB|j	|�}|jj
|�sx?tj|�D]+}
|jj
|
�r�|j	|
�}Pq�q�Wntj|||�}|jj
|�rBtj||�qBn||j�|jdd�}||j||�j�|	dtd|�|d	kr�||fVd}n|d
7}qJWWdQX|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
R�supdate.atomic-filetbackgroundcloset
atomictempidiN(R�R�R�RtbackgroundclosingRbR�R�RtwjoinR#RR"RRtorigpathtrenametclearunknownR4R�RRZ(R:R�R�R�R�tfctxR�RvR!R�RKR�tabsfR.torigR�((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytbatchget�s:		%	cC@s�gttttfD]}||^q}tj}tj}|||j�g||g|D]"}|D]\}}	}
|^qdqZ��dS(s�Invoke ``scmutil.prefetchfiles()`` for the files relevant to the dict
    of merge actions.  ``ctx`` is the context being merged in.N(R�R6R7R:Rt
prefetchfilesR�R�(R:R�R�R,toplisttprefetchR�tsublistR!RDR�((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt_prefetchfiles�s	 		tfrozentupdateresultcB@sAeZej�Zej�Zej�Zej�Zd�ZRS(cC@s&|jo%|jo%|jo%|jS(N(tupdatedcounttmergedcounttremovedcountR�(RG((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytisemptys(	RRR	tibR�R�R�R�R�(((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyR��s
c5C@s�t|||�d)\}}}tj||j�j�|j�|�}	g}
x$|j�D]\}}|j�q\Wt|t�}
|
j	t|t
��|
j	|t�x|
D]\}}}|\}}}}}|dkr�q�n|d&krt
j||�}n$|jjd||f�||}|d&krQt
j||�}n
||}||}||kr~||}n|j|dt�}|	j||||�||kr�|r�|
j|�q�q�WxQ|
D]I}||j�r�|jjd|�||j�||j�q�q�Wtd�|j�D��}|jjtd�dtd	�d
|�}g|tD]}|ddkrt|^qtr�tj||||||�nx�|tD]�\}}}|\}}|jj}|td�|�|dkr|td
�|�n|td�|�|td�|�|	j |||�|j!d|�q�W|j"�rdnd}t#j#|j|t$||f|t�} x*| D]"\}!}"|j!d|!d|"�q�Wt%|t�}x�|t&D]�\}}}|jjd||f�|\}#||#j�r�|jj'td�|#|f�||j�||j(|j|#�j)�|j|#�j*��||#j�n|j!d|�q�W|jj+dd�}$t#j#|j|t,|||f|t-d|$�} x*| D]"\}!}"|j!d|!d|"�q	Wt%|t-�}g|t-D]}|ddkrJ|^qJr�tj||||||�nxE|t.D]9\}}}|jjd||f�|j!d|�q�WxE|t/D]9\}}}|jjd||f�|j!d|�q�WxE|t0D]9\}}}|jjd||f�|j!d|�q&Wx5|t1D])\}}}|jjd||f�qnWx�|t2D]�\}}}|jjd||f�|j!d|�|\}#}%|jj'td�|#|f�||j�||j(|j|#�j)�|%�||#j�|d7}q�Wx�|t3D]�\}}}|jjd||f�|j!d|�|\}#}%|jj'td�|#|f�||j(|j|#�j)�|%�|d7}qcWx�|t4D]z\}}}|jjd ||f�|j!d|�|\}%||j�||j5d|%kd!|%k�|d7}qW|o�|
o�|	j6}&|&rf	|j"�r�t7j8d"��n|	j9�t:||	|d#|�}'t;|	j<��}(|'s	t=|||t>t%|(�d��Sg})x<|
D]4\}}}||(kr%	|)j|||f�q%	q%	W|)}
nz.g}*x�|
D]�\}}}|jjd$||f�|j!d|�|dkr�	tj||||j?|�||�qv	n||j�|	j@||�\}+},|+sv	|d7}|*j|||f�qv	qv	WxW|*D]O\}}}|jjd%||f�|j!d|d
|�|	jA||�q@
WWd&|	j9�X|	jB�}-|&r|-r|	jC�tDkrtE||	|d#|�s�
t>|-d�}-n|	j9�n|	jF�\}.}/}0||.7}||/7}||07}|	jG�}1|1r�t;d'�|tD��}2xB|1jH�D]4\}3}4||3j	|4�|2jId(�|4D��qpWg|tD]}|d|2kr�|^q�|t<n|jJ�t=||||-�S(*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.
    is.hgsubstates! preserving %s for resolve of %s
R�sremoving %s
cs@s-|]#\}}|tkrt|�VqdS(N(R�Rb(R�R R"((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pys	<genexpr><s	tupdatingtunitR�ttotalsD%s: path conflict - a file or link has the same name as a directory
R"s&the local file has been renamed to %s
s'the remote file has been renamed to %s
s1resolve manually then use 'hg resolve --mark %s'
titemg����MbP?tsteps %s: %s -> pr
smoving %s to %s
R�sworker.wdir-get-thread-safet
threadsafes
 %s: %s -> f
s
 %s: %s -> a
s %s: %s -> am
s
 %s: %s -> k
s %s: %s -> dm
is %s: %s -> dg
sgetting %s to %s
s
 %s: %s -> e
R%s,in-memory merge does not support mergedriverR=s %s: %s -> m (premerge)
s %s: %s -> m (merge)
Ncs@s|]}|dVqdS(iN((R�R,((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pys	<genexpr>�scs@s|]}|dVqdS(iN((R�R,((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pys	<genexpr>�s(iii(KR�R8R?tp1R;R�tsortR�RRtextendR6R:RER
R�R�R�R�RRkR|R#RR�tsumtmakeprogressRR�RtsubmergeRntstatusR�t	incrementRRR�RbRmR�R�RR�R4R�R�R�R�R�R�RTR7R�tsetflagsRSRtInMemoryMergeConflictsErrorR�RdR]R�R�tmaxR�R�R�R�RqRTReR�R�R�tdifference_updateR�(5R:R�R�R�t	overwriteR=R�R�R�R>tmovesR R"tmergeactionsR!RDR�R[RR\R]RIR�R�R�R�t
numupdatestprogressR,tfoR'tcosttprogRvR�R�R�R�tusemergedrivertproceedtunresolvedft
newactionst
tocompleteR�R(R�t	msupdatedtmsmergedt	msremovedtextraactionstmfilesR5tacts((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytapplyupdatessB
*




!	-
	 2	
	- # #	 
	






#
cC@s7xL|jtg�D]8\}}}|r;|jj|�q|jj|�qWx3|jtg�D]\}}}|jj|�qbWx�|jtg�D]�\}}}|\}|jj|�p�|}|jj|�|jj	||�||kr
|jj|�q�|jj|�q�Wx3|jt
g�D]\}}}|jj|�q1WxL|jtg�D]8\}}}|r�|jj|�qg|jj|�qgWx3|jt
g�D]\}}}|jj|�q�Wx#|jtg�D]\}}}q�WxL|jtg�D]8\}}}|r:|jj|�q|jj|�qWx�|jtg�D]�\}}}|\}}	}
}}|r�|jj|�||	kr3|r�|jj|�n||kr�|jj	||�q�|jj	|	|�q3qa|	|kr|jj|�n|ra|jj|�qaqaWx�|jtg�D]w\}}}|\}}
|r�|jj|�|jj|�|jj	||�qJ|jj|�|jj|�qJWxk|jtg�D]W\}}}|\}}
|r|jj|�|jj	||�q�|jj|�q�WdS(s$record merge actions to the dirstateN(R�R�R�R�tdropR�RmR�RkR�R�R�tnormallookupR�R�R�totherparenttnormalR:RKRTR7(R:R�RR!RDR�R�torigf0R[RR\R]RItflag((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyRsp"""	""""""""c3C@s�
ddlm}|d7k	s"t�|rZ|rZ|	d7krEd}	n|	d8ksZt�n|d7ksr|j�r{t}nt}|j���	|
d7kr�|d7}
n|
j�}
|
d}d7g}|d7k	r�||g}n|o�|}||}|dd7kr�|j	j
dd�d	gkrw|jj|j
�|j
��}gt|�p]tgD]}||^q^}q�|j|d
|�g}n|j
�|j
�t|�t|�f\}}}}|s4t|
�dkr�tjtd���ntj|�}t|j��r4tjtd���q4n|r8||gkratjtd
���nU||gkr�|r�|
j�|j�kr�tjtd�dtd���q�n|r�|
j�s�|
j�r�tjtd�dtd���n|
j�sAx-t|
j�D]}|
j|�j �qWqAn	|sA||kr�|j!ddtd|dd�|j!dd|dddd�t"dddd�S|	dkrA||g|gfkrA|
j#dt�}|r>t$j%||j
�g�}||j
�|krq;td�}td�}tj&|d|��q>qAn|rS|
g}n|se|g}n|j	j'dd�}|r�t}n|ds�t}n|r�|
j#dt�r�t}nt(||
||||||d|d|�\}} }!|	dkruxq|j)�D]`\}"\}#}$}|#t*t+t,t-t.fkrtd�}td�}tj|d|��qqWnd |kr�d }"||"\}#}$}t/j0|�}%|"|%d!<|#t1kr,|j	j2td"�|%d�r�t-d7d#f||"<q�|"|krt3d7d$f||"<q�t4d7d$f||"<q�|#t5kr�|$\}&}'}(})}||'j6�}*|j	j2td%�|%d�dkr�t*|*tfd&f||"<q�||"=q�nt7d'�t4t3t8t*t1t5t-t9t:t;t,t+t<t.fD��}+xV|j)�D]H\}"\}#}$}|#|+kr&g|+|#<n|+|#j=|"|$|f�q�Wt>j?|j@�s�|r�|s||
j#dtd(t�r�tA||jB�d7�q�tA||
jB�|+�nx_t| j)��D]K\}"},|j	jCtd)�|"�x"|,D]}-|j	jCd*|-�q�Wq�Wx_t|!j)��D]K\}"},|j	jCtd+�|"�x"|,D]}-|j	jCd*|-�qPWq#W|s�|t|df\}}}}n|r�|
j�r�|j!ddtd|d|�|jDjEd,|jF��n|j	j'd-d.�}.|j	jGd-d/�}/y<dd0lmH}0|0jId-�|j	jJd-d1�d2k}1WntKk
rg	t}1nX|.r�	|1r�	|j
�tkr�	t|+t*�|/kr�	tLjMjNd9�r�	|j	jCtd5��ntO||+|
||d6|�}2|rk
|
j�rk
|jPjQ��]|jR||�tS||+|�t>jT|jDjUd,��|sb
|jPjV|j��nWd7QXnWd7QX|s�
|jW|�n|s�
|j!dd|d|d|2jX�n|2S(:s�	
    Perform a merge between the working directory and the given node

    node = the node to update to
    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/--check and -C/--clean 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 or not). Match from top first. The -n
    option doesn't exist on the command line, but represents the
    experimental.updatecheck=noconflict option.

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

    -c  -C  -n  -m  dirty  rev  linear  |  result
     y   y   *   *    *     *     *     |    (1)
     y   *   y   *    *     *     *     |    (1)
     y   *   *   y    *     *     *     |    (1)
     *   y   y   *    *     *     *     |    (1)
     *   y   *   y    *     *     *     |    (1)
     *   *   y   y    *     *     *     |    (1)
     *   *   *   *    *     n     n     |     x
     *   *   *   *    n     *     *     |    ok
     n   n   n   n    y     *     y     |   merge
     n   n   n   n    y     y     n     |    (2)
     n   n   n   y    y     *     *     |   merge
     n   n   y   n    y     *     *     |  merge if no conflict
     n   y   n   n    y     *     *     |  discard
     y   n   n   n    y     *     *     |    (3)

    x = can't happen
    * = don't-care
    1 = incompatible options (checked in commands.py)
    2 = abort: uncommitted changes (commit or update --clean to discard changes)
    3 = abort: uncommitted changes (checked in commands.py)

    The merge is performed inside ``wc``, a workingctx-like objects. It defaults
    to repo[None] if None is passed.

    Return the same tuple as applyupdates().
    i(R�tlineartnonet
noconflictiRKtpreferancestort*R�soutstanding uncommitted mergesoutstanding merge conflictss7merging with a working directory ancestor has no effectsnothing to mergeR�s#use 'hg update' or check 'hg heads'suncommitted changessuse 'hg status' to list changest	preupdatetthrowtparent1tparent2RwR.Rtmissings+commit or update --clean to discard changesR�R�R>sconflicting changess.hgsubstateR!sjlocal%(l)s changed %(f)s which other%(o)s deleted
use (c)hanged version or (d)elete?$$ &Changed $$ &Deletes
prompt deletesprompt keepsrother%(o)s changed %(f)s which local%(l)s deleted
use (c)hanged version or leave (d)eleted?$$ &Changed $$ &Deletedsprompt recreatingcs@s|]}|gfVqdS(N((R�R ((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pys	<genexpr>-stbranchs<note: possible conflict - %s was renamed multiple times to:
s %s
s9note: possible conflict - %s was deleted and renamed to:
tupdatestatet	fsmonitortwarn_when_unusedtwarn_update_file_count(t
extensionstmodeR�tlinuxtdarwins�(warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor")
R=N(RRR	(RR(YRwR�RER�RPRCRZtwlockR{R�t
configlistt	changelogtcommonancestorsheadsR;R�RR�RjRbRR;RR8RAR�R�RR�R�RR�R|t
bailifchangedthookR�R}Rt
foregroundtUpdateAbortR4R�R�R�R�R�R�RmR
t
partextrasRRtpromptchoiceR�R�R6R�tdictR�RTR7R:RnR|RtfscasesensitiveR�RcRfR�RYR�Rt	configintRtfindR�tKeyErrorRtsysplatformRVRR�tparentchanget
setparentsRtunlinkRt	setbranchtprunetemporaryincludesR�(3R:R;RR=R�t
mergeancestorR=R�R>tupdatechecktwcR�tpartialtplR�tpasR�RtcahsRItfp1tfp2txp1txp2R>R'R}R R�R�R�tactionbyfileR�R�R!R RDtpromptsR[RR\R]R�R�RwtnftfsmonitorwarningtfsmonitorthresholdRtfsmonitorenabledtstats((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyR.csX8		


	

!/6	
		"
		
		
	"


!	


	(
c

C@s9|jj|dj�|j��}t||j�tt|j�d|d|�}|rs|jrs|j�}nVt}|j�}	|r�t|	�dkr�||	kr�|	j	|�|	dj�}n|j
j��[|j|dj�|�|j
j
|j��tj||d|j�|j��WdQX|S(s5Do 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
    keepparent - if unresolved, keep parent used for the merge

    t.R/R=iiN(Rt
isancestorR;R.RZR�RR{RbR�R�R*R+R�tcurrenttransactionR
tduplicatecopiesRER�(
R:R�tpctxR=t
keepparenttkeepconflictparentR/R@tpotherR{((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytgraft�s%!$
,c@s���fd�}|j}|j}	g}
z@|rOg}|j|_|_n�jd|d|dt�}|r�xdt|j|j�D]I}
|s��jj	t
d�|
�|�jj|
�n|
j|
�q�Wn|rex�t|dt�D]k}
||
�r��jj
|
�r�|sN�jj	t
d�|
�|�jj|
�n|
j|
�q�q�Wn|
SWd||_|	|_XdS(	s�Purge the working directory of untracked files.

    ``matcher`` is a matcher configured to scan the working directory -
    potentially a subset.

    ``ignored`` controls whether ignored files should also be purged.

    ``removeemptydirs`` controls whether empty directories should be removed.

    ``removefiles`` controls whether files are removed.

    ``abortonerror`` causes an exception to be raised if an error occurs
    deleting a file or directory.

    ``noop`` controls whether to actually remove files. If not defined, actions
    will be taken.

    Returns an iterable of relative paths in the working directory that were
    or would be removed.
    c@shy||�WnStk
rctd�|}�rFtj|��qd�jjtd�|�nXdS(Ns%s cannot be removedswarning: %s
(R�RRR;R�R�(tremovefnR�R (tabortonerrorR:(s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyR��s
Rtignoredtunknownsremoving file %s
treversesremoving directory %s
N(texplicitdirttraversedirR|R�RZR�RMRLR�R�RRR,tlistdirtrmdir(R:R�RLtremoveemptydirstremovefilesRKtnoopR�toldexplicitdirtoldtraversedirtrestdirectoriesR�R!((RKR:s5/usr/lib64/python2.7/site-packages/mercurial/merge.pytpurge�s2			(ft
__future__RR�R�RWtstructti18nRR;RRRRRRRt
thirdpartyR	RwR
RRR
RR�RRRRRRtpackR�tunpackR�RR_R`RdReRgRfRaRhRiR�tRECORD_UNSUPPORTED_MANDATORYtRECORD_UNSUPPORTED_ADVISORYRVRcRTR�R�R�R�R�R�R�R�R�RnRmR�R5R6RRR:R7RTR�R�R9tobjectR8RRERRRLRMRcRdReRgRxR{RCR�R�R�R�R�R�R�R'RZR�RRR.RIRZ(((s5/usr/lib64/python2.7/site-packages/mercurial/merge.pyt<module>s�4	L			��a	
4	c		=		f	�	l			)	
�	_�4,