/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_interrepository.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
186
186
        from_tree.add('filename', 'funky-chars<>%&;"\'')
187
187
        from_tree.commit('commit filename')
188
188
        to_repo = self.make_to_repository('to')
 
189
        to_repo.fetch(from_tree.branch.repository, from_tree.get_parent_ids()[0])
 
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')
189
204
        to_repo.fetch(from_tree.branch.repository, from_tree.last_revision())
190
205
 
191
206
 
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,