929
929
format = controldir.ControlDirFormat.get_default_format()
930
930
return format.initialize_on_transport(t)
932
def get_branch_transport(self, branch_format, name=None):
933
"""Get the transport for use by branch format in this BzrDir.
935
Note that bzr dirs that do not support format strings will raise
936
IncompatibleFormat if the branch format they are given has
937
a format string, and vice versa.
939
If branch_format is None, the transport is returned with no
940
checking. If it is not None, then the returned transport is
941
guaranteed to point to an existing directory ready for use.
943
raise NotImplementedError(self.get_branch_transport)
945
def get_repository_transport(self, repository_format):
946
"""Get the transport for use by repository format in this BzrDir.
948
Note that bzr dirs that do not support format strings will raise
949
IncompatibleFormat if the repository format they are given has
950
a format string, and vice versa.
952
If repository_format is None, the transport is returned with no
953
checking. If it is not None, then the returned transport is
954
guaranteed to point to an existing directory ready for use.
956
raise NotImplementedError(self.get_repository_transport)
958
def get_workingtree_transport(self, tree_format):
959
"""Get the transport for use by workingtree format in this BzrDir.
961
Note that bzr dirs that do not support format strings will raise
962
IncompatibleFormat if the workingtree format they are given has a
963
format string, and vice versa.
965
If workingtree_format is None, the transport is returned with no
966
checking. If it is not None, then the returned transport is
967
guaranteed to point to an existing directory ready for use.
969
raise NotImplementedError(self.get_workingtree_transport)
933
972
class BzrDirHooks(hooks.Hooks):
934
973
"""Hooks for BzrDir operations."""