| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 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 | 7 |
| 8 Files | 8 Files |
| 9 .gclient : Current client configuration, written by 'config' command. | 9 .gclient : Current client configuration, written by 'config' command. |
| 10 Format is a Python script defining 'solutions', a list whose | 10 Format is a Python script defining 'solutions', a list whose |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 """Runs a command on each dependency in a client and its dependencies. | 708 """Runs a command on each dependency in a client and its dependencies. |
| 709 | 709 |
| 710 Args: | 710 Args: |
| 711 command: The command to use (e.g., 'status' or 'diff') | 711 command: The command to use (e.g., 'status' or 'diff') |
| 712 args: list of str - extra arguments to add to the command line. | 712 args: list of str - extra arguments to add to the command line. |
| 713 """ | 713 """ |
| 714 if not self.dependencies: | 714 if not self.dependencies: |
| 715 raise gclient_utils.Error('No solution specified') | 715 raise gclient_utils.Error('No solution specified') |
| 716 revision_overrides = self._EnforceRevisions() | 716 revision_overrides = self._EnforceRevisions() |
| 717 pm = None | 717 pm = None |
| 718 if command == 'update' and not self._options.verbose: | 718 # Disable progress for non-tty stdout. |
| 719 if command in ('update', 'revert') and sys.stdout.isatty(): |
| 719 pm = Progress('Syncing projects', 1) | 720 pm = Progress('Syncing projects', 1) |
| 720 work_queue = gclient_utils.ExecutionQueue(self._options.jobs, pm) | 721 work_queue = gclient_utils.ExecutionQueue(self._options.jobs, pm) |
| 721 for s in self.dependencies: | 722 for s in self.dependencies: |
| 722 work_queue.enqueue(s) | 723 work_queue.enqueue(s) |
| 723 work_queue.flush(revision_overrides, command, args, options=self._options) | 724 work_queue.flush(revision_overrides, command, args, options=self._options) |
| 724 | 725 |
| 725 # Once all the dependencies have been processed, it's now safe to run the | 726 # Once all the dependencies have been processed, it's now safe to run the |
| 726 # hooks. | 727 # hooks. |
| 727 if not self._options.nohooks: | 728 if not self._options.nohooks: |
| 728 self.RunHooksRecursively(self._options) | 729 self.RunHooksRecursively(self._options) |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1228 return CMDhelp(parser, argv) | 1229 return CMDhelp(parser, argv) |
| 1229 except gclient_utils.Error, e: | 1230 except gclient_utils.Error, e: |
| 1230 print >> sys.stderr, 'Error: %s' % str(e) | 1231 print >> sys.stderr, 'Error: %s' % str(e) |
| 1231 return 1 | 1232 return 1 |
| 1232 | 1233 |
| 1233 | 1234 |
| 1234 if '__main__' == __name__: | 1235 if '__main__' == __name__: |
| 1235 sys.exit(Main(sys.argv[1:])) | 1236 sys.exit(Main(sys.argv[1:])) |
| 1236 | 1237 |
| 1237 # vim: ts=2:sw=2:tw=80:et: | 1238 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |