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

  • Committer: Martin Pool
  • Date: 2007-02-07 09:11:31 UTC
  • mto: This revision was merged to the branch mainline in revision 2283.
  • Revision ID: mbp@sourcefrog.net-20070207091131-458fw18bgytvaz7t
Move Knit repositories into the submodule bzrlib.repofmt.knitrepo and
lazily load from the registry.

InterRepo._matching_repo_format is now a method not a class field so that
it can load repositories when we need them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
260
260
    
261
261
    def test_disk_layout(self):
262
262
        control = bzrdir.BzrDirMetaFormat1().initialize(self.get_url())
263
 
        repo = repository.RepositoryFormatKnit1().initialize(control)
 
263
        repo = knitrepo.RepositoryFormatKnit1().initialize(control)
264
264
        # in case of side effects of locking.
265
265
        repo.lock_write()
266
266
        repo.unlock()
293
293
 
294
294
    def test_shared_disk_layout(self):
295
295
        control = bzrdir.BzrDirMetaFormat1().initialize(self.get_url())
296
 
        repo = repository.RepositoryFormatKnit1().initialize(control, shared=True)
 
296
        repo = knitrepo.RepositoryFormatKnit1().initialize(control, shared=True)
297
297
        # we want:
298
298
        # format 'Bazaar-NG Knit Repository Format 1'
299
299
        # lock: is a directory
312
312
 
313
313
    def test_shared_no_tree_disk_layout(self):
314
314
        control = bzrdir.BzrDirMetaFormat1().initialize(self.get_url())
315
 
        repo = repository.RepositoryFormatKnit1().initialize(control, shared=True)
 
315
        repo = knitrepo.RepositoryFormatKnit1().initialize(control, shared=True)
316
316
        repo.set_make_working_trees(False)
317
317
        # we want:
318
318
        # format 'Bazaar-NG Knit Repository Format 1'
402
402
        t.mkdir('repository')
403
403
        repo_dir = bzrdir.BzrDirMetaFormat1().initialize('repository')
404
404
        repo = weaverepo.RepositoryFormat7().initialize(repo_dir)
405
 
        target_format = repository.RepositoryFormatKnit1()
 
405
        target_format = knitrepo.RepositoryFormatKnit1()
406
406
        converter = repository.CopyConverter(target_format)
407
407
        pb = bzrlib.ui.ui_factory.nested_progress_bar()
408
408
        try:
425
425
    def test_convert(self):
426
426
        """Ensure the upgrade adds weaves for roots"""
427
427
        format = bzrdir.BzrDirMetaFormat1()
428
 
        format.repository_format = repository.RepositoryFormatKnit1()
 
428
        format.repository_format = knitrepo.RepositoryFormatKnit1()
429
429
        tree = self.make_branch_and_tree('.', format)
430
430
        tree.commit("Dull commit", rev_id="dull")
431
431
        revision_tree = tree.branch.repository.revision_tree('dull')