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

Side by Side Diff: gclient_utils.py

Issue 356733002: Change clang_format.py to search for clang-format in buildtools (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: updates Created 6 years, 6 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 | Annotate | Revision Log
« clang_format.py ('K') | « clang_format.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Generic utils.""" 5 """Generic utils."""
6 6
7 import codecs 7 import codecs
8 import cStringIO 8 import cStringIO
9 import datetime 9 import datetime
10 import logging 10 import logging
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 elif sys.platform == 'darwin': 648 elif sys.platform == 'darwin':
649 return 'mac' 649 return 'mac'
650 raise Error('Unknown platform: ' + sys.platform) 650 raise Error('Unknown platform: ' + sys.platform)
651 651
652 652
653 def GetBuildtoolsPath(): 653 def GetBuildtoolsPath():
654 """Returns the full path to the buildtools directory. 654 """Returns the full path to the buildtools directory.
655 This is based on the root of the checkout containing the current directory.""" 655 This is based on the root of the checkout containing the current directory."""
656 gclient_root = FindGclientRoot(os.getcwd()) 656 gclient_root = FindGclientRoot(os.getcwd())
657 if not gclient_root: 657 if not gclient_root:
658 if os.path.exists('buildtools'):
659 return os.path.join(os.getcwd(), 'buildtools')
658 return None 660 return None
659 return os.path.join(gclient_root, 'src', 'buildtools') 661 return os.path.join(gclient_root, 'src', 'buildtools')
660 662
661 663
662 def GetBuildtoolsPlatformBinaryPath(): 664 def GetBuildtoolsPlatformBinaryPath():
663 """Returns the full path to the binary directory for the current platform.""" 665 """Returns the full path to the binary directory for the current platform."""
664 # Mac and Windows just have one directory, Linux has two according to whether 666 # Mac and Windows just have one directory, Linux has two according to whether
665 # it's 32 or 64 bits. 667 # it's 32 or 64 bits.
666 buildtools_path = GetBuildtoolsPath() 668 buildtools_path = GetBuildtoolsPath()
667 if not buildtools_path: 669 if not buildtools_path:
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 def DefaultIndexPackConfig(url=''): 1116 def DefaultIndexPackConfig(url=''):
1115 """Return reasonable default values for configuring git-index-pack. 1117 """Return reasonable default values for configuring git-index-pack.
1116 1118
1117 Experiments suggest that higher values for pack.threads don't improve 1119 Experiments suggest that higher values for pack.threads don't improve
1118 performance.""" 1120 performance."""
1119 cache_limit = DefaultDeltaBaseCacheLimit() 1121 cache_limit = DefaultDeltaBaseCacheLimit()
1120 result = ['-c', 'core.deltaBaseCacheLimit=%s' % cache_limit] 1122 result = ['-c', 'core.deltaBaseCacheLimit=%s' % cache_limit]
1121 if url in THREADED_INDEX_PACK_BLACKLIST: 1123 if url in THREADED_INDEX_PACK_BLACKLIST:
1122 result.extend(['-c', 'pack.threads=1']) 1124 result.extend(['-c', 'pack.threads=1'])
1123 return result 1125 return result
OLDNEW
« clang_format.py ('K') | « clang_format.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698