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

Unified Diff: recipes.py

Issue 2846683002: [recipes.py] move depgraph 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
« no previous file with comments | « recipe_engine/depgraph.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 77faaa267c42f0f16270a7f26c00875fe582c407..1fa7bfcc5b0101cf5c9088117e38c0cd24e0bf1e 100755
--- a/recipes.py
+++ b/recipes.py
@@ -257,16 +257,6 @@ class ProjectOverrideAction(argparse.Action):
v[project_id] = path
-def depgraph(config_file, package_deps, args):
- from recipe_engine import depgraph
- from recipe_engine import loader
-
- universe = loader.RecipeUniverse(package_deps, config_file)
-
- depgraph.main(universe, package_deps.root_package,
- args.ignore_package, args.output, args.recipe_filter)
-
-
def refs(config_file, package_deps, args):
from recipe_engine import refs
from recipe_engine import loader
@@ -400,8 +390,8 @@ def main():
common_postprocess_func = add_common_args(parser)
- from recipe_engine import fetch, lint_test, bundle
- to_add = [fetch, lint_test, bundle]
+ from recipe_engine import fetch, lint_test, bundle, depgraph
+ to_add = [fetch, lint_test, bundle, depgraph]
subp = parser.add_subparsers()
for module in to_add:
@@ -524,27 +514,6 @@ def main():
help=('Emit even more data in the output-json file. '
'Requires --output-json.'))
- depgraph_p = subp.add_parser(
- 'depgraph',
- description=(
- 'Produce graph of recipe and recipe module dependencies. Example: '
- './recipes.py --package infra/config/recipes.cfg depgraph | tred | '
- 'dot -Tpdf > graph.pdf'))
- depgraph_p.set_defaults(command='depgraph')
- depgraph_p.add_argument(
- '--output', type=argparse.FileType('w'), default=sys.stdout,
- help='The file to write output to')
- depgraph_p.add_argument(
- '--ignore-package', action='append', default=[],
- help='Ignore a recipe package (e.g. recipe_engine). Can be passed '
- 'multiple times')
- depgraph_p.add_argument(
- '--recipe-filter', default='',
- help='A recipe substring to examine. If present, the depgraph will '
- 'include a recipe section containing recipes whose names contain '
- 'this substring. It will also filter all nodes of the graph to only '
- 'include modules touched by the filtered recipes.')
-
refs_p = subp.add_parser(
'refs',
description='List places referencing given recipe module(s).')
@@ -691,8 +660,6 @@ def _real_main(args):
return run(config_file, package_deps, args)
elif args.command == 'autoroll':
return autoroll(repo_root, config_file, args)
- elif args.command == 'depgraph':
- return depgraph(config_file, package_deps, args)
elif args.command == 'refs':
return refs(config_file, package_deps, args)
elif args.command == 'doc':
« no previous file with comments | « recipe_engine/depgraph.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698