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

Side by Side Diff: git_cache.py

Issue 315343002: Fixed bad arguments to gsutil (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: boto_path, not boto Created 6 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """A git command for managing a local cache of git repositories.""" 6 """A git command for managing a local cache of git repositories."""
7 7
8 from __future__ import print_function 8 from __future__ import print_function
9 import errno 9 import errno
10 import logging 10 import logging
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 python_fallback = False 245 python_fallback = False
246 if sys.platform.startswith('win') and not self.FindExecutable('7z'): 246 if sys.platform.startswith('win') and not self.FindExecutable('7z'):
247 python_fallback = True 247 python_fallback = True
248 elif sys.platform.startswith('darwin'): 248 elif sys.platform.startswith('darwin'):
249 # The OSX version of unzip doesn't support zip64. 249 # The OSX version of unzip doesn't support zip64.
250 python_fallback = True 250 python_fallback = True
251 elif not self.FindExecutable('unzip'): 251 elif not self.FindExecutable('unzip'):
252 python_fallback = True 252 python_fallback = True
253 253
254 gs_folder = 'gs://%s/%s' % (self.bootstrap_bucket, self.basedir) 254 gs_folder = 'gs://%s/%s' % (self.bootstrap_bucket, self.basedir)
255 gsutil = Gsutil(self.gsutil_exe, bypass_prodaccess=True) 255 gsutil = Gsutil(self.gsutil_exe, boto_path=None, bypass_prodaccess=True)
256 # Get the most recent version of the zipfile. 256 # Get the most recent version of the zipfile.
257 _, ls_out, _ = gsutil.check_call('ls', gs_folder) 257 _, ls_out, _ = gsutil.check_call('ls', gs_folder)
258 ls_out_sorted = sorted(ls_out.splitlines()) 258 ls_out_sorted = sorted(ls_out.splitlines())
259 if not ls_out_sorted: 259 if not ls_out_sorted:
260 # This repo is not on Google Storage. 260 # This repo is not on Google Storage.
261 return False 261 return False
262 latest_checkout = ls_out_sorted[-1] 262 latest_checkout = ls_out_sorted[-1]
263 263
264 # Download zip file to a temporary directory. 264 # Download zip file to a temporary directory.
265 try: 265 try:
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 return options, args 528 return options, args
529 529
530 530
531 def main(argv): 531 def main(argv):
532 dispatcher = subcommand.CommandDispatcher(__name__) 532 dispatcher = subcommand.CommandDispatcher(__name__)
533 return dispatcher.execute(OptionParser(), argv) 533 return dispatcher.execute(OptionParser(), argv)
534 534
535 535
536 if __name__ == '__main__': 536 if __name__ == '__main__':
537 sys.exit(main(sys.argv[1:])) 537 sys.exit(main(sys.argv[1:]))
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