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

Unified Diff: recipe_engine/fetch.py

Issue 2845783002: [recipes.py] Move fetch, lint and bundle parsers to separate modules. (Closed)
Patch Set: rebase Created 3 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 side-by-side diff with in-line comments
Download patch
Index: recipe_engine/fetch.py
diff --git a/recipe_engine/fetch.py b/recipe_engine/fetch.py
index 2dd80cd81ddd4260d870765dca9e968237202b5d..4a44109fed291c16a9606285f3afc7a4a663b531 100644
--- a/recipe_engine/fetch.py
+++ b/recipe_engine/fetch.py
@@ -592,3 +592,20 @@ class GitilesBackend(Backend):
rev_json.message_lines,
spec,
has_interesting_changes(spec, rev_json.changed_files))
+
+
+def add_subparser(parser):
+ fetch_p = parser.add_parser(
+ 'fetch',
+ description='Fetch and update dependencies.')
+
+ def postprocess_func(parser, args):
+ if args.no_fetch:
+ parser.error('--no-fetch doesn\'t make sense with fetch command')
+
+ fetch_p.set_defaults(
+ command='fetch',
+ # fetch action is implied by recipes.py
+ func=(lambda package_deps, engine_flags: 0),
+ postprocess_func=postprocess_func,
+ )

Powered by Google App Engine
This is Rietveld 408576698