~bzr/ubuntu/maverick/bzr/beta-ppa

« back to all changes in this revision

Viewing changes to bzrlib/mutabletree.py

Merge from main PPA.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
See MutableTree for more details.
20
20
"""
21
21
 
 
22
from __future__ import absolute_import
22
23
 
23
24
from bzrlib.lazy_import import lazy_import
24
25
lazy_import(globals(), """
71
72
    conformance tests for - rather we are testing MemoryTree specifically, and
72
73
    interface testing implementations of WorkingTree.
73
74
 
74
 
    A mutable tree always has an associated Branch and BzrDir object - the
 
75
    A mutable tree always has an associated Branch and ControlDir object - the
75
76
    branch and bzrdir attributes.
76
77
    """
77
78
    def __init__(self, *args, **kw):
519
520
            "called with a bzrlib.mutabletree.PostCommitHookParams object. "
520
521
            "The mutable tree the commit was performed on is available via "
521
522
            "the mutable_tree attribute of that object.", (2, 0))
522
 
 
 
523
        self.add_hook('pre_transform',
 
524
            "Called before a tree transform on this tree. The hook is called "
 
525
            "with the tree that is being transformed and the transform.",
 
526
            (2, 5))
 
527
        self.add_hook('post_build_tree',
 
528
            "Called after a completely new tree is built. The hook is "
 
529
            "called with the tree as its only argument.", (2, 5))
 
530
        self.add_hook('post_transform',
 
531
            "Called after a tree transform has been performed on a tree. "
 
532
            "The hook is called with the tree that is being transformed and "
 
533
            "the transform.",
 
534
            (2, 5))
523
535
 
524
536
# install the default hooks into the MutableTree class.
525
537
MutableTree.hooks = MutableTreeHooks()