~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/patches.py

  • Committer: John Arbash Meinel
  • Date: 2008-08-25 21:50:11 UTC
  • mfrom: (0.11.3 tools)
  • mto: This revision was merged to the branch mainline in revision 3659.
  • Revision ID: john@arbash-meinel.com-20080825215011-de9esmzgkue3e522
Merge in Lukáš's helper scripts.
Update the packaging documents to describe how to do the releases
using bzr-builddeb to package all distro platforms
simultaneously.

Show diffs side-by-side

added added

removed removed

Lines of Context:
220
220
            return self.shift_to_mod_lines(pos)
221
221
 
222
222
    def shift_to_mod_lines(self, pos):
223
 
        assert (pos >= self.orig_pos-1 and pos <= self.orig_pos+self.orig_range)
224
223
        position = self.orig_pos-1
225
224
        shift = 0
226
225
        for line in self.lines:
355
354
    last_line = None
356
355
    for line in iter_lines:
357
356
        if line == NO_NL:
358
 
            assert last_line.endswith('\n')
 
357
            if not last_line.endswith('\n'):
 
358
                raise AssertionError()
359
359
            last_line = last_line[:-1]
360
360
            line = None
361
361
        if last_line is not None:
415
415
                if isinstance(hunk_line, ContextLine):
416
416
                    yield orig_line
417
417
                else:
418
 
                    assert isinstance(hunk_line, RemoveLine)
 
418
                    if not isinstance(hunk_line, RemoveLine):
 
419
                        raise AssertionError(hunk_line)
419
420
                line_no += 1
420
421
    if orig_lines is not None:
421
422
        for line in orig_lines: