[MERGE] Tree.revision_tree

Aaron Bentley aaron.bentley at utoronto.ca
Mon Sep 11 18:59:42 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Arbash Meinel wrote:
> Aaron Bentley wrote:
> 
> 
>>That was what I meant, yes.  Maybe as a weakref, so that the cache
>>doesn't get too greedy.
> 
> 
> You mean in case the WorkingTree dies before the Repository?

Right.  This would be more of an issue for long-running clients.

>>Well, if revision_trees is the most efficient API, let's support that,
>>by all means.  But instead of raising NoSuchRevision (as
>>Repository.revision_trees does), we'd just return the revision_trees
>>that could be found.  (Maybe list the missing ones, but that can also be
>>calculated easily.)
> 
> It would seem reasonable enough for WorkingTree._revision_trees to
> return a dict from revision_id => RevisionTree, and unavailable ones are
> either not present, or None.

I think the most convenient option would be to return a list of missing
revisions.  But it would also be nice to return a dict, where
unavailable trees are not present.  You can easily turn the keys into a
set and find out what was missing.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFFBaQO0F+nu1YWqI0RAq2NAJ47Sw5Ae8joxQ87ZBV9dwWXT5qdLgCfaR4c
VopGq00U1qZvI3JXzOZab/4=
=QtXq
-----END PGP SIGNATURE-----




More information about the bazaar mailing list