/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/tests/interrepository_implementations/test_fetch.py

  • Committer: Aaron Bentley
  • Date: 2008-04-27 23:47:45 UTC
  • mto: This revision was merged to the branch mainline in revision 3392.
  • Revision ID: aaron@aaronbentley.com-20080427234745-vng2ghxfnjqmmksc
Ensure fetching munges sha1s

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
from bzrlib import (
22
22
    errors,
23
23
    repository,
 
24
    osutils,
24
25
    )
25
26
from bzrlib.errors import (
26
27
    NoSuchRevision,
175
176
        to_repo.fetch(from_tree.branch.repository,
176
177
                      from_tree.get_parent_ids()[0])
177
178
 
 
179
    def test_fetch_revision_hash(self):
 
180
        """Ensure that inventory hashes are updated by fetch"""
 
181
        from_tree = self.make_branch_and_tree('tree')
 
182
        from_tree.commit('foo', rev_id='foo-id')
 
183
        to_repo = self.make_to_repository('to')
 
184
        to_repo.fetch(from_tree.branch.repository)
 
185
        recorded_inv_sha1 = to_repo.get_inventory_sha1('foo-id')
 
186
        xml = to_repo.get_inventory_xml('foo-id')
 
187
        computed_inv_sha1 = osutils.sha_string(xml)
 
188
        self.assertEqual(computed_inv_sha1, recorded_inv_sha1)
 
189
 
178
190
 
179
191
class TestFetchDependentData(TestCaseWithInterRepository):
180
192