File: //usr/lib/python2.7/dist-packages/mercurial/simplemerge.pyc
ó
ÛXc @@ s¥ d d l m Z d d l Z d d l Z d d l m Z d d l m Z m Z m Z m
Z
d e f d „ ƒ YZ d „ Z
d „ Z d
e f d „ ƒ YZ d „ Z d S(
i ( t absolute_importNi ( t _( t errort mdifft scmutilt utilt 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_range9 s .t
Merge3Textc
B@ sq e Z d Z d d d d „ Z d d d d d d d d e d „ Z d „ Z d „ Z d „ 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 R t
splitnewlinest baseR R ( t selfR R! R"