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

Side by Side Diff: gclient.py

Issue 1650993005: Allow blocking git-cache update with a timeout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: nit Created 4 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 | gclient_scm.py » ('j') | 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 (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """Meta checkout manager supporting both Subversion and GIT.""" 6 """Meta checkout manager supporting both Subversion and GIT."""
7 # Files 7 # Files
8 # .gclient : Current client configuration, written by 'config' command. 8 # .gclient : Current client configuration, written by 'config' command.
9 # Format is a Python script defining 'solutions', a list whose 9 # Format is a Python script defining 'solutions', a list whose
10 # entries each are maps binding the strings "name" and "url" 10 # entries each are maps binding the strings "name" and "url"
(...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 help='GIT ONLY - Reduces the size/time of the checkout at ' 2042 help='GIT ONLY - Reduces the size/time of the checkout at '
2043 'the cost of no history. Requires Git 1.9+') 2043 'the cost of no history. Requires Git 1.9+')
2044 parser.add_option('--shallow', action='store_true', 2044 parser.add_option('--shallow', action='store_true',
2045 help='GIT ONLY - Do a shallow clone into the cache dir. ' 2045 help='GIT ONLY - Do a shallow clone into the cache dir. '
2046 'Requires Git 1.9+') 2046 'Requires Git 1.9+')
2047 parser.add_option('--no_bootstrap', '--no-bootstrap', 2047 parser.add_option('--no_bootstrap', '--no-bootstrap',
2048 action='store_true', 2048 action='store_true',
2049 help='Don\'t bootstrap from Google Storage.') 2049 help='Don\'t bootstrap from Google Storage.')
2050 parser.add_option('--ignore_locks', action='store_true', 2050 parser.add_option('--ignore_locks', action='store_true',
2051 help='GIT ONLY - Ignore cache locks.') 2051 help='GIT ONLY - Ignore cache locks.')
2052 parser.add_option('--lock_timeout', type='int', default=0,
2053 help='GIT ONLY - Deadline (in seconds) to wait for git '
2054 'cache lock to become available.')
2052 (options, args) = parser.parse_args(args) 2055 (options, args) = parser.parse_args(args)
2053 client = GClient.LoadCurrentConfig(options) 2056 client = GClient.LoadCurrentConfig(options)
2054 2057
2055 if not client: 2058 if not client:
2056 raise gclient_utils.Error('client not configured; see \'gclient config\'') 2059 raise gclient_utils.Error('client not configured; see \'gclient config\'')
2057 2060
2058 if options.revisions and options.head: 2061 if options.revisions and options.head:
2059 # TODO(maruel): Make it a parser.error if it doesn't break any builder. 2062 # TODO(maruel): Make it a parser.error if it doesn't break any builder.
2060 print('Warning: you cannot use both --head and --revision') 2063 print('Warning: you cannot use both --head and --revision')
2061 2064
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
2321 2324
2322 2325
2323 if '__main__' == __name__: 2326 if '__main__' == __name__:
2324 try: 2327 try:
2325 sys.exit(main(sys.argv[1:])) 2328 sys.exit(main(sys.argv[1:]))
2326 except KeyboardInterrupt: 2329 except KeyboardInterrupt:
2327 sys.stderr.write('interrupted\n') 2330 sys.stderr.write('interrupted\n')
2328 sys.exit(1) 2331 sys.exit(1)
2329 2332
2330 # vim: ts=2:sw=2:tw=80:et: 2333 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « no previous file | gclient_scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698