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

Side by Side Diff: recipe_modules/gclient/api.py

Issue 1768893003: Make CACHE_DIR set by default in most gclient configs. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 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 | recipe_modules/gclient/config.py » ('j') | recipe_modules/gclient/config.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 from recipe_engine import recipe_api 5 from recipe_engine import recipe_api
6 6
7 7
8 class RevisionResolver(object): 8 class RevisionResolver(object):
9 """Resolves the revision based on build properties.""" 9 """Resolves the revision based on build properties."""
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 @spec_alias.setter 120 @spec_alias.setter
121 def spec_alias(self, name): 121 def spec_alias(self, name):
122 self._spec_alias = name 122 self._spec_alias = name
123 123
124 @spec_alias.deleter 124 @spec_alias.deleter
125 def spec_alias(self): 125 def spec_alias(self):
126 self._spec_alias = None 126 self._spec_alias = None
127 127
128 def get_config_defaults(self): 128 def get_config_defaults(self):
129 ret = { 129 return {
130 'USE_MIRROR': self.use_mirror 130 'USE_MIRROR': self.use_mirror,
131 'CACHE_DIR': self.m.path['git_cache'],
szager1 2016/03/08 02:24:43 Is this a static default path?
iannucci 2016/03/08 04:09:40 this is https://github.com/luci/recipes-py/blob/ma
131 } 132 }
132 ret['CACHE_DIR'] = self.m.path['root'].join('git_cache')
133 return ret
134 133
135 def resolve_revision(self, revision): 134 def resolve_revision(self, revision):
136 if hasattr(revision, 'resolve'): 135 if hasattr(revision, 'resolve'):
137 return revision.resolve(self.m.properties) 136 return revision.resolve(self.m.properties)
138 return revision 137 return revision
139 138
140 def sync(self, cfg, with_branch_heads=False, **kwargs): 139 def sync(self, cfg, with_branch_heads=False, **kwargs):
141 revisions = [] 140 revisions = []
142 for i, s in enumerate(cfg.solutions): 141 for i, s in enumerate(cfg.solutions):
143 if s.safesync_url: # prefer safesync_url in gclient mode 142 if s.safesync_url: # prefer safesync_url in gclient mode
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 for (path, dir, files) in os.walk(build_path): 321 for (path, dir, files) in os.walk(build_path):
323 for cur_file in files: 322 for cur_file in files:
324 if cur_file.endswith('index.lock'): 323 if cur_file.endswith('index.lock'):
325 path_to_file = os.path.join(path, cur_file) 324 path_to_file = os.path.join(path, cur_file)
326 print 'deleting %s' % path_to_file 325 print 'deleting %s' % path_to_file
327 os.remove(path_to_file) 326 os.remove(path_to_file)
328 """, 327 """,
329 args=[self.m.path['slave_build']], 328 args=[self.m.path['slave_build']],
330 infra_step=True, 329 infra_step=True,
331 ) 330 )
OLDNEW
« no previous file with comments | « no previous file | recipe_modules/gclient/config.py » ('j') | recipe_modules/gclient/config.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698