[RFC] Strawman replacement local directory state

John Arbash Meinel john at arbash-meinel.com
Tue Jun 13 17:50:23 BST 2006


Robert Collins wrote:
>

...

> 
> 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.

While we are talking about strawmen, what about using an sqlite db for
the dirstate.
It supports locking, transactions, indexed lookups. If we design the
schema well, we should be able to get very good performance.
The parser is written in C, so we decrease the python overhead.
It should be very easy to get subset information (select * from files
where parent_dir = '/this/dir').

Because we are using the db only for the local dirstate, we aren't
committing anything to the archive which is a binary blob. Also, the
schema can be very simple, since it only needs to hold the current
information.

We aren't limited by not being able to connect to a remote sqlite db,
unless we want to resurrect creating working dirs on remote machines.

John
=:->

> 
> 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
> 
> 
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060613/a1be7719/attachment.pgp 


More information about the bazaar mailing list