Dirstate and smart server current thoughts

Robert Collins robertc at robertcollins.net
Mon Feb 12 12:35:41 GMT 2007


Andrew and I spent today working on the smart server and dirstate. I
hope that this email will keep any of you hacking on these up to date
with whats gone into the mainline.

First the smart server - we now have LockDir able to create locks and
exit without releasing them, and to connect to already locked
directories.  This is important as it allows us to have the smart server
take out locks for us, removing lots of latency (locking is expensive),
and allowing us to not deadlock when the client has locked a branch, and
then asks for a mutating method from the smart server. To finish this,
the next bit of code that needs to be written is tests for making
'leave_lock_in_place' and 'dont_leave_lock_in_place' exposed on
Repository, followed by a smart server method to lock a repository, then
a RemoteRepository call to use this, and cache the resulting token
locally; and finally to lock the self._real_repository using that token
when self._real_repository is set. Following that Branch will grow the
same pattern of code, and then the branch test for doing mutation with a
locked branch should work.

Dirstate is coming along well. Today I got all the existing dirstate
tests working, including the high level tests for getting revision trees
from a dirstate. I haven't profiled this against the xml deserialiser
yet - I plan to do so tomorrow. At this point, running './bzr selftest
WorkingTreeFormat4' is a good way to run dirstate tests, and currently
fails in a call to tree.add() - which suggests that one of the more
sparse dirstate method (add) needs additional tests - specifically it
needs to be more user friendly, and handle adding directories and
symlinks, neither of which I've made it do yet.

I'd *love* folk to dive into the dirstate stuff, I think it is clean
enough now that doing so should be easy.

Cheers,
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: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070212/6cac66f6/attachment.pgp 


More information about the bazaar mailing list