64
64
class TestCaseWithTree(TestCaseWithBzrDir):
66
def make_branch_and_tree(self, relpath, format=None):
67
made_control = self.make_bzrdir(relpath, format=format)
66
def make_branch_and_tree(self, relpath):
67
made_control = self.make_bzrdir(relpath, format=
68
self.workingtree_format._matchingbzrdir)
68
69
made_control.create_repository()
69
70
made_control.create_branch()
70
71
return self.workingtree_format.initialize(made_control)
72
def get_tree_no_parents_no_content(self):
73
# make a working tree with the right shape
74
tree = self.make_branch_and_tree('.')
73
def get_tree_no_parents_no_content(self, empty_tree, converter=None):
74
"""Make a tree with no parents and no contents from empty_tree.
76
:param empty_tree: A working tree with no content and no parents to
75
79
# convert that to the final shape
76
return self.workingtree_to_test_tree(tree)
81
converter = self.workingtree_to_test_tree
82
return converter(empty_tree)
79
85
class TreeTestProviderAdapter(WorkingTreeTestProviderAdapter):