~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/mutabletree.py

  • Committer: Jelmer Vernooij
  • Date: 2011-04-05 13:58:33 UTC
  • mfrom: (5757 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5770.
  • Revision ID: jelmer@samba.org-20110405135833-lzphu3vh7vzubiz9
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    osutils,
34
34
    revisiontree,
35
35
    inventory,
36
 
    symbol_versioning,
37
36
    trace,
38
37
    tree,
39
38
    )
652
651
        """Create the default hooks.
653
652
 
654
653
        """
655
 
        hooks.Hooks.__init__(self)
656
 
        self.create_hook(hooks.HookPoint('start_commit',
 
654
        hooks.Hooks.__init__(self, "bzrlib.mutabletree", "MutableTree.hooks")
 
655
        self.add_hook('start_commit',
657
656
            "Called before a commit is performed on a tree. The start commit "
658
657
            "hook is able to change the tree before the commit takes place. "
659
658
            "start_commit is called with the bzrlib.mutabletree.MutableTree "
660
 
            "that the commit is being performed on.", (1, 4), None))
661
 
        self.create_hook(hooks.HookPoint('post_commit',
 
659
            "that the commit is being performed on.", (1, 4))
 
660
        self.add_hook('post_commit',
662
661
            "Called after a commit is performed on a tree. The hook is "
663
662
            "called with a bzrlib.mutabletree.PostCommitHookParams object. "
664
663
            "The mutable tree the commit was performed on is available via "
665
 
            "the mutable_tree attribute of that object.", (2, 0), None))
 
664
            "the mutable_tree attribute of that object.", (2, 0))
666
665
 
667
666
 
668
667
# install the default hooks into the MutableTree class.