Add info feature of cros_workon back
This helps new developers find the source code for a package.
BUG=brillo:983
TEST=`cros_workon --all info`
Change-Id: I4175fe5476d66b7a647ee4d7b490175a5823385f
Reviewed-on: https://chromium-review.googlesource.com/270147
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
Tested-by: Christopher Wiley <wiley@chromium.org>
diff --git a/scripts/cros_workon.py b/scripts/cros_workon.py
index 5ca6f09..22e03fc 100644
--- a/scripts/cros_workon.py
+++ b/scripts/cros_workon.py
@@ -116,7 +116,10 @@
helper.StopWorkingOnPackages(options.packages, use_all=options.all,
use_workon_only=options.workon_only)
elif options.command == 'info':
- cros_build_lib.Die('%s is not implemented.', options.command)
+ triples = helper.GetPackageInfo(options.packages, use_all=options.all,
+ use_workon_only=options.workon_only)
+ for package, repos, paths in triples:
+ print(package, ','.join(repos), ','.join(paths))
elif options.command == 'list':
packages = helper.ListAtoms(
use_all=options.all, use_workon_only=options.workon_only)