/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: Breezy landing bot
  • Author(s): Colin Watson
  • Date: 2020-11-16 21:47:08 UTC
  • mfrom: (7521.1.1 remove-lp-workaround)
  • Revision ID: breezy.the.bot@gmail.com-20201116214708-jos209mgxi41oy15
Remove breezy.git workaround for bazaar.launchpad.net.

Merged from https://code.launchpad.net/~cjwatson/brz/remove-lp-workaround/+merge/393710

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
 
from bzrlib.lazy_import import lazy_import
 
20
from .lazy_import import lazy_import
23
21
lazy_import(globals(), """
24
 
from bzrlib 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