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

Side by Side Diff: gclient.py

Issue 1862943002: Add (another) argument to break git locks in gclient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: address comments Created 4 years, 8 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 2032 matching lines...) Expand 10 before | Expand all | Expand 10 after
2043 help='GIT ONLY - Reduces the size/time of the checkout at ' 2043 help='GIT ONLY - Reduces the size/time of the checkout at '
2044 'the cost of no history. Requires Git 1.9+') 2044 'the cost of no history. Requires Git 1.9+')
2045 parser.add_option('--shallow', action='store_true', 2045 parser.add_option('--shallow', action='store_true',
2046 help='GIT ONLY - Do a shallow clone into the cache dir. ' 2046 help='GIT ONLY - Do a shallow clone into the cache dir. '
2047 'Requires Git 1.9+') 2047 'Requires Git 1.9+')
2048 parser.add_option('--no_bootstrap', '--no-bootstrap', 2048 parser.add_option('--no_bootstrap', '--no-bootstrap',
2049 action='store_true', 2049 action='store_true',
2050 help='Don\'t bootstrap from Google Storage.') 2050 help='Don\'t bootstrap from Google Storage.')
2051 parser.add_option('--ignore_locks', action='store_true', 2051 parser.add_option('--ignore_locks', action='store_true',
2052 help='GIT ONLY - Ignore cache locks.') 2052 help='GIT ONLY - Ignore cache locks.')
2053 parser.add_option('--break_repo_locks', action='store_true',
2054 help='GIT ONLY - Forcibly remove repo locks (e.g. '
2055 'index.lock). This should only be used if you know for '
2056 'certain that this invocation of gclient is the only '
2057 'thing operating on the git repos (e.g. on a bot).')
2053 parser.add_option('--lock_timeout', type='int', default=5000, 2058 parser.add_option('--lock_timeout', type='int', default=5000,
2054 help='GIT ONLY - Deadline (in seconds) to wait for git ' 2059 help='GIT ONLY - Deadline (in seconds) to wait for git '
2055 'cache lock to become available. Default is %default.') 2060 'cache lock to become available. Default is %default.')
2056 (options, args) = parser.parse_args(args) 2061 (options, args) = parser.parse_args(args)
2057 client = GClient.LoadCurrentConfig(options) 2062 client = GClient.LoadCurrentConfig(options)
2058 2063
2059 if not client: 2064 if not client:
2060 raise gclient_utils.Error('client not configured; see \'gclient config\'') 2065 raise gclient_utils.Error('client not configured; see \'gclient config\'')
2061 2066
2062 if options.revisions and options.head: 2067 if options.revisions and options.head:
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
2319 2324
2320 2325
2321 if '__main__' == __name__: 2326 if '__main__' == __name__:
2322 try: 2327 try:
2323 sys.exit(main(sys.argv[1:])) 2328 sys.exit(main(sys.argv[1:]))
2324 except KeyboardInterrupt: 2329 except KeyboardInterrupt:
2325 sys.stderr.write('interrupted\n') 2330 sys.stderr.write('interrupted\n')
2326 sys.exit(1) 2331 sys.exit(1)
2327 2332
2328 # 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