Rev 4878: (vila) Fix PQM failures when LC_ALL=C for bug #73073 fix (commit in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Dec 8 18:32:26 GMT 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4878 [merge]
revision-id: pqm at pqm.ubuntu.com-20091208183223-zh0w93eu1m8n7wj7
parent: pqm at pqm.ubuntu.com-20091208115427-mzef85j2qbc0nyu9
parent: v.ladeuil+lp at free.fr-20091208173011-dlkto90jn1ieqbyh
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2009-12-08 18:32:23 +0000
message:
(vila) Fix PQM failures when LC_ALL=C for bug #73073 fix (commit
warns for file-name-like messages)
modified:
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2009-12-07 21:46:28 +0000
+++ b/bzrlib/builtins.py 2009-12-08 17:30:11 +0000
@@ -3067,11 +3067,18 @@
raise errors.LocalRequiresBoundBranch()
if message is not None:
- if osutils.lexists(message):
- warning_msg = ("The commit message is a file"
- " name: \"%(filename)s\".\n"
- "(use --file \"%(filename)s\" to take commit message from"
- " that file)" % { 'filename': message })
+ try:
+ file_exists = os.path.exists(message)
+ except UnicodeError:
+ # The commit message contains unicode characters that can't be
+ # represented in the filesystem encoding, so that can't be a
+ # file.
+ file_exists = False
+ if file_exists:
+ warning_msg = (
+ 'The commit message is a file name: "%(f)s".\n'
+ '(use --file "%(f)s" to take commit message from that file)'
+ % { 'f': message })
ui.ui_factory.show_warning(warning_msg)
def get_message(commit_obj):
More information about the bazaar-commits
mailing list