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

Side by Side Diff: dart/tools/utils.py

Issue 17224002: Make version generation functionallity work on non english locale. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/
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 | « AUTHORS ('k') | 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 p = subprocess.Popen(['svn', 'info'], stdout = subprocess.PIPE, 242 p = subprocess.Popen(['svn', 'info'], stdout = subprocess.PIPE,
243 stderr = subprocess.STDOUT, shell=IsWindows()) 243 stderr = subprocess.STDOUT, shell=IsWindows(), env = {'LC_MESSAGES' : 'en_ GB'})
kustermann 2013/06/17 06:38:56 long line
ricow1 2013/06/17 06:40:19 Done.
244 output, not_used = p.communicate() 244 output, not_used = p.communicate()
245 revision = ParseSvnInfoOutput(output) 245 revision = ParseSvnInfoOutput(output)
246 if revision: 246 if revision:
247 return revision 247 return revision
248 248
249 # maybe the builder is using git-svn, try that 249 # maybe the builder is using git-svn, try that
250 p = subprocess.Popen(['git', 'svn', 'info'], stdout = subprocess.PIPE, 250 p = subprocess.Popen(['git', 'svn', 'info'], stdout = subprocess.PIPE,
251 stderr = subprocess.STDOUT, shell=IsWindows()) 251 stderr = subprocess.STDOUT, shell=IsWindows())
252 output, not_used = p.communicate() 252 output, not_used = p.communicate()
253 revision = ParseSvnInfoOutput(output) 253 revision = ParseSvnInfoOutput(output)
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 400
401 def DartSdkBinary(): 401 def DartSdkBinary():
402 tools_dir = os.path.dirname(os.path.realpath(__file__)) 402 tools_dir = os.path.dirname(os.path.realpath(__file__))
403 dart_binary_prefix = os.path.join(tools_dir, '..', 'sdk' , 'bin') 403 dart_binary_prefix = os.path.join(tools_dir, '..', 'sdk' , 'bin')
404 return os.path.join(dart_binary_prefix, 'dart') 404 return os.path.join(dart_binary_prefix, 'dart')
405 405
406 406
407 if __name__ == "__main__": 407 if __name__ == "__main__":
408 import sys 408 import sys
409 Main(sys.argv) 409 Main(sys.argv)
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698