Show More
@@ -261,7 +261,10 b' class svnsubrepo(object):' | |||||
261 | cmd = ['svn'] + commands + [self._path] |
|
261 | cmd = ['svn'] + commands + [self._path] | |
262 | cmd = [util.shellquote(arg) for arg in cmd] |
|
262 | cmd = [util.shellquote(arg) for arg in cmd] | |
263 | cmd = util.quotecommand(' '.join(cmd)) |
|
263 | cmd = util.quotecommand(' '.join(cmd)) | |
264 | write, read, err = util.popen3(cmd, newlines=True) |
|
264 | env = dict(os.environ) | |
|
265 | for k in ('LANGUAGE', 'LANG', 'LC_ALL', 'LC_MESSAGES'): | |||
|
266 | env[k] = 'en_US.UTF-8' | |||
|
267 | write, read, err = util.popen3(cmd, env=env, newlines=True) | |||
265 | retdata = read.read() |
|
268 | retdata = read.read() | |
266 | err = err.read().strip() |
|
269 | err = err.read().strip() | |
267 | if err: |
|
270 | if err: |
@@ -39,22 +39,24 b' def _fastsha1(s):' | |||||
39 | import subprocess |
|
39 | import subprocess | |
40 | closefds = os.name == 'posix' |
|
40 | closefds = os.name == 'posix' | |
41 |
|
41 | |||
42 | def popen2(cmd, newlines=False): |
|
42 | def popen2(cmd, env=None, newlines=False): | |
43 | # Setting bufsize to -1 lets the system decide the buffer size. |
|
43 | # Setting bufsize to -1 lets the system decide the buffer size. | |
44 | # The default for bufsize is 0, meaning unbuffered. This leads to |
|
44 | # The default for bufsize is 0, meaning unbuffered. This leads to | |
45 | # poor performance on Mac OS X: http://bugs.python.org/issue4194 |
|
45 | # poor performance on Mac OS X: http://bugs.python.org/issue4194 | |
46 | p = subprocess.Popen(cmd, shell=True, bufsize=-1, |
|
46 | p = subprocess.Popen(cmd, shell=True, bufsize=-1, | |
47 | close_fds=closefds, |
|
47 | close_fds=closefds, | |
48 | stdin=subprocess.PIPE, stdout=subprocess.PIPE, |
|
48 | stdin=subprocess.PIPE, stdout=subprocess.PIPE, | |
49 |
universal_newlines=newlines |
|
49 | universal_newlines=newlines, | |
|
50 | env=env) | |||
50 | return p.stdin, p.stdout |
|
51 | return p.stdin, p.stdout | |
51 |
|
52 | |||
52 | def popen3(cmd, newlines=False): |
|
53 | def popen3(cmd, env=None, newlines=False): | |
53 | p = subprocess.Popen(cmd, shell=True, bufsize=-1, |
|
54 | p = subprocess.Popen(cmd, shell=True, bufsize=-1, | |
54 | close_fds=closefds, |
|
55 | close_fds=closefds, | |
55 | stdin=subprocess.PIPE, stdout=subprocess.PIPE, |
|
56 | stdin=subprocess.PIPE, stdout=subprocess.PIPE, | |
56 | stderr=subprocess.PIPE, |
|
57 | stderr=subprocess.PIPE, | |
57 |
universal_newlines=newlines |
|
58 | universal_newlines=newlines, | |
|
59 | env=env) | |||
58 | return p.stdin, p.stdout, p.stderr |
|
60 | return p.stdin, p.stdout, p.stderr | |
59 |
|
61 | |||
60 | def version(): |
|
62 | def version(): |
General Comments 0
You need to be logged in to leave comments.
Login now