~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/bundle_data.py

  • Committer: Aaron Bentley
  • Date: 2006-09-28 01:53:23 UTC
  • mfrom: (2049 +trunk)
  • mto: (1731.2.8 nested-trees)
  • mto: This revision was merged to the branch mainline in revision 2078.
  • Revision ID: aaron.bentley@utoronto.ca-20060928015323-4e7367532c857e87
Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
223
223
            if repository.has_revision(revision_id):
224
224
                testament = StrictTestament.from_revision(repository, 
225
225
                                                          revision_id)
226
 
                local_sha1 = testament.as_sha1()
 
226
                local_sha1 = self._testament_sha1_from_revision(repository,
 
227
                                                                revision_id)
227
228
                if sha1 != local_sha1:
228
229
                    raise BzrError('sha1 mismatch. For revision id {%s}' 
229
230
                            'local: %s, bundle: %s' % (revision_id, local_sha1, sha1))
281
282
        rev_info = self.get_revision_info(revision_id)
282
283
        assert rev.revision_id == rev_info.revision_id
283
284
        assert rev.revision_id == revision_id
284
 
        sha1 = StrictTestament(rev, inventory).as_sha1()
 
285
        sha1 = self._testament_sha1(rev, inventory)
285
286
        if sha1 != rev_info.sha1:
286
287
            raise TestamentMismatch(rev.revision_id, rev_info.sha1, sha1)
287
288
        if rev.revision_id in rev_to_sha1:
589
590
                then be cached.
590
591
        """
591
592
        base_id = self.old_contents_id(file_id)
592
 
        if base_id is not None:
 
593
        if (base_id is not None and
 
594
            base_id != self.base_tree.inventory.root.file_id):
593
595
            patch_original = self.base_tree.get_file(base_id)
594
596
        else:
595
597
            patch_original = None