~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.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:
1
 
# Copyright (C) 2004, 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2004, 2005, 2006, 2007 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
341
341
        text.seek(0)
342
342
 
343
343
        format = bzrdir.BzrDirMetaFormat1()
344
 
        format.repository_format = repository.RepositoryFormatKnit1()
 
344
        format.repository_format = knitrepo.RepositoryFormatKnit1()
345
345
        target = self.make_branch('target', format=format)
346
346
        self.assertRaises(errors.IncompatibleRevision, install_bundle, 
347
347
                          target.repository, read_bundle(text))
353
353
 
354
354
    def bzrdir_format(self):
355
355
        format = bzrdir.BzrDirMetaFormat1()
356
 
        format.repository_format = repository.RepositoryFormatKnit1()
 
356
        format.repository_format = knitrepo.RepositoryFormatKnit1()
357
357
        return format
358
358
 
359
359
    def make_branch_and_tree(self, path, format=None):
901
901
 
902
902
    def bzrdir_format(self):
903
903
        format = bzrdir.BzrDirMetaFormat1()
904
 
        format.repository_format = repository.RepositoryFormatKnit1()
 
904
        format.repository_format = knitrepo.RepositoryFormatKnit1()
905
905
        return format
906
906
 
907
907