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

Unified Diff: win_toolchain/get_toolchain_if_necessary.py

Issue 168603004: Move toolchain update control into src, but keep download logic in depot_tools (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « update_depot_tools.bat ('k') | win_toolchain/toolchain_vs2013.hash » ('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 3ac6689c695f654f9cc2e151db969b86287c7b2c..9727c1f244df918e7a70252b83c65dbc86a5364a 100755
--- a/win_toolchain/get_toolchain_if_necessary.py
+++ b/win_toolchain/get_toolchain_if_necessary.py
@@ -145,9 +145,10 @@ def main():
if not sys.platform.startswith(('cygwin', 'win32')):
return 0
- if len(sys.argv) != 1:
- print >> sys.stderr, 'Unexpected arguments.'
- return 1
+ if len(sys.argv) < 2:
+ print >> sys.stderr, 'Usage: get_toolchain_if_necessary.py sha1...'
iannucci 2014/02/21 23:53:08 Probably want to note that we'll get the first sha
+
+ desired_hashes = set(sys.argv[1:])
# Move to depot_tools\win_toolchain where we'll store our files, and where
# the downloader script is.
@@ -155,12 +156,6 @@ def main():
toolchain_dir = '.'
target_dir = os.path.normpath(os.path.join(toolchain_dir, 'vs2013_files'))
- sha1path = os.path.join(toolchain_dir, 'toolchain_vs2013.hash')
- desired_hashes = set()
- if os.path.isfile(sha1path):
- with open(sha1path, 'rb') as f:
- desired_hashes = set(f.read().strip().splitlines())
-
# If the current hash doesn't match what we want in the file, nuke and pave.
# Typically this script is only run when the .sha1 one file is updated, but
# directly calling "gclient runhooks" will also run it, so we cache
« no previous file with comments | « update_depot_tools.bat ('k') | win_toolchain/toolchain_vs2013.hash » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698