Comment 33 for bug 680529

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 680529] Re: "Lock was renamed into place, but now is missing"

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/9/2011 11:37 AM, Barney Gwyther wrote:
> Coincidentally, a colleague and I sat down and had a bit of a look at
> this yesterday. We narrowed the problem down to the commit part of qbzr
> too.
>
> It appears to be related to some functionality around qbzr trying to
> populate the commit message text box: if you attempted a commit
> previously but failed, that commit message gets written to a variable
> called 'message' in branch.conf. The lock issue seems to be around
> updating that file (either to remove the message on successful commit or
> to add the message on commit failure).
>
> Commenting out line 724 (self._save_or_wipe_commit_data()) and line 720
> (self._save_or_wipe_commit_data()) of plugins\qbzr\lib\commit.py appears
> to eliminate the problem for me. Of course, I lose the functionality
> that stores my commit message between failed commits but this is
> something I can live with easier than the locking issue.
>
> Please note that I'm not especially proficient with Python nor am I
> familiar with the bazaar or qbzr source. The change I made may well have
> an undesirable impact elsewhere!
>
> Fingers crossed that's useful and if there's anything else I can do to
> help please let me know.
>

If this is the cause, then probably the other open question is why qbzr
isn't sharing the branch lock. My guess is that qbzr is asynchronously
performing the commit via a subprocess, and then going on to update
branch.conf. Recently we changed the bzrlib code, so that updates to
config files take a write lock on the branch, so that you don't get
concurrent writes overwriting eachother. I'm guessing the qbzr was
assuming it could write to the .conf file without a lock (which used to
be the case.)

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3wn7IACgkQJdeBCYSNAANF6gCfT0BcQM1AVojvnYBrlqkMQa+G
7d0An2uFyg/5i2fPSbxuD6IbP8Cato1e
=i9JW
-----END PGP SIGNATURE-----