Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: tools/utils.py

Issue 17397005: Bugfix for tools/utils.py: Inherit environment to cmd.exe. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 # This file contains a set of utilities functions used by other Python-based 5 # This file contains a set of utilities functions used by other Python-based
6 # scripts. 6 # scripts.
7 7
8 import commands 8 import commands
9 import os 9 import os
10 import platform 10 import platform
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 def GetVersion(): 233 def GetVersion():
234 dartbin = DartBinary() 234 dartbin = DartBinary()
235 version_script = VersionScript() 235 version_script = VersionScript()
236 p = subprocess.Popen([dartbin, version_script], stdout = subprocess.PIPE, 236 p = subprocess.Popen([dartbin, version_script], stdout = subprocess.PIPE,
237 stderr = subprocess.STDOUT, shell=IsWindows()) 237 stderr = subprocess.STDOUT, shell=IsWindows())
238 output, not_used = p.communicate() 238 output, not_used = p.communicate()
239 return output.strip() 239 return output.strip()
240 240
241 def GetSVNRevision(): 241 def GetSVNRevision():
242 custom_env = dict(os.environ)
243 custom_env['LC_MESSAGES'] = 'en_GB'
242 p = subprocess.Popen(['svn', 'info'], stdout = subprocess.PIPE, 244 p = subprocess.Popen(['svn', 'info'], stdout = subprocess.PIPE,
243 stderr = subprocess.STDOUT, shell=IsWindows(), 245 stderr = subprocess.STDOUT, shell=IsWindows(),
244 env = {'LC_MESSAGES' : 'en_GB'}) 246 env = custom_env)
245 output, not_used = p.communicate() 247 output, not_used = p.communicate()
246 revision = ParseSvnInfoOutput(output) 248 revision = ParseSvnInfoOutput(output)
247 if revision: 249 if revision:
248 return revision 250 return revision
249 251
250 # maybe the builder is using git-svn, try that 252 # maybe the builder is using git-svn, try that
251 p = subprocess.Popen(['git', 'svn', 'info'], stdout = subprocess.PIPE, 253 p = subprocess.Popen(['git', 'svn', 'info'], stdout = subprocess.PIPE,
252 stderr = subprocess.STDOUT, shell=IsWindows()) 254 stderr = subprocess.STDOUT, shell=IsWindows())
253 output, not_used = p.communicate() 255 output, not_used = p.communicate()
254 revision = ParseSvnInfoOutput(output) 256 revision = ParseSvnInfoOutput(output)
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 403
402 def DartSdkBinary(): 404 def DartSdkBinary():
403 tools_dir = os.path.dirname(os.path.realpath(__file__)) 405 tools_dir = os.path.dirname(os.path.realpath(__file__))
404 dart_binary_prefix = os.path.join(tools_dir, '..', 'sdk' , 'bin') 406 dart_binary_prefix = os.path.join(tools_dir, '..', 'sdk' , 'bin')
405 return os.path.join(dart_binary_prefix, 'dart') 407 return os.path.join(dart_binary_prefix, 'dart')
406 408
407 409
408 if __name__ == "__main__": 410 if __name__ == "__main__":
409 import sys 411 import sys
410 Main(sys.argv) 412 Main(sys.argv)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698