Rev 4950: (mbp) better message when failing to start message editor in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Jan 12 07:32:42 GMT 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4950 [merge]
revision-id: pqm at pqm.ubuntu.com-20100112073241-u9oi9nbq4og7senr
parent: pqm at pqm.ubuntu.com-20100112044954-w246gmu9iakzb95j
parent: mbp at sourcefrog.net-20100112043216-v8ln69zh9ynihryv
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2010-01-12 07:32:41 +0000
message:
(mbp) better message when failing to start message editor
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/msgeditor.py msgeditor.py-20050901111708-ef6d8de98f5d8f2f
=== modified file 'NEWS'
--- a/NEWS 2010-01-11 13:15:01 +0000
+++ b/NEWS 2010-01-12 04:32:16 +0000
@@ -39,6 +39,10 @@
Bug Fixes
*********
+* Always show a message if an OS error occurs while trying to run a
+ user-specified commit message editor.
+ (Martin Pool, #504842)
+
* ``bzr export dir`` now requests all file content as a record stream,
rather than requsting the file content one file-at-a-time. This can make
exporting over the network significantly faster (54min => 9min in one
=== modified file 'bzrlib/msgeditor.py'
--- a/bzrlib/msgeditor.py 2009-11-17 23:05:04 +0000
+++ b/bzrlib/msgeditor.py 2010-01-12 04:31:02 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2006 Canonical Ltd
+# Copyright (C) 2005, 2006, 2009 Canonical Ltd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -63,22 +63,14 @@
## mutter("trying editor: %r", (edargs +[filename]))
x = call(edargs + [filename])
except OSError, e:
- # We're searching for an editor, so catch safe errors and continue
- # errno 193 is ERROR_BAD_EXE_FORMAT on Windows. Python2.4 uses the
- # winerror for errno. Python2.5+ use errno ENOEXEC and set winerror
- # to 193. However, catching 193 here should be fine. Other
- # platforms aren't likely to have that high of an error. And even
- # if they do, it is still reasonable to fall back to the next
- # editor.
- if e.errno in (errno.ENOENT, errno.EACCES, errno.ENOEXEC, 193):
- if candidate_source is not None:
- # We tried this editor because some user configuration (an
- # environment variable or config file) said to try it. Let
- # the user know their configuration is broken.
- trace.warning(
- 'Could not start editor "%s" (specified by %s): %s\n'
- % (candidate, candidate_source, str(e)))
- continue
+ if candidate_source is not None:
+ # We tried this editor because some user configuration (an
+ # environment variable or config file) said to try it. Let
+ # the user know their configuration is broken.
+ trace.warning(
+ 'Could not start editor "%s" (specified by %s): %s\n'
+ % (candidate, candidate_source, str(e)))
+ continue
raise
if x == 0:
return True
More information about the bazaar-commits
mailing list