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 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 def RunOnDeps(self, command, args, ignore_requirements=False, progress=True): | 1317 def RunOnDeps(self, command, args, ignore_requirements=False, progress=True): |
1318 """Runs a command on each dependency in a client and its dependencies. | 1318 """Runs a command on each dependency in a client and its dependencies. |
1319 | 1319 |
1320 Args: | 1320 Args: |
1321 command: The command to use (e.g., 'status' or 'diff') | 1321 command: The command to use (e.g., 'status' or 'diff') |
1322 args: list of str - extra arguments to add to the command line. | 1322 args: list of str - extra arguments to add to the command line. |
1323 """ | 1323 """ |
1324 if not self.dependencies: | 1324 if not self.dependencies: |
1325 raise gclient_utils.Error('No solution specified') | 1325 raise gclient_utils.Error('No solution specified') |
1326 | 1326 |
1327 self._CheckConfig() | |
1328 | |
1329 revision_overrides = {} | 1327 revision_overrides = {} |
1330 # It's unnecessary to check for revision overrides for 'recurse'. | 1328 # It's unnecessary to check for revision overrides for 'recurse'. |
1331 # Save a few seconds by not calling _EnforceRevisions() in that case. | 1329 # Save a few seconds by not calling _EnforceRevisions() in that case. |
1332 if command not in ('diff', 'recurse', 'runhooks', 'status'): | 1330 if command not in ('diff', 'recurse', 'runhooks', 'status'): |
| 1331 self._CheckConfig() |
1333 revision_overrides = self._EnforceRevisions() | 1332 revision_overrides = self._EnforceRevisions() |
1334 pm = None | 1333 pm = None |
1335 # Disable progress for non-tty stdout. | 1334 # Disable progress for non-tty stdout. |
1336 if (sys.stdout.isatty() and not self._options.verbose and progress): | 1335 if (sys.stdout.isatty() and not self._options.verbose and progress): |
1337 if command in ('update', 'revert'): | 1336 if command in ('update', 'revert'): |
1338 pm = Progress('Syncing projects', 1) | 1337 pm = Progress('Syncing projects', 1) |
1339 elif command == 'recurse': | 1338 elif command == 'recurse': |
1340 pm = Progress(' '.join(args), 1) | 1339 pm = Progress(' '.join(args), 1) |
1341 work_queue = gclient_utils.ExecutionQueue( | 1340 work_queue = gclient_utils.ExecutionQueue( |
1342 self._options.jobs, pm, ignore_requirements=ignore_requirements, | 1341 self._options.jobs, pm, ignore_requirements=ignore_requirements, |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2066 print >> sys.stderr, 'Error: %s' % str(e) | 2065 print >> sys.stderr, 'Error: %s' % str(e) |
2067 return 1 | 2066 return 1 |
2068 finally: | 2067 finally: |
2069 gclient_utils.PrintWarnings() | 2068 gclient_utils.PrintWarnings() |
2070 | 2069 |
2071 | 2070 |
2072 if '__main__' == __name__: | 2071 if '__main__' == __name__: |
2073 sys.exit(Main(sys.argv[1:])) | 2072 sys.exit(Main(sys.argv[1:])) |
2074 | 2073 |
2075 # vim: ts=2:sw=2:tw=80:et: | 2074 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |