/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: 2020-03-22 01:35:14 UTC
  • mfrom: (7490.7.6 work)
  • mto: This revision was merged to the branch mainline in revision 7499.
  • Revision ID: jelmer@jelmer.uk-20200322013514-7vw1ntwho04rcuj3
merge lp:brz/3.1.

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
 
 
22
20
from .lazy_import import lazy_import
23
21
lazy_import(globals(), """
24
 
from breezy import patiencediff
 
22
import patiencediff
25
23
""")
26
24
 
27
25
 
41
39
    """
42
40
    # TODO: Show some version information (e.g. author, date) on conflicted
43
41
    # regions.
44
 
    A_MARKER = '<<<<<<< \n'
45
 
    B_MARKER = '>>>>>>> \n'
46
 
    SPLIT_MARKER = '=======\n'
 
42
    A_MARKER = b'<<<<<<< \n'
 
43
    B_MARKER = b'>>>>>>> \n'
 
44
    SPLIT_MARKER = b'=======\n'
 
45
 
47
46
    def __init__(self, a_marker=A_MARKER, b_marker=B_MARKER,
48
47
                 split_marker=SPLIT_MARKER):
49
48
        self.a_marker = a_marker
143
142
            # non-matching lines
144
143
            yield(self.lines_a[pos_a:ai], self.lines_b[pos_b:bi])
145
144
            # matching lines
146
 
            yield(self.lines_a[ai:ai+l],)
 
145
            yield(self.lines_a[ai:ai + l],)
147
146
            pos_a = ai + l
148
147
            pos_b = bi + l
149
148
        # final non-matching lines