-=[ Mr. Bumblebee ]=-
_Indonesia_
ó
Ì\,Tc @ s— d d l m Z d d l Z d d l Z d d l Z d d l Z d d l Z d e f d „ ƒ YZ d „ Z d „ Z
d e f d „ ƒ YZ d „ Z
d S(
iÿÿÿÿ( t _Nt CantReprocessAndShowBasec B s e Z RS( ( t __name__t
__module__( ( ( s9 /usr/lib/python2.7/dist-packages/mercurial/simplemerge.pyR s c C s€ | d | d k s t ‚ | d | d k s4 t ‚ t | d | d ƒ } t | d | d ƒ } | | k rx | | f Sd Sd S( s Given 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)
i i N( t AssertionErrort maxt mint None( t rat rbt sat sb( ( s9 /usr/lib/python2.7/dist-packages/mercurial/simplemerge.pyt intersect s
c C sj | | | | k r t SxK t t | | ƒ t | | ƒ ƒ D]$ \ } } | | | | k r: t Sq: Wt Sd S( s? Compare a[astart:aend] == b[bstart:bend], without slicing.
N( t Falset zipt xranget True( t at astartt aendt bt bstartt bendt iat ib( ( s9 /usr/lib/python2.7/dist-packages/mercurial/simplemerge.pyt
compare_range0 s .t
Merge3Textc B sŒ e Z d Z d
d
d
d „ Z d
d
d
d d d d
e d „ Z d „ Z d „ Z d „ Z d „ Z
d
„ Z e e ƒ Z d „ Z
d „ Z RS( 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.c C s” | | _ | | _ | | _ | d k r9 t j | ƒ } n | d k rW t j | ƒ } n | d k ru t j | ƒ } n | | _ | | _ | | _ d S( N( t basetextt atextt btextR t mdifft
splitnewlinest baseR R ( t selfR R R R R R ( ( s9 /usr/lib/python2.7/dist-packages/mercurial/simplemerge.pyt __init__@ s s <<<<<<<s =======s >>>>>>>c c s² t | _ d } t | j ƒ d k re | j d j d ƒ rC d } qe | j d j d ƒ re d } qe n | rz | rz t ‚ n | r‘ | d | } n | r¨ | d | } n | rÅ | rÅ | d | } n | j ƒ }
| t k rï | j |
ƒ }
n x¼|
D]´} | d } | d k rCx•t | d | d ƒ D] }
| j
|
Vq*Wqö | d k s[| d
k rŒxLt | d | d ƒ D] }
| j |
VqsWqö | d k rÉxt | d | d ƒ D] }
| j |
Vq°Wqö | d k ržt | _ | | Vx+ t | d
| d ƒ D] }
| j |
VqÿW| d k r[| | Vx. t | d | d ƒ D] }
| j
|
VqBWn | | Vx+ t | d | d ƒ D] }
| j |
Vq|W| | Vqö t
| ƒ ‚ qö Wd S( s' Return merge in cvs-like form.
s
i s
s
t t unchangedi i R t sameR t conflicti i i i N( R
t conflictst lenR t endswithR t
merge_regionsR t reprocess_merge_regionst rangeR R R t
ValueError( R! t name_at name_bt name_baset start_markert
mid_markert
end_markert base_markert reprocesst newlineR* t tt whatt i( ( s9 /usr/lib/python2.7/dist-packages/mercurial/simplemerge.pyt merge_linesN sV
c c sŠ xƒ| j ƒ D]u} | d } | d k r^ xVt | d | d ƒ D] } d | j | VqA Wq
| d k sv | d k r³ x t | d | d ƒ D] } | d d | j | VqŽ Wq
| d k rô xÀ t | d | d ƒ D] } d
| j | Vq× Wq
| d k rvd Vx/ t | d
| d ƒ D] } d | j | VqWd Vx/ t | d | d ƒ D] } d | j | VqTWd Vq
t | ƒ ‚ q
Wd S( sh Return merge with conflicts, showing origin of lines.
Most useful for debugging merge.
i R$ i i s u | R R% s | R s b | R&