"bzr status" fails due to lock by "bzr commit"

John Arbash Meinel john at arbash-meinel.com
Fri Jan 8 22:54:41 GMT 2010


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

Eli Zaretskii wrote:
>> Date: Tue, 05 Jan 2010 14:08:50 -0600
>> From: John Arbash Meinel <john at arbash-meinel.com>
>> CC: robertc at robertcollins.net, bazaar at lists.canonical.com
>>
>>>> If you want to give it a try, this patch should do:
>>>> === modified file 'bzrlib/msgeditor.py'
>>>> - --- bzrlib/msgeditor.py 2009-03-23 14:59:43 +0000
>>>> +++ bzrlib/msgeditor.py 2010-01-05 04:24:02 +0000
>>> Thanks, but unfortunately I can't, at least not without some help: I
>>> installed Bazaar with a stand-alone Windows installer, which is
>>> probably the reason why I don't see msgeditor.py anywhere on my disk.
>>>
>>> I could probably download Bazaar sources and patch msgeditor.py there,
>>> but is there a way to tell bzr to use that msgeditor.py instead of
>>> whatever binary form of it lives on my machine?
>>> (library.zip:msgeditor.pyo, is that right?)
>>>
>>> Thanks.
>>>
>> I think if you opened library.zip in a zip utility, and then deleted
>> msgeditor.pyo and added msgeditor.py it would use the patched form.
> 
> Sorry for a long delay, I only have weekends to work on this.
> 
> I tried your suggestion, but it didn't work, unfortunately: the
> bzr_log.* files are still created in the directory where I run
> "bzr ci".  Which is strange, since the documentation of
> tempfile.mkstemp seems to say that omitting dir= should have caused
> mkstemp to use one of the temporary directories.  I do have TEMP, TMP,
> and TMPDIR set in the environment.
> 
> What's even more strange, commenting out that line causes bzr to pop
> and empty buffer in Emacs, i.e. the part that says
> 
>   -------------- This line and the following will be ignored --------------
> 
>   modified:
>     src/emacs.c
> 
> is not there.
> 
> What am I doing wrong?  Replacing msgeditor.pyo in library.zip does
> work: if I restore the commented out line and update library.zip with
> msgeditor.py that is identical to the original one, the buffer popped
> in Emacs again has the above text that shows files to be committed.
> What else could I have screwed up?
> 
> TIA
> 

Sorry I missed one of the other key bits. Namely:
    tmp_fileno, msgfilename = tempfile.mkstemp(prefix='bzr_log.',
                                               dir='.',
                                               text=True)
    msgfilename = osutils.basename(msgfilename)

^- That second line changes the code to only return the relative path of
the temporary file. So what you want to end up with is:
    tmp_fileno, msgfilename = tempfile.mkstemp(prefix='bzr_log.',
#                                               dir='.',
                                               text=True)
#    msgfilename = osutils.basename(msgfilename)


John
=:->

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

iEYEARECAAYFAktHt7EACgkQJdeBCYSNAAPyFACfbyxU/MKol9ExKswcmoMqfB/T
GusAoMktsaDoFRN0rOKQ5IUnsqcGNHVD
=Cxij
-----END PGP SIGNATURE-----



More information about the bazaar mailing list