/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/_patiencediff_py.py

  • Committer: Jelmer Vernooij
  • Date: 2018-07-08 14:45:27 UTC
  • mto: This revision was merged to the branch mainline in revision 7036.
  • Revision ID: jelmer@jelmer.uk-20180708144527-codhlvdcdg9y0nji
Fix a bunch of merge tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
 
 
18
from __future__ import absolute_import
18
19
 
19
20
from bisect import bisect
20
21
import difflib
21
22
 
22
 
from bzrlib.trace import mutter
 
23
from .trace import mutter
23
24
 
24
25
 
25
26
__all__ = ['PatienceSequenceMatcher', 'unified_diff', 'unified_diff_files']
42
43
    # set index[line in a] = position of line in a unless
43
44
    # a is a duplicate, in which case it's set to None
44
45
    index = {}
45
 
    for i in xrange(len(a)):
46
 
        line = a[i]
 
46
    for i, line in enumerate(a):
47
47
        if line in index:
48
48
            index[line] = None
49
49
        else:
161
161
            nbhi -= 1
162
162
        recurse_matches_py(a, b, last_a_pos+1, last_b_pos+1,
163
163
                           nahi, nbhi, answer, maxrecursion - 1)
164
 
        for i in xrange(ahi - nahi):
 
164
        for i in range(ahi - nahi):
165
165
            answer.append((nahi + i, nbhi + i))
166
166
 
167
167