~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-03-31 16:28:11 UTC
  • mfrom: (5622.3.15 more-lazy-hooks)
  • Revision ID: pqm@pqm.ubuntu.com-20110331162811-w1uw1lgpr5fiawp5
(jelmer) Support installing lazy hooks for all existing hook points,
 deprecate Hooks.create_hook. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1082
1082
 
1083
1083
    def __init__(self):
1084
1084
        """Create the default hooks."""
1085
 
        hooks.Hooks.__init__(self)
1086
 
        self.create_hook(hooks.HookPoint('pre_open',
 
1085
        hooks.Hooks.__init__(self, "bzrlib.bzrdir", "BzrDir.hooks")
 
1086
        self.add_hook('pre_open',
1087
1087
            "Invoked before attempting to open a BzrDir with the transport "
1088
 
            "that the open will use.", (1, 14), None))
1089
 
        self.create_hook(hooks.HookPoint('post_repo_init',
 
1088
            "that the open will use.", (1, 14))
 
1089
        self.add_hook('post_repo_init',
1090
1090
            "Invoked after a repository has been initialized. "
1091
1091
            "post_repo_init is called with a "
1092
1092
            "bzrlib.bzrdir.RepoInitHookParams.",
1093
 
            (2, 2), None))
 
1093
            (2, 2))
1094
1094
 
1095
1095
# install the default hooks
1096
1096
BzrDir.hooks = BzrDirHooks()