lightweight checkouts of readonly branches #39542

John Arbash Meinel john at
Tue Jul 11 20:18:29 BST 2006

Hash: SHA1

I looked into this bug because it is marked Critical.

However, things aren't as simple as we would like. It is relatively
simple to change bind() so that we can create a heavyweight checkout of
a readonly branch.
Either with Robert's suggestion that 'bind' never update the remote
tree. Or with my preference 'bind' doesn't try if they are up-to-date.
And gives a better warning if you are out of date. (Still lets you bind,
but warns that other is out-of-date).

That just takes a local fix to 'Branch.bind()' which is easy to implement.

The problem with --lightweight checkouts (which is probably what people
really want) is that to create a WorkingTree, we want to lock the
working tree. Which wants to lock the Branch. And since the remote
branch is the only one we've got, it breaks.

We could update to a new api which wouldn't try to lock the branch
(lock_only_self_write()). However, I think it is reasonable to lock the
Branch when updating the working tree. It might be good to fallback to a
readonly lock in this instance, though.

Anyway, it is something that needs to be discussed, since it is not a
trivial implementation.

Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


More information about the bazaar mailing list