/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/bundle/bundle_data.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-27 20:27:46 UTC
  • mfrom: (1910.2.66 format-bumps)
  • Revision ID: pqm@pqm.ubuntu.com-20060927202746-942eb21d12b7edc7
Add support for bundles and testaments with roots

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:
577
578
                then be cached.
578
579
        """
579
580
        base_id = self.old_contents_id(file_id)
580
 
        if base_id is not None:
 
581
        if (base_id is not None and
 
582
            base_id != self.base_tree.inventory.root.file_id):
581
583
            patch_original = self.base_tree.get_file(base_id)
582
584
        else:
583
585
            patch_original = None