lightweight checkouts of readonly branches #39542
John Arbash Meinel
john at arbash-meinel.com
Tue Jul 11 20:18:29 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v220.127.116.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar