[MERGE] Tree.revision_tree

John Arbash Meinel john at arbash-meinel.com
Fri Sep 8 15:22:56 BST 2006


Robert Collins wrote:
> Hi,
> * 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)
> 
> 
> Cheers,
> Rob
> 

I like the ability to query WorkingTree for the other trees that it has
cached.

I'd like you to explain why you think it belongs on the root level Tree
object, rather than elsewhere.

Calling it 'Tree.revision_tree' doesn't quite seem right. Especially
when I saw this exception:

class NoSuchRevisionInTree(NoSuchRevision):
    """The revision id %(revision_id)s is not present in the tree
%(tree)s."""

In my mental model, a tree is a snapshot of a specific revision. It
doesn't have other revisions present in its tree.

Now, you could do 'Tree.cached_revision_tree()', and say:

"""The cached tree corresponding to revision id %(revision_id)s is not
available from tree %(trees)"""


It seems like if you are going to add this at the Tree level, then it
should be implemented in RevisionTree(), as calling
self._repository.revision_tree()


So I like the concept, but feel it might need to be rephrased a little bit.

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060908/d7a660c2/attachment.pgp 


More information about the bazaar mailing list