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

Unified Diff: recipes.py

Issue 2845843002: [recipes.py] move refs arg parsing to its module (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
« recipe_engine/refs.py ('K') | « recipe_engine/refs.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipes.py
diff --git a/recipes.py b/recipes.py
index 15d6786dc9812f3adca2481ded1a6e0bf1465409..20d900031def28151ebed65a243e144e547dd70c 100755
--- a/recipes.py
+++ b/recipes.py
@@ -241,15 +241,6 @@ class ProjectOverrideAction(argparse.Action):
v[project_id] = path
-def refs(config_file, package_deps, args):
- from recipe_engine import refs
- from recipe_engine import loader
-
- universe = loader.RecipeUniverse(package_deps, config_file)
-
- refs.main(universe, package_deps.root_package, args.modules, args.transitive)
-
-
def doc(config_file, package_deps, args):
from recipe_engine import doc
from recipe_engine import loader
@@ -380,8 +371,8 @@ def main():
common_postprocess_func = add_common_args(parser)
from recipe_engine import fetch, lint_test, bundle, depgraph, autoroll
- from recipe_engine import remote
- to_add = [fetch, lint_test, bundle, depgraph, autoroll, remote]
+ from recipe_engine import remote, refs
+ to_add = [fetch, lint_test, bundle, depgraph, autoroll, remote, refs]
subp = parser.add_subparsers()
for module in to_add:
@@ -464,14 +455,6 @@ def main():
'issue=12345. The property value will be decoded as JSON, but if '
'this decoding fails the value will be interpreted as a string.')
- refs_p = subp.add_parser(
- 'refs',
- description='List places referencing given recipe module(s).')
- refs_p.set_defaults(command='refs')
- refs_p.add_argument('modules', nargs='+', help='Module(s) to query for')
- refs_p.add_argument('--transitive', action='store_true',
- help='Compute transitive closure of the references')
-
doc_kinds=('binarypb', 'jsonpb', 'textpb', 'markdown(github)',
'markdown(gitiles)')
doc_p = subp.add_parser(
@@ -606,8 +589,6 @@ def _real_main(args):
return test(config_file, package_deps, args)
elif args.command == 'run':
return run(config_file, package_deps, args)
- elif args.command == 'refs':
- return refs(config_file, package_deps, args)
elif args.command == 'doc':
return doc(config_file, package_deps, args)
else:
« recipe_engine/refs.py ('K') | « recipe_engine/refs.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698