~ubuntu-branches/ubuntu/karmic/bzr/karmic-proposed

« back to all changes in this revision

Viewing changes to bzrlib/_patiencediff_py.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2008-05-12 00:14:54 UTC
  • mfrom: (1.1.42 upstream)
  • Revision ID: james.westby@ubuntu.com-20080512001454-yjpajuiocykl48p9
Tags: 1.5~rc1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
        assert a >= next_a, 'Non increasing matches for a'
201
 
        assert b >= next_b, 'Not increasing matches for b'
 
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')
202
204
        next_a = a + match_len
203
205
        next_b = b + match_len
204
206