68
68
def get_branch(self):
69
69
if self.branch is None:
70
self.branch = self.make_branch('')
70
self.branch = self.make_branch('abranch')
73
def get_default_format(self):
74
format = self.bzrdir_format
75
self.assertEquals(format.get_branch_format(), self.branch_format)
73
78
def make_branch(self, relpath, format=None):
74
if format is not None:
75
return TestCaseWithControlDir.make_branch(self, relpath, format)
76
repo = self.make_repository(relpath)
77
# fixme RBC 20060210 this isnt necessarily a fixable thing,
78
# Skipped is the wrong exception to raise.
80
return self.branch_format.initialize(repo.bzrdir)
80
return super(TestCaseWithBranch, self).make_branch(relpath, format)
81
81
except errors.UninitializableFormat:
82
raise tests.TestSkipped('Uninitializable branch format')
84
def make_branch_builder(self, relpath, format=None):
86
format = self.branch_format._matchingbzrdir
87
return super(TestCaseWithBranch, self).make_branch_builder(
88
relpath, format=format)
90
def make_repository(self, relpath, shared=False, format=None):
91
made_control = self.make_bzrdir(relpath, format=format)
92
return made_control.create_repository(shared=shared)
82
raise tests.TestNotApplicable('Uninitializable branch format')
94
84
def create_tree_with_merge(self):
95
85
"""Create a branch with a simple ancestry.