/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/tree.py

Add a new method ``Tree.revision_tree`` which allows access to cached
trees for arbitrary revisions. This allows the in development dirstate
tree format to provide access to the callers to cached copies of 
inventory data which are cheaper to access than inventories from the
repository. (Robert Collins, Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
169
169
    def lock_read(self):
170
170
        pass
171
171
 
 
172
    def revision_tree(self, revision_id):
 
173
        """Obtain a revision tree for the revision revision_id.
 
174
 
 
175
        The intention of this method is to allow access to possibly cached
 
176
        tree data. Implementors of this method should raise NoSuchRevision if
 
177
        the tree is not locally available, even if they could obtain the 
 
178
        tree via a repository or some other means. Callers are responsible 
 
179
        for finding the ultimate source for a revision tree.
 
180
 
 
181
        :param revision_id: The revision_id of the requested tree.
 
182
        :return: A Tree.
 
183
        :raises: NoSuchRevision if the tree cannot be obtained.
 
184
        """
 
185
        raise errors.NoSuchRevisionInTree(self, revision_id)
 
186
 
172
187
    def unknowns(self):
173
188
        """What files are present in this tree and unknown.
174
189