-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/bzrlib/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/bzrlib/textmerge.pyc

ó
¦îNc@@s`ddlmZddlmZeeƒdƒdefd„ƒYZdefd„ƒYZdS(	i(tabsolute_import(tlazy_imports!
from bzrlib import patiencediff
t	TextMergecB@steZdZdZdZdZeeed„Zd„Zd„Zd„Z	e
d„Ze
d	„Ze
d
„ƒZRS(sBase class for text-mergers
    Subclasses must implement _merge_struct.

    Many methods produce or consume structured merge information.
    This is an iterable of tuples of lists of lines.
    Each tuple may have a length of 1 - 3, depending on whether the region it
    represents is conflicted.

    Unconflicted region tuples have length 1.
    Conflicted region tuples have length 2 or 3.  Index 1 is text_a, e.g. THIS.
    Index 1 is text_b, e.g. OTHER.  Index 2 is optional.  If present, it
    represents BASE.
    s	<<<<<<< 
s	>>>>>>> 
s=======
cC@s||_||_||_dS(N(ta_markertb_markertsplit_marker(tselfRRR((s4/usr/lib/python2.7/dist-packages/bzrlib/textmerge.pyt__init__/s		cC@stdƒ‚dS(s…Return structured merge info.  Must be implemented by subclasses.
        See TextMerge docstring for details on the format.
        s_merge_struct is abstractN(tNotImplementedError(R((s4/usr/lib/python2.7/dist-packages/bzrlib/textmerge.pyt
_merge_struct5scc@sx‰|D]}t|ƒdkr<xf|dD]}|Vq*Wq|jVx|dD]}|VqOW|jVx|dD]}|VqqW|jVqWdS(s$Convert merge result tuples to linesiiN(tlenRRR(Rtstruct_itertlinestline((s4/usr/lib/python2.7/dist-packages/bzrlib/textmerge.pytstruct_to_lines;s
		cc@scx\|D]T}t|dƒdkr+|Vqt|ƒdkrt|dƒdkr|VqqWdS(s2Iterate through input tuples, skipping empty ones.iiN(R
(RRtgroup((s4/usr/lib/python2.7/dist-packages/bzrlib/textmerge.pytiter_usefulJs

(cC@sag}t}x?|j|ƒD].}|j|ƒt|ƒdkrt}qqW|j|ƒ|fS(sProduce an iterable of lines, suitable for writing to a file
        Returns a tuple of (line iterable, conflict indicator)
        If reprocess is True, a two-way merge will be performed on the
        intermediate structure, to reduce conflict regions.
        i(tFalsetmerge_structtappendR
tTrueR(Rt	reprocesststructt	conflictsR((s4/usr/lib/python2.7/dist-packages/bzrlib/textmerge.pytmerge_linesRs

cC@s6|j|jƒƒ}|tkr.|j|ƒS|SdS(sProduce structured merge infoN(RR	Rtreprocess_struct(RRR((s4/usr/lib/python2.7/dist-packages/bzrlib/textmerge.pyR`s
cc@s\xU|D]M}t|ƒdkr'|Vqx*t|d|dƒjƒD]}|VqEWqWdS(sA Perform a two-way merge on structural merge info.
        This reduces the size of conflict regions, but breaks the connection
        between the BASE text and the conflict region.

        This process may split a single conflict region into several smaller
        ones, but will not introduce new conflicts.
        iiN(R
tMerge2R(RRtnewgroup((s4/usr/lib/python2.7/dist-packages/bzrlib/textmerge.pyRhs
	
$(t__name__t
__module__t__doc__tA_MARKERtB_MARKERtSPLIT_MARKERRR	RRRRRtstaticmethodR(((s4/usr/lib/python2.7/dist-packages/bzrlib/textmerge.pyRs
			RcB@s2eZdZejejejd„Zd„ZRS(sƒ Two-way merge.
    In a two way merge, common regions are shown as unconflicting, and uncommon
    regions produce conflicts.
    cC@s,tj||||ƒ||_||_dS(N(RRtlines_atlines_b(RR#R$RRR((s4/usr/lib/python2.7/dist-packages/bzrlib/textmerge.pyRs	cc@s³tjd|j|jƒ}d}d}xf|jƒD]X\}}}|j||!|j||!fV|j|||!fV||}||}q4W|j|d!|j|d!fVdS(sGReturn structured merge info.
        See TextMerge docstring.
        iiÿÿÿÿN(tpatiencedifftPatienceSequenceMatchertNoneR#R$tget_matching_blocks(Rtsmtpos_atpos_btaitbitl((s4/usr/lib/python2.7/dist-packages/bzrlib/textmerge.pyR	†s
(	RRRRRR R!RR	(((s4/usr/lib/python2.7/dist-packages/bzrlib/textmerge.pyRys
N(t
__future__Rtbzrlib.lazy_importRtglobalstobjectRR(((s4/usr/lib/python2.7/dist-packages/bzrlib/textmerge.pyt<module>s
	]

Copyright © 2017 || Recoded By Mr.Bumblebee