Rev 4423: Possibly fix for bug #382709 handling non-ascii external filenames. in http://bazaar.launchpad.net/~jameinel/bzr/1.16-external_diff_encoded-382709
John Arbash Meinel
john at arbash-meinel.com
Wed Jun 10 05:13:51 BST 2009
At http://bazaar.launchpad.net/~jameinel/bzr/1.16-external_diff_encoded-382709
------------------------------------------------------------
revno: 4423
revision-id: john at arbash-meinel.com-20090610041307-s8ferbew1o9y9wbk
parent: pqm at pqm.ubuntu.com-20090609154318-hfu5yjpsck9zgg7r
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.16-external_diff_encoded-382709
timestamp: Tue 2009-06-09 23:13:07 -0500
message:
Possibly fix for bug #382709 handling non-ascii external filenames.
This only works if the filenames can be handled in ANSI encoding, but
that is better than not handling them at all.
-------------- next part --------------
=== modified file 'bzrlib/diff.py'
--- a/bzrlib/diff.py 2009-06-03 05:44:18 +0000
+++ b/bzrlib/diff.py 2009-06-10 04:13:07 +0000
@@ -171,6 +171,11 @@
if not diff_opts:
diff_opts = []
+ if sys.platform == 'win32':
+ # Popen doesn't do the proper encoding for external commands
+ # Since we are dealing with an ANSI api, use mbcs encoding
+ old_filename = old_filename.encode('mbcs')
+ new_filename = old_filename.encode('mbcs')
diffcmd = ['diff',
'--label', old_filename,
old_abspath,
More information about the bazaar-commits
mailing list