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

Side by Side Diff: gclient.py

Issue 1869593004: Add --break_repo_locks to gclient revert. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: 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 | 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 (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 2100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2111 parser.add_option('--deps', dest='deps_os', metavar='OS_LIST', 2111 parser.add_option('--deps', dest='deps_os', metavar='OS_LIST',
2112 help='override deps for the specified (comma-separated) ' 2112 help='override deps for the specified (comma-separated) '
2113 'platform(s); \'all\' will process all deps_os ' 2113 'platform(s); \'all\' will process all deps_os '
2114 'references') 2114 'references')
2115 parser.add_option('-n', '--nohooks', action='store_true', 2115 parser.add_option('-n', '--nohooks', action='store_true',
2116 help='don\'t run hooks after the revert is complete') 2116 help='don\'t run hooks after the revert is complete')
2117 parser.add_option('-p', '--noprehooks', action='store_true', 2117 parser.add_option('-p', '--noprehooks', action='store_true',
2118 help='don\'t run pre-DEPS hooks', default=False) 2118 help='don\'t run pre-DEPS hooks', default=False)
2119 parser.add_option('--upstream', action='store_true', 2119 parser.add_option('--upstream', action='store_true',
2120 help='Make repo state match upstream branch.') 2120 help='Make repo state match upstream branch.')
2121 parser.add_option('--break_repo_locks', action='store_true',
2122 help='GIT ONLY - Forcibly remove repo locks (e.g. '
2123 'index.lock). This should only be used if you know for '
2124 'certain that this invocation of gclient is the only '
2125 'thing operating on the git repos (e.g. on a bot).')
2121 (options, args) = parser.parse_args(args) 2126 (options, args) = parser.parse_args(args)
2122 # --force is implied. 2127 # --force is implied.
2123 options.force = True 2128 options.force = True
2124 options.reset = False 2129 options.reset = False
2125 options.delete_unversioned_trees = False 2130 options.delete_unversioned_trees = False
2126 client = GClient.LoadCurrentConfig(options) 2131 client = GClient.LoadCurrentConfig(options)
2127 if not client: 2132 if not client:
2128 raise gclient_utils.Error('client not configured; see \'gclient config\'') 2133 raise gclient_utils.Error('client not configured; see \'gclient config\'')
2129 return client.RunOnDeps('revert', args) 2134 return client.RunOnDeps('revert', args)
2130 2135
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
2324 2329
2325 2330
2326 if '__main__' == __name__: 2331 if '__main__' == __name__:
2327 try: 2332 try:
2328 sys.exit(main(sys.argv[1:])) 2333 sys.exit(main(sys.argv[1:]))
2329 except KeyboardInterrupt: 2334 except KeyboardInterrupt:
2330 sys.stderr.write('interrupted\n') 2335 sys.stderr.write('interrupted\n')
2331 sys.exit(1) 2336 sys.exit(1)
2332 2337
2333 # vim: ts=2:sw=2:tw=80:et: 2338 # vim: ts=2:sw=2:tw=80:et:
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