~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_patiencediff_py.py

  • Committer: Martin Pool
  • Date: 2007-10-12 08:00:07 UTC
  • mto: This revision was merged to the branch mainline in revision 2913.
  • Revision ID: mbp@sourcefrog.net-20071012080007-vf80woayyom8s8e1
Rename update_to_one_parent_via_delta to more wieldy update_basis_by_delta

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
    length = 0
177
177
    for i_a, i_b in matches:
178
178
        if (start_a is not None
179
 
            and (i_a == start_a + length)
 
179
            and (i_a == start_a + length) 
180
180
            and (i_b == start_b + length)):
181
181
            length += 1
182
182
        else:
196
196
    # For consistency sake, make sure all matches are only increasing
197
197
    next_a = -1
198
198
    next_b = -1
199
 
    for (a, b, match_len) in answer:
200
 
        if a < next_a:
201
 
            raise ValueError('Non increasing matches for a')
202
 
        if b < next_b:
203
 
            raise ValueError('Non increasing matches for b')
 
199
    for a,b,match_len in answer:
 
200
        assert a >= next_a, 'Non increasing matches for a'
 
201
        assert b >= next_b, 'Not increasing matches for b'
204
202
        next_a = a + match_len
205
203
        next_b = b + match_len
206
204