~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

  • Committer: Robert Collins
  • Date: 2007-10-17 09:39:41 UTC
  • mfrom: (2911 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2933.
  • Revision ID: robertc@robertcollins.net-20071017093941-v7d1djrt2617citb
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
715
715
                    raise KnitCorrupt(
716
716
                        self.filename, 'sha-1 does not match %s' % version_id)
717
717
            else:
 
718
                if 'line-delta' in options:
 
719
                    # Make sure that this knit record is actually useful: a
 
720
                    # line-delta is no use unless we have its parent.
 
721
                    # Fetching from a broken repository with this problem
 
722
                    # shouldn't break the target repository.
 
723
                    if not self._index.has_version(parents[0]):
 
724
                        raise KnitCorrupt(
 
725
                            self.filename,
 
726
                            'line-delta from stream references '
 
727
                            'missing parent %s' % parents[0])
718
728
                self._add_raw_records(
719
729
                    [(version_id, options, parents, length)],
720
730
                    reader_callable(length))