Partially predictable temporary logfile name

Magnus Therning magnus at therning.org
Thu Nov 24 14:45:29 GMT 2005


I'd like my editor to recognise when it's loading a bzr temporary
logfile (the kind that's created when I invoke 'bzr ci'). The following
change does that:

=== modified file 'bzrlib/msgeditor.py'
--- bzrlib/msgeditor.py
+++ bzrlib/msgeditor.py
@@ -79,7 +79,7 @@
         ignoreline = "-- This line and the following will be ignored --"

     try:
-        tmp_fileno, msgfilename = tempfile.mkstemp()
+        tmp_fileno, msgfilename = tempfile.mkstemp(prefix='bzr_log.', dir='.')
         msgfile = os.close(tmp_fileno)
         if infotext is not None and infotext != "":
             hasinfo = True


/M

-- 
Magnus Therning                    (OpenPGP: 0xAB4DFBA4)
magnus at therning.org
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

Unfortunately, the current generation of mail programs do not have
checkers to see if the sender knows what he is talking about.
     -- A.S. Tanenbaum
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051124/12536bcc/attachment.pgp 


More information about the bazaar mailing list