/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 breezy/textmerge.py

  • Committer: Jelmer Vernooij
  • Date: 2018-06-14 17:59:16 UTC
  • mto: This revision was merged to the branch mainline in revision 7065.
  • Revision ID: jelmer@jelmer.uk-20180614175916-a2e2xh5k533guq1x
Move breezy.plugins.git to breezy.git.

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 __future__ import absolute_import
 
21
 
20
22
from .lazy_import import lazy_import
21
23
lazy_import(globals(), """
22
 
import patiencediff
 
24
from breezy import patiencediff
23
25
""")
24
26
 
25
27
 
42
44
    A_MARKER = b'<<<<<<< \n'
43
45
    B_MARKER = b'>>>>>>> \n'
44
46
    SPLIT_MARKER = b'=======\n'
45
 
 
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