~mhammond/bzr/update-r

« back to all changes in this revision

Viewing changes to bzrlib/tests/interrepository_implementations/test_interrepository.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-13 01:57:42 UTC
  • mfrom: (2003 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2004.
  • Revision ID: john@arbash-meinel.com-20060913015742-26daf2a7676b904e
[merge] bzr.dev 2003

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
        to_repo = self.make_to_repository('to')
189
189
        to_repo.fetch(from_tree.branch.repository, from_tree.get_parent_ids()[0])
190
190
 
 
191
    def test_fetch_no_inventory_revision(self):
 
192
        """Old inventories lack revision_ids, so simulate this"""
 
193
        from_tree = self.make_branch_and_tree('tree')
 
194
        self.build_tree(['tree/filename'])
 
195
        from_tree.add('filename', 'funky-chars<>%&;"\'')
 
196
        from_tree.commit('commit filename')
 
197
        old_deserialise = from_tree.branch.repository.deserialise_inventory
 
198
        def deserialise(revision_id, text):
 
199
            inventory = old_deserialise(revision_id, text)
 
200
            inventory.revision_id = None
 
201
            return inventory
 
202
        from_tree.branch.repository.deserialise_inventory = deserialise
 
203
        to_repo = self.make_to_repository('to')
 
204
        to_repo.fetch(from_tree.branch.repository, from_tree.last_revision())
 
205
 
191
206
 
192
207
class TestCaseWithComplexRepository(TestCaseWithInterRepository):
193
208
 
248
263
        # repository.
249
264
 
250
265
        # 'ghost' is a ghost in missing_ghost and not in with_ghost_rev
251
 
        inv = Inventory()
 
266
        inv = Inventory(revision_id='ghost')
 
267
        inv.root.revision = 'ghost'
252
268
        repo = self.make_repository('with_ghost_rev')
253
269
        sha1 = repo.add_inventory('ghost', inv, [])
254
270
        rev = bzrlib.revision.Revision(timestamp=0,
261
277
        repo.add_revision('ghost', rev)
262
278
         
263
279
        repo = self.make_to_repository('missing_ghost')
 
280
        inv = Inventory(revision_id='with_ghost')
 
281
        inv.root.revision = 'with_ghost'
264
282
        sha1 = repo.add_inventory('with_ghost', inv, [])
265
283
        rev = bzrlib.revision.Revision(timestamp=0,
266
284
                                       timezone=None,