[RFC] external diff on win32 and locale
Alexander Belchenko
bialix at ukr.net
Fri Dec 22 13:24:38 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
There are 2 tests for external diff that failed on win32
if gettext library installed:
test_diff.TestDiff.test_external_diff_binary_lang_c ERROR
129ms
external diff failed with exit code 2; command: ['diff', '--label', 'old',
'c:\\docume~1\\modul98\\locals~1\\temp\\bzr-diff-old-wuhbly', '--label', 'new',
'c:\\docume~1\\modul98\\locals~1\\temp\\bzr-diff-new--qepfs', '--binary', '-u']
test_diff.TestDiffFiles.test_external_diff_binary ERROR
440ms
external diff failed with exit code 2; command: ['diff', '--label', 'old',
'c:\\docume~1\\modul98\\locals~1\\temp\\bzr-diff-old-2neogw', '--label', 'new',
'c:\\docume~1\\modul98\\locals~1\\temp\\bzr-diff-new-nk4wyp', '--binary', '-u']
IIRC Vincent try to address this problem,
but I don't remember what result of review of his patch.
I'm quickly looking at gettext sources (from http://gnuwin32.sf.net project)
and see in comments:
/* Determine the user's language preferences, as a colon separated list of
locale names in XPG syntax
language[_territory[.codeset]][@modifier]
The result must not be freed; it is statically allocated.
The LANGUAGE environment variable does not need to be considered; it is
already taken into account by the caller. */
This is from the code related to MacOs support but I try to check
$LANGUAGE environment variable. And it really works, i.e. diff
response for this variable and switch from my language (russian)
to english:
$ set LANGUAGE=C
$ python bzr --no-plugins selftest -v test_external_diff_binary
test_diff.TestDiff.test_external_diff_binary_lang_c OK
110ms
test_diff.TestDiffFiles.test_external_diff_binary FAIL
430ms
['Files old and new differ\r\n', '\n'] != ['Files old and new differ\n', '\n']
So, I think our current support of external diff need to be
adjusted for win32.
Does my analysis correct?
Alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFi9yWzYr338mxwCURAmc2AKCE4gFp/dUTLxufHjEjk8O/A4eM3gCgko5x
5LnLfns6R6Lscg0Q3eOA6Zo=
=N8yq
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list