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

Unified Diff: scripts/slave/recipe_modules/gclient/api.py

Issue 24737002: Add Paths as first-class types in configs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: license Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: scripts/slave/recipe_modules/gclient/api.py
diff --git a/scripts/slave/recipe_modules/gclient/api.py b/scripts/slave/recipe_modules/gclient/api.py
index e9f6621ea15ad18ea33186ab4d9cc0a369a058b5..2c1ef0cd6d51ed83a2af8f14ea26d265cd4a4f71 100644
--- a/scripts/slave/recipe_modules/gclient/api.py
+++ b/scripts/slave/recipe_modules/gclient/api.py
@@ -146,17 +146,10 @@ class GclientApi(recipe_api.RecipeApi):
steps.append(self(name, ['recurse', 'git', 'config', var, val],
**kwargs))
- cwd = kwargs.get('cwd')
- for c in cfg.checkouts:
- path = self.m.path.slave_build(c)
- if cwd:
- path = self.m.path.join(cwd, c)
- self.m.path.add_checkout(path)
- for s in cfg.solutions:
- path = self.m.path.slave_build(s.name)
- if cwd:
- path = self.m.path.join(cwd, s.name)
- self.m.path.add_checkout(path)
+ cwd = kwargs.get('cwd', self.m.path.slave_build)
+ self.m.path.set_dynamic_path(
+ 'checkout', cwd(*cfg.solutions[0].name.split(self.m.path.sep)),
+ overwrite=False)
return steps
@@ -169,7 +162,7 @@ class GclientApi(recipe_api.RecipeApi):
return self.m.python(prefix + 'revert',
self.m.path.build('scripts', 'slave', 'gclient_safe_revert.py'),
- ['.', self.m.path.depot_tools('gclient', wrapper=True)],
+ ['.', self.m.path.depot_tools('gclient', platform_ext={'win': '.bat'})],
**kwargs
)

Powered by Google App Engine
This is Rietveld 408576698