[MERGE] Tree.revision_tree
Robert Collins
robertc at robertcollins.net
Tue Sep 12 00:03:35 BST 2006
On Mon, 2006-09-11 at 13:59 -0400, Aaron Bentley wrote:
> -----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.
I dont really like the depth of handshaking we're getting into here:
every call to repository.revision_trees() is going to have to ask an
arbitrary number of trees for their *current* set of cached tree data.
Not very scalable IMO.
At this point, given there are no callers doing the try:
aTree.revision_tree(); except: myrepository.revision_tree() dance, I am
very unsure its needed.
Also, consider what to do when we have two repositories open, and a
working tree from one is registered with the other (so that its cached
inventory is accessible), but its content access should come from which
repository ? Meep.
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060912/409cf432/attachment.pgp
More information about the bazaar
mailing list