~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

  • Committer: Martin Pool
  • Date: 2008-04-28 03:52:09 UTC
  • mfrom: (3360.3.3 1.4)
  • mto: This revision was merged to the branch mainline in revision 3385.
  • Revision ID: mbp@sourcefrog.net-20080428035209-2sfjlaeijx20wt1z
Merge back 1.4 and start 1.5 (but not transaction cache reinstatement)

Show diffs side-by-side

added added

removed removed

Lines of Context:
843
843
                            'on the source repository, and "bzr reconcile" '
844
844
                            'if necessary.' %
845
845
                            (version_id, parents[0]))
 
846
                    if not self.delta:
 
847
                        # We received a line-delta record for a non-delta knit.
 
848
                        # Convert it to a fulltext.
 
849
                        gzip_bytes = reader_callable(length)
 
850
                        lines, sha1 = self._data._parse_record(
 
851
                            version_id, gzip_bytes)
 
852
                        delta = self.factory.parse_line_delta(lines,
 
853
                                version_id)
 
854
                        content = self.factory.make(
 
855
                            self.get_lines(parents[0]), parents[0])
 
856
                        content.apply_delta(delta, version_id)
 
857
                        digest, len, content = self.add_lines(
 
858
                            version_id, parents, content.text())
 
859
                        if digest != sha1:
 
860
                            raise errors.VersionedFileInvalidChecksum(version)
 
861
                        continue
 
862
 
846
863
                self._add_raw_records(
847
864
                    [(version_id, options, parents, length)],
848
865
                    reader_callable(length))