884
884
made_repo = made_control.create_repository()
885
885
self.failUnless(isinstance(made_repo, repository.Repository))
886
886
self.assertEqual(made_control, made_repo.bzrdir)
888
def test_create_repository_shared(self):
889
# a bzrdir can create a shared repository or
891
if not self.bzrdir_format.is_supported():
892
# unsupported formats are not loopback testable
893
# because the default open will not open them and
894
# they may not be initializable.
896
t = get_transport(self.get_url())
897
made_control = self.bzrdir_format.initialize(t.base)
899
made_repo = made_control.create_repository(shared=True)
900
except errors.IncompatibleFormat:
901
# Old bzrdir formats don't support shared repositories
902
# and should raise IncompatibleFormat
904
self.assertTrue(made_repo.is_shared())
906
def test_create_repository_nonshared(self):
907
# a bzrdir can create a non-shared repository
908
if not self.bzrdir_format.is_supported():
909
# unsupported formats are not loopback testable
910
# because the default open will not open them and
911
# they may not be initializable.
913
t = get_transport(self.get_url())
914
made_control = self.bzrdir_format.initialize(t.base)
915
made_repo = made_control.create_repository(shared=False)
916
self.assertFalse(made_repo.is_shared())
888
918
def test_open_repository(self):
889
919
if not self.bzrdir_format.is_supported():