| 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 | 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 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 | 1000 |
| 1001 Args: | 1001 Args: |
| 1002 command: The command to use (e.g., 'status' or 'diff') | 1002 command: The command to use (e.g., 'status' or 'diff') |
| 1003 args: list of str - extra arguments to add to the command line. | 1003 args: list of str - extra arguments to add to the command line. |
| 1004 """ | 1004 """ |
| 1005 if not self.dependencies: | 1005 if not self.dependencies: |
| 1006 raise gclient_utils.Error('No solution specified') | 1006 raise gclient_utils.Error('No solution specified') |
| 1007 revision_overrides = {} | 1007 revision_overrides = {} |
| 1008 # It's unnecessary to check for revision overrides for 'recurse'. | 1008 # It's unnecessary to check for revision overrides for 'recurse'. |
| 1009 # Save a few seconds by not calling _EnforceRevisions() in that case. | 1009 # Save a few seconds by not calling _EnforceRevisions() in that case. |
| 1010 if command is not 'recurse': | 1010 if command not in ('diff', 'recurse', 'runhooks', 'status'): |
| 1011 revision_overrides = self._EnforceRevisions() | 1011 revision_overrides = self._EnforceRevisions() |
| 1012 pm = None | 1012 pm = None |
| 1013 # Disable progress for non-tty stdout. | 1013 # Disable progress for non-tty stdout. |
| 1014 if (sys.stdout.isatty() and not self._options.verbose): | 1014 if (sys.stdout.isatty() and not self._options.verbose): |
| 1015 if command in ('update', 'revert'): | 1015 if command in ('update', 'revert'): |
| 1016 pm = Progress('Syncing projects', 1) | 1016 pm = Progress('Syncing projects', 1) |
| 1017 elif command is 'recurse': | 1017 elif command is 'recurse': |
| 1018 pm = Progress(' '.join(args), 1) | 1018 pm = Progress(' '.join(args), 1) |
| 1019 work_queue = gclient_utils.ExecutionQueue(self._options.jobs, pm) | 1019 work_queue = gclient_utils.ExecutionQueue(self._options.jobs, pm) |
| 1020 for s in self.dependencies: | 1020 for s in self.dependencies: |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 1601 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
| 1602 print >> sys.stderr, 'Error: %s' % str(e) | 1602 print >> sys.stderr, 'Error: %s' % str(e) |
| 1603 return 1 | 1603 return 1 |
| 1604 | 1604 |
| 1605 | 1605 |
| 1606 if '__main__' == __name__: | 1606 if '__main__' == __name__: |
| 1607 fix_encoding.fix_encoding() | 1607 fix_encoding.fix_encoding() |
| 1608 sys.exit(Main(sys.argv[1:])) | 1608 sys.exit(Main(sys.argv[1:])) |
| 1609 | 1609 |
| 1610 # vim: ts=2:sw=2:tw=80:et: | 1610 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |