934
934
class BzrDirHooks(hooks.Hooks):
935
935
"""Hooks for BzrDir operations."""
937
def __init__(self, module_name, member_name):
938
938
"""Create the default hooks."""
939
hooks.Hooks.__init__(self)
940
self.create_hook(hooks.HookPoint('pre_open',
939
hooks.Hooks.__init__(self, module_name, member_name)
940
self.add_hook('pre_open',
941
941
"Invoked before attempting to open a BzrDir with the transport "
942
"that the open will use.", (1, 14), None))
943
self.create_hook(hooks.HookPoint('post_repo_init',
942
"that the open will use.", (1, 14))
943
self.add_hook('post_repo_init',
944
944
"Invoked after a repository has been initialized. "
945
945
"post_repo_init is called with a "
946
946
"bzrlib.bzrdir.RepoInitHookParams.",
949
949
# install the default hooks
950
BzrDir.hooks = BzrDirHooks()
950
BzrDir.hooks = BzrDirHooks("bzrlib.bzrdir", "BzrDir.hooks")
953
953
class RepoInitHookParams(object):