~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to tools/history2weaves.py

  • Committer: Martin Pool
  • Date: 2005-09-19 10:45:38 UTC
  • Revision ID: mbp@sourcefrog.net-20050919104537-e75c228a558d58ec
- check inventory sha when loading old revisions

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
from bzrlib.xml4 import serializer_v4
92
92
from bzrlib.xml5 import serializer_v5
93
93
from bzrlib.trace import mutter, note, warning, enable_default_logging
94
 
from bzrlib.osutils import sha_strings
 
94
from bzrlib.osutils import sha_strings, sha_string
95
95
 
96
96
 
97
97
 
185
185
            self.revisions[rev_id] = rev
186
186
            old_inv_xml = self.branch.inventory_store[rev_id].read()
187
187
            inv = serializer_v4.read_inventory_from_string(old_inv_xml)
 
188
            assert rev.inventory_sha1 == sha_string(old_inv_xml)
188
189
            self.inventories[rev_id] = inv
189
190
        
190
191