/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: Jelmer Vernooij
  • Date: 2011-04-18 15:53:40 UTC
  • mto: This revision was merged to the branch mainline in revision 5804.
  • Revision ID: jelmer@samba.org-20110418155340-tb4zpmupusk7et6u
Fix some tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
206
206
 
207
207
        inv = bundle_tree.inventory
208
208
        self._validate_inventory(inv, revision_id)
209
 
        self._validate_revision(inv, revision_id)
 
209
        self._validate_revision(bundle_tree, revision_id)
210
210
 
211
211
        return bundle_tree
212
212
 
286
286
            warning('Inventory sha hash mismatch for revision %s. %s'
287
287
                    ' != %s' % (revision_id, sha1, rev.inventory_sha1))
288
288
 
289
 
    def _validate_revision(self, inventory, revision_id):
 
289
    def _validate_revision(self, tree, revision_id):
290
290
        """Make sure all revision entries match their checksum."""
291
291
 
292
292
        # This is a mapping from each revision id to its sha hash
298
298
            raise AssertionError()
299
299
        if not (rev.revision_id == revision_id):
300
300
            raise AssertionError()
301
 
        sha1 = self._testament_sha1(rev, inventory)
 
301
        sha1 = self._testament_sha1(rev, tree)
302
302
        if sha1 != rev_info.sha1:
303
303
            raise TestamentMismatch(rev.revision_id, rev_info.sha1, sha1)
304
304
        if rev.revision_id in rev_to_sha1: