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

Unified Diff: recipe_engine/remote_run.py

Issue 2071443003: Introduce different repo types (git and gitiles) (Closed) Base URL: https://github.com/luci/recipes-py.git@master
Patch Set: 80cols Created 4 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 side-by-side diff with in-line comments
Download patch
Index: recipe_engine/remote_run.py
diff --git a/recipe_engine/remote_run.py b/recipe_engine/remote_run.py
index 8b6e7fe8bcbfd616da78292b841465977ae8c72a..c3bd363744b781c387207b40b9b267d26dc63552 100644
--- a/recipe_engine/remote_run.py
+++ b/recipe_engine/remote_run.py
@@ -36,12 +36,12 @@ def main(args):
checkout_dir = os.path.join(args.workdir, 'checkout')
if args.use_gitiles:
args.revision = args.revision or 'HEAD'
- fetch.ensure_gitiles_checkout(
- args.repository, args.revision, checkout_dir, allow_fetch=True)
+ backend = fetch.GitilesGitBackend()
else:
args.revision = args.revision or 'FETCH_HEAD'
- fetch.ensure_git_checkout(
- args.repository, args.revision, checkout_dir, allow_fetch=True)
+ backend = fetch.LocalGitBackend()
+ backend.checkout(
+ args.repository, args.revision, checkout_dir, allow_fetch=True)
recipes_cfg = package.ProtoFile(
package.InfraRepoConfig().to_recipes_cfg(checkout_dir))
cmd = [

Powered by Google App Engine
This is Rietveld 408576698