~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: John Arbash Meinel
  • Date: 2009-06-10 04:13:07 UTC
  • mto: This revision was merged to the branch mainline in revision 4577.
  • Revision ID: john@arbash-meinel.com-20090610041307-s8ferbew1o9y9wbk
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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
 
172
172
        if not diff_opts:
173
173
            diff_opts = []
 
174
        if sys.platform == 'win32':
 
175
            # Popen doesn't do the proper encoding for external commands
 
176
            # Since we are dealing with an ANSI api, use mbcs encoding
 
177
            old_filename = old_filename.encode('mbcs')
 
178
            new_filename = old_filename.encode('mbcs')
174
179
        diffcmd = ['diff',
175
180
                   '--label', old_filename,
176
181
                   old_abspath,