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 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1654 parser.add_option('-H', '--head', action='store_true', | 1654 parser.add_option('-H', '--head', action='store_true', |
1655 help='skips any safesync_urls specified in ' | 1655 help='skips any safesync_urls specified in ' |
1656 'configured solutions and sync to head instead') | 1656 'configured solutions and sync to head instead') |
1657 parser.add_option('-D', '--delete_unversioned_trees', action='store_true', | 1657 parser.add_option('-D', '--delete_unversioned_trees', action='store_true', |
1658 help='Deletes from the working copy any dependencies that ' | 1658 help='Deletes from the working copy any dependencies that ' |
1659 'have been removed since the last sync, as long as ' | 1659 'have been removed since the last sync, as long as ' |
1660 'there are no local modifications. When used with ' | 1660 'there are no local modifications. When used with ' |
1661 '--force, such dependencies are removed even if they ' | 1661 '--force, such dependencies are removed even if they ' |
1662 'have local modifications. When used with --reset, ' | 1662 'have local modifications. When used with --reset, ' |
1663 'all untracked directories are removed from the ' | 1663 'all untracked directories are removed from the ' |
1664 'working copy, exclusing those which are explicitly ' | 1664 'working copy, excluding those which are explicitly ' |
1665 'ignored in the repository.') | 1665 'ignored in the repository.') |
1666 parser.add_option('-R', '--reset', action='store_true', | 1666 parser.add_option('-R', '--reset', action='store_true', |
1667 help='resets any local changes before updating (git only)') | 1667 help='resets any local changes before updating (git only)') |
1668 parser.add_option('-M', '--merge', action='store_true', | 1668 parser.add_option('-M', '--merge', action='store_true', |
1669 help='merge upstream changes instead of trying to ' | 1669 help='merge upstream changes instead of trying to ' |
1670 'fast-forward or rebase') | 1670 'fast-forward or rebase') |
1671 parser.add_option('--deps', dest='deps_os', metavar='OS_LIST', | 1671 parser.add_option('--deps', dest='deps_os', metavar='OS_LIST', |
1672 help='override deps for the specified (comma-separated) ' | 1672 help='override deps for the specified (comma-separated) ' |
1673 'platform(s); \'all\' will process all deps_os ' | 1673 'platform(s); \'all\' will process all deps_os ' |
1674 'references') | 1674 'references') |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1828 else: | 1828 else: |
1829 jobs = max(8, gclient_utils.NumLocalCpus()) | 1829 jobs = max(8, gclient_utils.NumLocalCpus()) |
1830 # cmp: 2013/06/19 | 1830 # cmp: 2013/06/19 |
1831 # Temporary workaround to lower bot-load on SVN server. | 1831 # Temporary workaround to lower bot-load on SVN server. |
1832 if os.environ.get('CHROME_HEADLESS') == '1': | 1832 if os.environ.get('CHROME_HEADLESS') == '1': |
1833 jobs = 1 | 1833 jobs = 1 |
1834 | 1834 |
1835 self.add_option( | 1835 self.add_option( |
1836 '-j', '--jobs', default=jobs, type='int', | 1836 '-j', '--jobs', default=jobs, type='int', |
1837 help='Specify how many SCM commands can run in parallel; defaults to ' | 1837 help='Specify how many SCM commands can run in parallel; defaults to ' |
1838 'number of cpu cores (%default)') | 1838 '%default on this machine') |
1839 self.add_option( | 1839 self.add_option( |
1840 '-v', '--verbose', action='count', default=0, | 1840 '-v', '--verbose', action='count', default=0, |
1841 help='Produces additional output for diagnostics. Can be used up to ' | 1841 help='Produces additional output for diagnostics. Can be used up to ' |
1842 'three times for more logging info.') | 1842 'three times for more logging info.') |
1843 self.add_option( | 1843 self.add_option( |
1844 '--gclientfile', dest='config_filename', | 1844 '--gclientfile', dest='config_filename', |
1845 help='Specify an alternate %s file' % self.gclientfile_default) | 1845 help='Specify an alternate %s file' % self.gclientfile_default) |
1846 self.add_option( | 1846 self.add_option( |
1847 '--spec', | 1847 '--spec', |
1848 help='create a gclient file containing the provided string. Due to ' | 1848 help='create a gclient file containing the provided string. Due to ' |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1919 raise | 1919 raise |
1920 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 1920 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
1921 print >> sys.stderr, 'Error: %s' % str(e) | 1921 print >> sys.stderr, 'Error: %s' % str(e) |
1922 return 1 | 1922 return 1 |
1923 | 1923 |
1924 | 1924 |
1925 if '__main__' == __name__: | 1925 if '__main__' == __name__: |
1926 sys.exit(Main(sys.argv[1:])) | 1926 sys.exit(Main(sys.argv[1:])) |
1927 | 1927 |
1928 # vim: ts=2:sw=2:tw=80:et: | 1928 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |