Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: gclient.py

Issue 180243006: Make gclient_scm.py use cache_dir (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Remove cache_locks, also more membership tests. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | gclient_scm.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1811 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 optparse.OptionParser.__init__( 1822 optparse.OptionParser.__init__(
1823 self, version='%prog ' + __version__, **kwargs) 1823 self, version='%prog ' + __version__, **kwargs)
1824 1824
1825 # Some arm boards have issues with parallel sync. 1825 # Some arm boards have issues with parallel sync.
1826 if platform.machine().startswith('arm'): 1826 if platform.machine().startswith('arm'):
1827 jobs = 1 1827 jobs = 1
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 # Bypassed if a bot_update flag is detected.
1833 if (os.environ.get('CHROME_HEADLESS') == '1' and
1834 not os.path.exists('update.flag')):
1833 jobs = 1 1835 jobs = 1
1834 1836
1835 self.add_option( 1837 self.add_option(
1836 '-j', '--jobs', default=jobs, type='int', 1838 '-j', '--jobs', default=jobs, type='int',
1837 help='Specify how many SCM commands can run in parallel; defaults to ' 1839 help='Specify how many SCM commands can run in parallel; defaults to '
1838 'number of cpu cores (%default)') 1840 'number of cpu cores (%default)')
1839 self.add_option( 1841 self.add_option(
1840 '-v', '--verbose', action='count', default=0, 1842 '-v', '--verbose', action='count', default=0,
1841 help='Produces additional output for diagnostics. Can be used up to ' 1843 help='Produces additional output for diagnostics. Can be used up to '
1842 'three times for more logging info.') 1844 'three times for more logging info.')
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1919 raise 1921 raise
1920 except (gclient_utils.Error, subprocess2.CalledProcessError), e: 1922 except (gclient_utils.Error, subprocess2.CalledProcessError), e:
1921 print >> sys.stderr, 'Error: %s' % str(e) 1923 print >> sys.stderr, 'Error: %s' % str(e)
1922 return 1 1924 return 1
1923 1925
1924 1926
1925 if '__main__' == __name__: 1927 if '__main__' == __name__:
1926 sys.exit(Main(sys.argv[1:])) 1928 sys.exit(Main(sys.argv[1:]))
1927 1929
1928 # vim: ts=2:sw=2:tw=80:et: 1930 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « no previous file | gclient_scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698