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

Unified Diff: win_toolchain/get_toolchain_if_necessary.py

Issue 185423004: Add toolchain simple mirror option used for bots (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: abspath for target 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | win_toolchain/toolchain2013.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: win_toolchain/get_toolchain_if_necessary.py
diff --git a/win_toolchain/get_toolchain_if_necessary.py b/win_toolchain/get_toolchain_if_necessary.py
index 266806b0699004c07c5ae74de38f8fd4d37e3ded..27a4034a5bee336e3b05c3839a8ba7058f53e3a3 100755
--- a/win_toolchain/get_toolchain_if_necessary.py
+++ b/win_toolchain/get_toolchain_if_necessary.py
@@ -152,7 +152,8 @@ def main():
help='write information about toolchain to FILE')
options, args = parser.parse_args()
- desired_hashes = set(args)
+ # We assume that the Pro hash is the first one.
+ desired_hashes = args
# Move to depot_tools\win_toolchain where we'll store our files, and where
# the downloader script is.
@@ -171,7 +172,7 @@ def main():
print('Windows toolchain out of date or doesn\'t exist, updating (%s)...' %
('Pro' if should_get_pro else 'Express'))
print(' current_hash: %s' % current_hash)
- print(' desired_hashes: %s' % desired_hashes)
+ print(' desired_hashes: %s' % ', '.join(desired_hashes))
DelayBeforeRemoving(target_dir)
# This stays resident and will make the rmdir below fail.
with open(os.devnull, 'wb') as nul:
@@ -181,7 +182,8 @@ def main():
subprocess.check_call('rmdir /s/q "%s"' % target_dir, shell=True)
args = [sys.executable,
'toolchain2013.py',
- '--targetdir', target_dir]
+ '--targetdir', target_dir,
+ '--sha1', desired_hashes[0]]
if not should_get_pro:
args.append('--express')
subprocess.check_call(args)
@@ -190,7 +192,7 @@ def main():
print >> sys.stderr, (
'Got wrong hash after pulling a new toolchain. '
'Wanted one of \'%s\', got \'%s\'.' % (
- desired_hashes, current_hash))
+ ', '.join(desired_hashes), current_hash))
return 1
SaveTimestampsAndHash(target_dir, current_hash)
« no previous file with comments | « no previous file | win_toolchain/toolchain2013.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698