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

Side by Side Diff: gclient_utils.py

Issue 1072973003: Fix GetPrimarySolutionPath() to not include buildtools (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 5 years, 8 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 | 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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 top_dir = [os.getcwd()] 672 top_dir = [os.getcwd()]
673 def filter_fn(line): 673 def filter_fn(line):
674 top_dir[0] = os.path.normpath(line.rstrip('\n')) 674 top_dir[0] = os.path.normpath(line.rstrip('\n'))
675 try: 675 try:
676 CheckCallAndFilter(["git", "rev-parse", "--show-toplevel"], 676 CheckCallAndFilter(["git", "rev-parse", "--show-toplevel"],
677 print_stdout=False, filter_fn=filter_fn) 677 print_stdout=False, filter_fn=filter_fn)
678 except Exception: 678 except Exception:
679 pass 679 pass
680 top_dir = top_dir[0] 680 top_dir = top_dir[0]
681 if os.path.exists(os.path.join(top_dir, 'buildtools')): 681 if os.path.exists(os.path.join(top_dir, 'buildtools')):
682 return os.path.join(top_dir, 'buildtools') 682 return top_dir
683 return None 683 return None
684 684
685 # Some projects' top directory is not named 'src'. 685 # Some projects' top directory is not named 'src'.
686 source_dir_name = GetGClientPrimarySolutionName(gclient_root) or 'src' 686 source_dir_name = GetGClientPrimarySolutionName(gclient_root) or 'src'
687 return os.path.join(gclient_root, source_dir_name) 687 return os.path.join(gclient_root, source_dir_name)
688 688
689 689
690 def GetBuildtoolsPath(): 690 def GetBuildtoolsPath():
691 """Returns the full path to the buildtools directory. 691 """Returns the full path to the buildtools directory.
692 This is based on the root of the checkout containing the current directory.""" 692 This is based on the root of the checkout containing the current directory."""
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 def DefaultIndexPackConfig(url=''): 1191 def DefaultIndexPackConfig(url=''):
1192 """Return reasonable default values for configuring git-index-pack. 1192 """Return reasonable default values for configuring git-index-pack.
1193 1193
1194 Experiments suggest that higher values for pack.threads don't improve 1194 Experiments suggest that higher values for pack.threads don't improve
1195 performance.""" 1195 performance."""
1196 cache_limit = DefaultDeltaBaseCacheLimit() 1196 cache_limit = DefaultDeltaBaseCacheLimit()
1197 result = ['-c', 'core.deltaBaseCacheLimit=%s' % cache_limit] 1197 result = ['-c', 'core.deltaBaseCacheLimit=%s' % cache_limit]
1198 if url in THREADED_INDEX_PACK_BLACKLIST: 1198 if url in THREADED_INDEX_PACK_BLACKLIST:
1199 result.extend(['-c', 'pack.threads=1']) 1199 result.extend(['-c', 'pack.threads=1'])
1200 return result 1200 return result
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698