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 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1743 self, version='%prog ' + __version__, **kwargs) | 1743 self, version='%prog ' + __version__, **kwargs) |
1744 | 1744 |
1745 # Some arm boards have issues with parallel sync. | 1745 # Some arm boards have issues with parallel sync. |
1746 if platform.machine().startswith('arm'): | 1746 if platform.machine().startswith('arm'): |
1747 jobs = 1 | 1747 jobs = 1 |
1748 else: | 1748 else: |
1749 jobs = max(8, gclient_utils.NumLocalCpus()) | 1749 jobs = max(8, gclient_utils.NumLocalCpus()) |
1750 # cmp: 2013/06/19 | 1750 # cmp: 2013/06/19 |
1751 # Temporary workaround to lower bot-load on SVN server. | 1751 # Temporary workaround to lower bot-load on SVN server. |
1752 if os.environ.get('CHROME_HEADLESS') == '1': | 1752 if os.environ.get('CHROME_HEADLESS') == '1': |
1753 jobs = 4 | 1753 jobs = 1 |
1754 | 1754 |
1755 self.add_option( | 1755 self.add_option( |
1756 '-j', '--jobs', default=jobs, type='int', | 1756 '-j', '--jobs', default=jobs, type='int', |
1757 help='Specify how many SCM commands can run in parallel; defaults to ' | 1757 help='Specify how many SCM commands can run in parallel; defaults to ' |
1758 'number of cpu cores (%default)') | 1758 'number of cpu cores (%default)') |
1759 self.add_option( | 1759 self.add_option( |
1760 '-v', '--verbose', action='count', default=0, | 1760 '-v', '--verbose', action='count', default=0, |
1761 help='Produces additional output for diagnostics. Can be used up to ' | 1761 help='Produces additional output for diagnostics. Can be used up to ' |
1762 'three times for more logging info.') | 1762 'three times for more logging info.') |
1763 self.add_option( | 1763 self.add_option( |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1856 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 1856 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
1857 print >> sys.stderr, 'Error: %s' % str(e) | 1857 print >> sys.stderr, 'Error: %s' % str(e) |
1858 return 1 | 1858 return 1 |
1859 | 1859 |
1860 | 1860 |
1861 if '__main__' == __name__: | 1861 if '__main__' == __name__: |
1862 fix_encoding.fix_encoding() | 1862 fix_encoding.fix_encoding() |
1863 sys.exit(Main(sys.argv[1:])) | 1863 sys.exit(Main(sys.argv[1:])) |
1864 | 1864 |
1865 # vim: ts=2:sw=2:tw=80:et: | 1865 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |