OLD | NEW |
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 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2147 parser.add_option('--break_repo_locks', action='store_true', | 2147 parser.add_option('--break_repo_locks', action='store_true', |
2148 help='GIT ONLY - Forcibly remove repo locks (e.g. ' | 2148 help='GIT ONLY - Forcibly remove repo locks (e.g. ' |
2149 'index.lock). This should only be used if you know for ' | 2149 'index.lock). This should only be used if you know for ' |
2150 'certain that this invocation of gclient is the only ' | 2150 'certain that this invocation of gclient is the only ' |
2151 'thing operating on the git repos (e.g. on a bot).') | 2151 'thing operating on the git repos (e.g. on a bot).') |
2152 (options, args) = parser.parse_args(args) | 2152 (options, args) = parser.parse_args(args) |
2153 # --force is implied. | 2153 # --force is implied. |
2154 options.force = True | 2154 options.force = True |
2155 options.reset = False | 2155 options.reset = False |
2156 options.delete_unversioned_trees = False | 2156 options.delete_unversioned_trees = False |
| 2157 options.merge = False |
2157 client = GClient.LoadCurrentConfig(options) | 2158 client = GClient.LoadCurrentConfig(options) |
2158 if not client: | 2159 if not client: |
2159 raise gclient_utils.Error('client not configured; see \'gclient config\'') | 2160 raise gclient_utils.Error('client not configured; see \'gclient config\'') |
2160 return client.RunOnDeps('revert', args) | 2161 return client.RunOnDeps('revert', args) |
2161 | 2162 |
2162 | 2163 |
2163 def CMDrunhooks(parser, args): | 2164 def CMDrunhooks(parser, args): |
2164 """Runs hooks for files that have been modified in the local working copy.""" | 2165 """Runs hooks for files that have been modified in the local working copy.""" |
2165 parser.add_option('--deps', dest='deps_os', metavar='OS_LIST', | 2166 parser.add_option('--deps', dest='deps_os', metavar='OS_LIST', |
2166 help='override deps for the specified (comma-separated) ' | 2167 help='override deps for the specified (comma-separated) ' |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2355 | 2356 |
2356 | 2357 |
2357 if '__main__' == __name__: | 2358 if '__main__' == __name__: |
2358 try: | 2359 try: |
2359 sys.exit(main(sys.argv[1:])) | 2360 sys.exit(main(sys.argv[1:])) |
2360 except KeyboardInterrupt: | 2361 except KeyboardInterrupt: |
2361 sys.stderr.write('interrupted\n') | 2362 sys.stderr.write('interrupted\n') |
2362 sys.exit(1) | 2363 sys.exit(1) |
2363 | 2364 |
2364 # vim: ts=2:sw=2:tw=80:et: | 2365 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |