[RFC] Strawman replacement local directory state

Robert Collins robertc at robertcollins.net
Tue Jun 13 17:07:59 BST 2006


I've put a strawman working tree state file format up at
http://bazaar-vcs.org/Classes/WorkingTree.

Its got some interesting aspects, and some things that we might choose
to address...

Its designed as a 'parse it fully every time, and write it fully too,
but make it fast'. format.

It has the basis inventory, merge list and current inventory and
hashcache built in.

This is IMO desirable because most of our operations that need the basis
inventory actually want to to compare_trees on it. We can yield that
*directly* out of the format I am proposing - the basis data is
colocated with the active data, which means a streaming read of the
state file should be able to produce very fast status/diff/commit
results. The suggests that we want methods on working tree to expose the
idea of 'difference from basis' to allow this sort of optimisation to
hook in.

On the down side, having the hashcache built in does mean that updates
to it are more expensive - such as after a diff or status operation. On
the other hand, as we can process this data as we go, we can be building
the replacement state file *during* the diff or status operation.

On the down side again, this does require diff and status to take a
working tree (only the working tree would be needed) write lock, because
they would be updating a file that add/rename/remove would also affect. 

On balance though, I think this should work very well.

Seeking thoughts and hole-finding.

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/20060614/f068e4e5/attachment.pgp 


More information about the bazaar mailing list