/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to brzlib/textmerge.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 12:41:27 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521124127-iv8etg0vwymyai6y
s/bzr/brz/ in apport config.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# Author: Martin Pool <mbp@canonical.com>
18
18
#         Aaron Bentley <aaron.bentley@utoronto.ca>
19
19
 
20
 
from .lazy_import import lazy_import
 
20
from __future__ import absolute_import
 
21
 
 
22
from brzlib.lazy_import import lazy_import
21
23
lazy_import(globals(), """
22
 
import patiencediff
 
24
from brzlib import patiencediff
23
25
""")
24
26
 
25
27
 
39
41
    """
40
42
    # TODO: Show some version information (e.g. author, date) on conflicted
41
43
    # regions.
42
 
    A_MARKER = b'<<<<<<< \n'
43
 
    B_MARKER = b'>>>>>>> \n'
44
 
    SPLIT_MARKER = b'=======\n'
45
 
 
 
44
    A_MARKER = '<<<<<<< \n'
 
45
    B_MARKER = '>>>>>>> \n'
 
46
    SPLIT_MARKER = '=======\n'
46
47
    def __init__(self, a_marker=A_MARKER, b_marker=B_MARKER,
47
48
                 split_marker=SPLIT_MARKER):
48
49
        self.a_marker = a_marker
142
143
            # non-matching lines
143
144
            yield(self.lines_a[pos_a:ai], self.lines_b[pos_b:bi])
144
145
            # matching lines
145
 
            yield(self.lines_a[ai:ai + l],)
 
146
            yield(self.lines_a[ai:ai+l],)
146
147
            pos_a = ai + l
147
148
            pos_b = bi + l
148
149
        # final non-matching lines