983
983
for feature in getattr(self, '_test_needs_features', []):
984
984
self.requireFeature(feature)
985
985
self._cleanEnvironment()
986
self.overrideAttr(bzrlib.global_state, 'cmdline_overrides',
987
config.CommandLineSection())
986
988
self._silenceUI()
987
989
self._startLogFile()
988
990
self._benchcalls = []
2632
2634
repo = self.make_repository(relpath, format=format)
2633
2635
return repo.bzrdir.create_branch(append_revisions_only=False)
2635
def resolve_format(self, format):
2636
"""Resolve an object to a ControlDir format object.
2638
The initial format object can either already be
2639
a ControlDirFormat, None (for the default format),
2640
or a string with the name of the control dir format.
2642
:param format: Object to resolve
2643
:return A ControlDirFormat instance
2647
if isinstance(format, basestring):
2648
format = bzrdir.format_registry.make_bzrdir(format)
2651
def resolve_format(self, format):
2652
"""Resolve an object to a ControlDir format object.
2654
The initial format object can either already be
2655
a ControlDirFormat, None (for the default format),
2656
or a string with the name of the control dir format.
2658
:param format: Object to resolve
2659
:return A ControlDirFormat instance
2637
def get_default_format(self):
2640
def resolve_format(self, format):
2641
"""Resolve an object to a ControlDir format object.
2643
The initial format object can either already be
2644
a ControlDirFormat, None (for the default format),
2645
or a string with the name of the control dir format.
2647
:param format: Object to resolve
2648
:return A ControlDirFormat instance
2651
format = self.get_default_format()
2663
2652
if isinstance(format, basestring):
2664
2653
format = bzrdir.format_registry.make_bzrdir(format)
2957
2946
# this obviously requires a format that supports branch references
2958
2947
# so check for that by checking bzrdir.BzrDirFormat.get_default_format()
2949
format = self.resolve_format(format=format)
2960
2950
b = self.make_branch(relpath, format=format)
2962
2952
return b.bzrdir.create_workingtree()
4077
4067
'bzrlib.tests.test_smart',
4078
4068
'bzrlib.tests.test_smart_add',
4079
4069
'bzrlib.tests.test_smart_request',
4070
'bzrlib.tests.test_smart_signals',
4080
4071
'bzrlib.tests.test_smart_transport',
4081
4072
'bzrlib.tests.test_smtp_connection',
4082
4073
'bzrlib.tests.test_source',