lock-breaking ui
John Arbash Meinel
john at arbash-meinel.com
Sun Feb 26 21:50:18 GMT 2006
James Blackwell wrote:
> On Tue, Feb 21, 2006 at 04:31:10PM +1100, Martin Pool wrote:
>> This is just one case of bad things that can happen if you remove a
>> supposedly stale lock while a client still thinks it has it. Even aside
>> from the problem of that client removing someone else's lock, it can
>> still keep on modifying files while someone else is also doing so,
>> causing havoc.
>>
>> Therefore perhaps we do just have to assume that you only break a lock
>> if you really are sure no one else holds it. This is not perfect, but
>> only the same requirement as cvs and svn (and arch?)
>
> Is reasonably possible to check from time to time to see if our lock is
> still there? For the least, is it possible to check the lock still exists
> during wrapup, to tell the user that he (or someone else at work) may have
> destroyed the branch?
>
Well, under the proposed LockDir design, you check the lock when you
unlock it. (You rename the locked directory out of the way to get an
atomic unlock, and then you can inspect it to make sure it was yours).
It certainly is possible to check (because you can read lock/details.txt
and see if the nonce matches your nonce).
It just depends how we actually want to do it.
John
=:->
-------------- 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/20060226/8196569f/attachment.pgp
More information about the bazaar
mailing list