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

Side by Side Diff: tools/utils.py

Issue 131343014: Fix last minute change in last commit (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 p = subprocess.Popen(['git', 'svn', 'info'], stdout = subprocess.PIPE, 335 p = subprocess.Popen(['git', 'svn', 'info'], stdout = subprocess.PIPE,
336 stderr = subprocess.STDOUT, shell=IsWindows(), cwd = DART_DIR) 336 stderr = subprocess.STDOUT, shell=IsWindows(), cwd = DART_DIR)
337 output, _ = p.communicate() 337 output, _ = p.communicate()
338 revision = ParseSvnInfoOutput(output) 338 revision = ParseSvnInfoOutput(output)
339 if revision: 339 if revision:
340 return revision 340 return revision
341 341
342 # When building from tarball use tools/SVN_REVISION 342 # When building from tarball use tools/SVN_REVISION
343 svn_revision_file = os.path.join(DART_DIR, 'tools', 'SVN_REVISION') 343 svn_revision_file = os.path.join(DART_DIR, 'tools', 'SVN_REVISION')
344 try: 344 try:
345 with open(svn_revision_file) as fd 345 with open(svn_revision_file) as fd:
346 return fd.read() 346 return fd.read()
347 except: 347 except:
348 pass 348 pass
349 349
350 # Only fail on the buildbot in case of a SVN client version mismatch. 350 # Only fail on the buildbot in case of a SVN client version mismatch.
351 user = GetUserName() 351 user = GetUserName()
352 if user != 'chrome-bot': 352 if user != 'chrome-bot':
353 return '0' 353 return '0'
354 354
355 return None 355 return None
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 os.chdir(self._working_directory) 534 os.chdir(self._working_directory)
535 535
536 def __exit__(self, *_): 536 def __exit__(self, *_):
537 print "Enter directory = ", self._old_cwd 537 print "Enter directory = ", self._old_cwd
538 os.chdir(self._old_cwd) 538 os.chdir(self._old_cwd)
539 539
540 540
541 if __name__ == "__main__": 541 if __name__ == "__main__":
542 import sys 542 import sys
543 Main(sys.argv) 543 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