2634
2634
repo = self.make_repository(relpath, format=format)
2635
2635
return repo.bzrdir.create_branch(append_revisions_only=False)
2637
def resolve_format(self, format):
2638
"""Resolve an object to a ControlDir format object.
2640
The initial format object can either already be
2641
a ControlDirFormat, None (for the default format),
2642
or a string with the name of the control dir format.
2644
:param format: Object to resolve
2645
:return A ControlDirFormat instance
2649
if isinstance(format, basestring):
2650
format = bzrdir.format_registry.make_bzrdir(format)
2653
def resolve_format(self, format):
2654
"""Resolve an object to a ControlDir format object.
2656
The initial format object can either already be
2657
a ControlDirFormat, None (for the default format),
2658
or a string with the name of the control dir format.
2660
:param format: Object to resolve
2661
: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()
2665
2652
if isinstance(format, basestring):
2666
2653
format = bzrdir.format_registry.make_bzrdir(format)
2959
2946
# this obviously requires a format that supports branch references
2960
2947
# so check for that by checking bzrdir.BzrDirFormat.get_default_format()
2949
format = self.resolve_format(format=format)
2962
2950
b = self.make_branch(relpath, format=format)
2964
2952
return b.bzrdir.create_workingtree()