subrepo: make svn use C locale for portability
authorPatrick Mezard <pmezard@gmail.com>
Thu, 21 Jan 2010 15:13:03 +0100
changeset 10271 9b38bec5dc29
parent 10270 c2e27f7966a7
child 10272 886858b834da
subrepo: make svn use C locale for portability My reasons to do c2e2a5e6c36b were wrong. We want to have non-localized svn output while preserving current locale for input arguments and svn internals. This is achieved by setting LC_MESSAGE=C.
mercurial/subrepo.py
--- a/mercurial/subrepo.py	Wed Jan 20 16:58:48 2010 +0100
+++ b/mercurial/subrepo.py	Thu Jan 21 15:13:03 2010 +0100
@@ -265,8 +265,8 @@
         cmd = [util.shellquote(arg) for arg in cmd]
         cmd = util.quotecommand(' '.join(cmd))
         env = dict(os.environ)
-        for k in ('LANGUAGE', 'LANG', 'LC_ALL', 'LC_MESSAGES'):
-            env[k] = 'en_US.UTF-8'
+        # Avoid localized output, preserve current locale for everything else.
+        env['LC_MESSAGES'] = 'C'
         write, read, err = util.popen3(cmd, env=env, newlines=True)
         retdata = read.read()
         err = err.read().strip()