[MERGE] Remove interdependency between WorkingTree and RevisionTree

Robert Collins robertc at robertcollins.net
Mon Jul 17 14:19:25 BST 2006


On Mon, 2006-07-17 at 08:04 -0500, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----

> > 
> >> Separately, I suggest that rather than just using the inventory *IF*
> >> supplied, you also emit a deprecation warning, so that supplying the
> >> inventory is the expected behaviour, and we can move to having no if
> >> block there eventually.
> > Ok, makes sense.
> 
> I don't think I agree that supplying the inventory is expected.
> *Most* of the time when you are getting a RevisionTree, you are
> expecting the repository to have all the information. (The inventory,
> the revision information, etc).
> It so happens that we allow caching 1 inventory inside the working tree,
> because it is referred to often, and extracting it from Weaves was very
> slow. I don't know if we've benchmarked the speed for knits. But it
> doesn't really matter as much... The next format is going to have it on
> disk as well.
> 
> Anyway, long ramble to say that this is the only case where you know the
> inventory *before* you have the RevisionTree. And only because the
> working tree is caching it.

I dont think conflating the interface of RevisionTree with how clients
create one is useful.

Most (all?) RevisionTree instances are created from Repository instances
via .revision_tree(revid). Or the new streaming one Aaron created. And
that means that only one place has the questionable burden of creating
an Inventory to give to the RevisionTree. I dont see any reason to make
it optional, except perhaps because of demand loading plans - which I
have not got a firm handle on yet - I'm just working on the .compare
method at the moment.

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/20060717/b25854b7/attachment.pgp 


More information about the bazaar mailing list