[RFC] bug in write lock?

John Arbash Meinel john at arbash-meinel.com
Fri Aug 4 03:08:19 BST 2006


Jan Balster wrote:
> Hi all,
> 
> yesterday I noticed a strange behavior of one of my scripts, which
> accesses a bzr branch locally. The reason was that at the same time the
> branch was being updated (a push) over sftp and both (script and sftp
> transport) could acquire a write lock. After reading the code and some
> experiments I wrote this test:
> 

...

> My question now is, is this behavior expected or is it a bug?
> And if it's a feature how can i tell a script to wait until the branch
> is updated?
> 
> Jan

It is a known bug with pre-metadir branches that the local locking is
different than the remote locking. (actually, before 0.9 a single
process can write_lock a branch 2 times, because Linux OS locks do not
block when a process requests more than one on the same file).

Anyway, if you upgrade your branch to any of the meta-dir formats, you
shouldn't have this problem. That has been supported since bzr-0.8.

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/20060803/a1df5957/attachment.pgp 


More information about the bazaar mailing list