Part of bzrlib.hooks View In Hierarchy
| Method | register_lazy_hook | Undocumented |
| Method | iter_parent_objects | Yield (hook_key, (parent_object, attr)) tuples for every registered |
| Method | key_to_parent_and_attribute | Convert a known_hooks key to a (parent_obj, attr) pair. |
Inherited from Registry:
| Method | __init__ | Create a new Registry. |
| Method | register | Register a new object to a name. |
| Method | register_lazy | Register a new object to be loaded on request. |
| Method | get | Return the object register()'ed to the given key. |
| Method | get_prefix | Return an object whose key is a prefix of the supplied value. |
| Method | get_help | Get the help text associated with the given key |
| Method | get_info | Get the extra information associated with the given key |
| Method | remove | Remove a registered entry. |
| Method | __contains__ | Undocumented |
| Method | keys | Get a list of registered entries |
| Method | iteritems | Undocumented |
| Method | items | Undocumented |
| Method | _add_help_and_info | Add the help and information about this key |
| Method | _get_module | Return the module the object will be or was loaded from. |
| Method | _get_key_or_default | Return either 'key' or the default key if key is None |
| Method | _set_default_key | Undocumented |
| Method | _get_default_key | Undocumented |
This is useful for resetting/restoring all the hooks to a known state, as is done in bzrlib.tests.TestCase._clear_hooks.
| Parameters | key | A tuple (module_name, member_name) as found in the keys of the known_hooks registry. |
| Returns | The parent_object of the hook and the name of the attribute on that parent object where the hook is kept. | |