80
80
# used on media which doesn't differentiate the case of names.
81
81
self.case_sensitive = True
83
def is_control_filename(self, filename):
84
"""True if filename is the name of a control file in this tree.
86
:param filename: A filename within the tree. This is a relative path
87
from the root of this tree.
89
This is true IF and ONLY IF the filename is part of the meta data
90
that bzr controls in this tree. I.E. a random .bzr directory placed
91
on disk will not be a control file for this tree.
93
raise NotImplementedError(self.is_control_filename)
95
83
@needs_tree_write_lock
96
84
def add(self, files, ids=None, kinds=None):
97
85
"""Add paths to the set of versioned paths.
652
640
"""Create the default hooks.
655
hooks.Hooks.__init__(self, "bzrlib.mutabletree", "MutableTree.hooks")
656
self.add_hook('start_commit',
643
hooks.Hooks.__init__(self)
644
self.create_hook(hooks.HookPoint('start_commit',
657
645
"Called before a commit is performed on a tree. The start commit "
658
646
"hook is able to change the tree before the commit takes place. "
659
647
"start_commit is called with the bzrlib.mutabletree.MutableTree "
660
"that the commit is being performed on.", (1, 4))
661
self.add_hook('post_commit',
648
"that the commit is being performed on.", (1, 4), None))
649
self.create_hook(hooks.HookPoint('post_commit',
662
650
"Called after a commit is performed on a tree. The hook is "
663
651
"called with a bzrlib.mutabletree.PostCommitHookParams object. "
664
652
"The mutable tree the commit was performed on is available via "
665
"the mutable_tree attribute of that object.", (2, 0))
653
"the mutable_tree attribute of that object.", (2, 0), None))
668
656
# install the default hooks into the MutableTree class.