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

  • Committer: Richard Wilbur
  • Date: 2016-02-04 19:07:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6618.
  • Revision ID: richard.wilbur@gmail.com-20160204190728-p0zvfii6zase0fw7
Update COPYING.txt from the original http://www.gnu.org/licenses/gpl-2.0.txt  (Only differences were in whitespace.)  Thanks to Petr Stodulka for pointing out the discrepancy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
from bisect import bisect
21
21
import difflib
22
22
 
23
 
from .trace import mutter
 
23
from bzrlib.trace import mutter
24
24
 
25
25
 
26
26
__all__ = ['PatienceSequenceMatcher', 'unified_diff', 'unified_diff_files']
43
43
    # set index[line in a] = position of line in a unless
44
44
    # a is a duplicate, in which case it's set to None
45
45
    index = {}
46
 
    for i, line in enumerate(a):
 
46
    for i in xrange(len(a)):
 
47
        line = a[i]
47
48
        if line in index:
48
49
            index[line] = None
49
50
        else:
161
162
            nbhi -= 1
162
163
        recurse_matches_py(a, b, last_a_pos+1, last_b_pos+1,
163
164
                           nahi, nbhi, answer, maxrecursion - 1)
164
 
        for i in range(ahi - nahi):
 
165
        for i in xrange(ahi - nahi):
165
166
            answer.append((nahi + i, nbhi + i))
166
167
 
167
168