33
33
known_hooks = registry.Registry()
34
# known_hooks registry contains
35
# tuple of (module, member name) which is the hook point
36
# module where the specific hooks are defined
37
# callable to get the empty specific Hooks for that attribute
34
38
known_hooks.register_lazy(('bzrlib.branch', 'Branch.hooks'), 'bzrlib.branch',
36
40
known_hooks.register_lazy(('bzrlib.bzrdir', 'BzrDir.hooks'), 'bzrlib.bzrdir',
38
42
known_hooks.register_lazy(('bzrlib.commands', 'Command.hooks'),
39
43
'bzrlib.commands', 'CommandHooks')
44
known_hooks.register_lazy(('bzrlib.info', 'hooks'),
45
'bzrlib.info', 'InfoHooks')
40
46
known_hooks.register_lazy(('bzrlib.lock', 'Lock.hooks'), 'bzrlib.lock',
48
known_hooks.register_lazy(('bzrlib.msgeditor', 'hooks'), 'bzrlib.msgeditor',
42
50
known_hooks.register_lazy(('bzrlib.mutabletree', 'MutableTree.hooks'),
43
51
'bzrlib.mutabletree', 'MutableTreeHooks')
44
52
known_hooks.register_lazy(('bzrlib.smart.client', '_SmartClient.hooks'),
45
53
'bzrlib.smart.client', 'SmartClientHooks')
46
54
known_hooks.register_lazy(('bzrlib.smart.server', 'SmartTCPServer.hooks'),
47
55
'bzrlib.smart.server', 'SmartServerHooks')
56
known_hooks.register_lazy(
57
('bzrlib.version_info_formats.format_rio', 'RioVersionInfoBuilder.hooks'),
58
'bzrlib.version_info_formats.format_rio', 'RioVersionInfoBuilderHooks')
59
known_hooks.register_lazy(
60
('bzrlib.merge_directive', '_BaseMergeDirective.hooks'),
61
'bzrlib.merge_directive', 'MergeDirectiveHooks')
50
64
def known_hooks_key_to_object((module_name, member_name)):
167
181
:ivar introduced: A version tuple specifying what version the hook was
168
182
introduced in. None indicates an unknown version.
169
183
:ivar deprecated: A version tuple specifying what version the hook was
170
deprecated or superceded in. None indicates that the hook is not
171
superceded or deprecated. If the hook is superceded then the doc
184
deprecated or superseded in. None indicates that the hook is not
185
superseded or deprecated. If the hook is superseded then the doc
172
186
should describe the recommended replacement hook to register for.
173
187
:ivar doc: The docs for using the hook.