KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache
System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : andertr9 ( 1047)
PHP Version : 8.2.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/mercurial/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/mercurial/simplemerge.pyo
�
Hq�Qc@s�ddlmZddlZddlZddlZddlZddlZdefd��YZd�Z	d�Z
defd��YZd	�Z
dS(
i����(t_NtCantReprocessAndShowBasecBseZRS((t__name__t
__module__(((s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pyRscCsLt|d|d�}t|d|d�}||krD||fSdSdS(sGiven two ranges return the range where they intersect or None.

    >>> intersect((0, 10), (0, 6))
    (0, 6)
    >>> intersect((0, 10), (5, 15))
    (5, 10)
    >>> intersect((0, 10), (10, 15))
    >>> intersect((0, 9), (10, 15))
    >>> intersect((0, 9), (7, 15))
    (7, 9)
    iiN(tmaxtmintNone(tratrbtsatsb((s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pyt	intersects

cCsj||||krtSxKtt||�t||��D]$\}}||||kr:tSq:WtSdS(s?Compare a[astart:aend] == b[bstart:bend], without slicing.
    N(tFalsetziptxrangetTrue(tatastarttaendtbtbstarttbendtiatib((s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pyt
compare_range0s.t
Merge3Textc	Bs�eZdZd
d
d
d�Zd
d
d
dddd
ed�Zd�Zd�Zd�Z	d	�Z
d
�Zee�Zd�Z
d�ZRS(s�3-way merge of texts.

    Given strings BASE, OTHER, THIS, tries to produce a combined text
    incorporating the changes from both BASE->OTHER and BASE->THIS.cCs�||_||_||_|dkr9tj|�}n|dkrWtj|�}n|dkrutj|�}n||_||_||_dS(N(	tbasetexttatexttbtextRtmdifft
splitnewlinestbaseRR(tselfRRRRRR((s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pyt__init__@s					s<<<<<<<s=======s>>>>>>>c	cs�t|_d}	t|j�dkre|jdjd�rCd}	qe|jdjd�red}	qen|rz|rzt�n|r�|d|}n|r�|d|}n|r�|r�|d|}n|j�}
|tkr�|j|
�}
nx�|
D]�}|d}|dkrCx�t	|d|d�D]}
|j
|
Vq*Wq�|d	ks[|d
kr�xLt	|d|d�D]}
|j|
VqsWq�|dkr�xt	|d|d�D]}
|j|
Vq�Wq�|dkr�t|_||	Vx+t	|d
|d�D]}
|j|
Vq�W|dk	r[||	Vx.t	|d|d�D]}
|j
|
VqBWn||	Vx+t	|d|d�D]}
|j|
Vq|W||	Vq�t
|��q�WdS(s'Return merge in cvs-like form.
        s
is
s
t t	unchangediiRtsameRtconflictiiiiN(Rt	conflictstlenRtendswithRt
merge_regionsRtreprocess_merge_regionstrangeRRRt
ValueError(R tname_atname_bt	name_basetstart_markert
mid_markert
end_markertbase_markert	reprocesstnewlineR)tttwhatti((s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pytmerge_linesNsV			

				ccs�x�|j�D]u}|d}|dkr^xVt|d|d�D]}d|j|VqAWq
|dksv|dkr�x	t|d|d�D]}|dd|j|Vq�Wq
|d	kr�x�t|d|d�D]}d
|j|Vq�Wq
|dkrvdVx/t|d
|d�D]}d|j|VqWdVx/t|d|d�D]}d|j|VqTWdVq
t|��q
WdS(shReturn merge with conflicts, showing origin of lines.

        Most useful for debugging merge.
        iR#iisu | RR$s | Rsb | R%s<<<<
iisA | s----
iisB | s>>>>
N(R)R+RRRR,(R R6R7R8((s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pytmerge_annotated�s(
c	csx|j�D]}|d}|dkrI||j|d|d!fVq
|dksa|dkr�||j|d|d!fVq
|dkr�||j|d|d!fVq
|dkr||j|d|d!|j|d	|d
!|j|d|d!fVq
t|��q
Wd
S(s�Yield sequence of line groups.  Each one is a tuple:

        'unchanged', lines
             Lines unchanged from base

        'a', lines
             Lines taken from a

        'same', lines
             Lines taken from a (and equal to b)

        'b', lines
             Lines taken from b

        'conflict', base_lines, a_lines, b_lines
             Lines from base were changed to either a or b and conflict.
        iR#iiRR$RR%iiiiN(R)RRRR,(R R6R7((s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pytmerge_groups�s
   ccs�d}}}x�|j�D]�}|\}}}}}	}
