PATCH: cache basis inventory in .bzr

Aaron Bentley aaron.bentley at utoronto.ca
Mon Dec 19 18:49:09 GMT 2005


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

John A Meinel wrote:
> However, I don't agree that the cached inventory is a WorkingTree
> property. A cache of the last inventory is a property of a branch.
> Because the last time you committed to a branch, it created a revision,
> which you are then caching. 

I think what we care about when working with working tree operations is
that we have access to the basis inventory.  I don't think we care
whether it comes from a branch or not.

> It makes perfect sense to me to have a
> remote branch, which has no working tree, still have a basis inventory.

The use case for a working tree basis inventory is to speed up diff,
status, commit, and the like.  What's the use case for a branch basis
inventory?

> The current/last revision is a property of *both* the working tree and a
> branch. Right now because we have everything pushed together, we don't
> record both separately. Ultimately, I think we'll need 2 records.

Agreed.

> Especially considering checkouts, where there is no branch, and they can
> very easily get out of sync.

But when the checkout gets out of sync, it's more useful to have the
checkout basis inventory than to have the branch basis inventory.  And
of course, it's possible that there is more than one checkout, with some
more up-to-date than others.

> Another way of thinking is what happens when you push to a branch and
> can't update the working tree (because there isn't one).
> I think the basis-inventory should point to the newly pushed revision.

If we need one at all.

> Certainly some of this could be moved around if you convince me that it
> does need to be a WorkingTree property.

Convinced?

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

iD8DBQFDpwCk0F+nu1YWqI0RArZKAJ9G4K2lkerQ/sdJSh4TMrTRLQiAmwCePGQJ
EutZ2f2lDrjV9HGU4xqUcBw=
=Yuv8
-----END PGP SIGNATURE-----




More information about the bazaar mailing list