/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/mutabletree.py

  • Committer: Ian Clatworthy
  • Date: 2009-09-07 23:14:05 UTC
  • mto: (4634.34.1 integration-2.0)
  • mto: This revision was merged to the branch mainline in revision 4680.
  • Revision ID: ian.clatworthy@canonical.com-20090907231405-5x93io3ghextl7ue
review feedback from Robert: rename finish_commit to post_commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
226
226
            revprops=revprops,
227
227
            possible_master_transports=possible_master_transports,
228
228
            *args, **kwargs)
229
 
        finish_params = FinishCommitHookParams(self)
230
 
        for hook in MutableTree.hooks['finish_commit']:
231
 
            hook(finish_params)
 
229
        post_hook_params = PostCommitHookParams(self)
 
230
        for hook in MutableTree.hooks['post_commit']:
 
231
            hook(post_hook_params)
232
232
        return committed_id
233
233
 
234
234
    def _gather_kinds(self, files, kinds):
586
586
            "hook is able to change the tree before the commit takes place. "
587
587
            "start_commit is called with the bzrlib.mutabletree.MutableTree "
588
588
            "that the commit is being performed on.", (1, 4), None))
589
 
        self.create_hook(hooks.HookPoint('finish_commit',
 
589
        self.create_hook(hooks.HookPoint('post_commit',
590
590
            "Called after a commit is performed on a tree. The hook is "
591
 
            "called with a bzrlib.mutabletree.FinishCommitHookParams object. "
 
591
            "called with a bzrlib.mutabletree.PostCommitHookParams object. "
592
592
            "The mutable tree the commit was performed on is available via "
593
593
            "the mutable_tree attribute of that object.", (2, 0), None))
594
594
 
597
597
MutableTree.hooks = MutableTreeHooks()
598
598
 
599
599
 
600
 
class FinishCommitHookParams(object):
601
 
    """Parameters for the finish_commit hook.
 
600
class PostCommitHookParams(object):
 
601
    """Parameters for the post_commit hook.
602
602
 
603
603
    To access the parameters, use the following attributes:
604
604
 
606
606
    """
607
607
 
608
608
    def __init__(self, mutable_tree):
609
 
        """Create the parameters for the finish_commit hook."""
 
609
        """Create the parameters for the post_commit hook."""
610
610
        self.mutable_tree = mutable_tree
611
611
 
612
612