||}||}|	|}
||}|sm|
rit|j|||j||�}t|j||	|j||�}t|j|||j||	�}|r�d||fVns|r|rd||	fVnU|r#|r#d||fVn7|rN|rNd||||||	fVntd��|}|	}n|}|dkrd||fV|}|}|
}qqWdS(	spReturn sequences of matching and conflicting regions.

        This returns tuples, where the first value says what kind we
        have:

        'unchanged', start, end
             Take a region of base[start:end]

        'same', astart, aend
             b and a are different from base but give the same result

        'a', start, end
             Non-clashing insertion from a[start:end]

        Method is as follows:

        The two sequences align only on regions which match the base
        and both descendants.  These are found by doing a two-way diff
        of each one against the base, and then finding the
        intersections between those regions.  These "sync regions"
        are by definition unchanged in both and easily dealt with.

        The regions in between can be in any of three cases:
        conflicted, or changed on only one side.
        iR$RRR%s#can't handle a=b=base but unmatchedR#N(tfind_sync_regionsRRRRtAssertionError(R tizRRtregiontzmatchtzendtamatchRtbmatchRtmatchlentlen_atlen_btlen_basetequal_atequal_bR$((s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pyR)�s>





	ccsKxD|D]<}|ddkr(|Vqn|\}}}}}}}	|j||!}
|j||	!}tjdj|
�dj|��}|}
|}x�|d D]u\}}}||7}||7}|j|
|||�}|dk	r�|Vnd|||fV||}
||}q�W|j|
|||	�}|dk	r|VqqWdS(s�Where there are conflict regions, remove the agreed lines.

        Lines where both A and B have made the same changes are
        eliminated.
        iR%ti����R$N(RRRtget_matching_blockstjointmismatch_regionR(R R)R?ttypeR>R@RRBRRCta_regiontb_regiontmatchestnext_atnext_bt	region_iat	region_ibt
region_lentreg((s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pyR*s0


	
cCs5||ks||kr1ddd||||fSdS(NR%(R(RRRTRSRU((s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pyRM8scCs�d}}tj|j|j�}tj|j|j�}t|�}t|�}g}x||kr`||kr`||\}}	}
||\}}}
t|||
f|||
f�}|r2|d}|d}||}|	||}|||}||}||}|j||||||f�n||
||
krS|d7}q[|d7}q[Wt|j�}t|j	�}t|j
�}|j||||||f�|S(s�Return a list of sync regions, where both descendants match the base.

        Generates a list of (base1, base2, a1, a2, b1, b2).  There is
        always a zero-length sync region at the end of all the files.
        ii(RRKRRRR'RtappendRRR(R RRtamatchestbmatchesRERFtsltabaseRBtalentbbaseRCtblenR8tintbasetintendtintlentasubtbsubRR((s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pyR<=s:
#


	


c	Cs�tj|j|j�}tj|j|j�}g}x�|r�|r�|dd}||dd}|dd}||dd}t||f||f�}|r�|j|�n||kr�|d=q9|d=q9W|S(s8Return a list of ranges in base that are not conflicted.ii(RRKRRRRRX(	R tamtbmtuncta1ta2tb1tb2R8((s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pytfind_unconflictedzs
N(RRt__doc__RR!RR9R:R;R)R*RMtstaticmethodR<Rl(((s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pyR;s$0		"	V			=cs���fd�}|}|}�jdg�}|rH|jd�}n|r`|jd�}n|r~tjtd���ny(||�}	||�}
||�}Wntjk
r�dSXtjj|�}�jd�stj	tjj
|��}|tjj|�ddt�}
n	t
j}
�jd	�}t|
|	|�}x3|jd
|d|d|�D]}|
j|�qhW�jd�s�|
j�n|jr��jd
�s��jtd��ndSdS(Ncs�t|d�}|j�}|j�tj|�r�td�|}�jd�sm�jtd�|�n�jd�s�tj|��q�n|S(NRs%s looks like a binary file.tquietswarning: %s
ttext(	topentreadtclosetutiltbinaryRtgettwarntAbort(tfilenametfRptmsg(toptstui(s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pytreadfile�s
tlabeliscan only specify two labels.itprinttwt
atomictempt
no_minimalR-R.R4Ros!warning: conflicts during merge.
(RvtpopRtRxRtostpathtrealpathtscmutiltopenertdirnametbasenameRtsyststdoutRR9twriteRsR&Rw(R}tlocalRtotherR|R~R-R.tlabelst	localtextRt	othertextR�toutR4tm3tline((R|R}s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pytsimplemerge�s@$	

	(ti18nRR�RtRR�R�t	ExceptionRRRtobjectRR�(((s;/usr/lib64/python2.7/site-packages/mercurial/simplemerge.pyt<module>s$		�Y

Anon7 - 2021