diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-07-15 16:20:33 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-07-15 20:12:11 +0900 |
commit | f876d30a2130b8373f25d07b0df7d74c3badc392 (patch) | |
tree | 12754611c9b8b51a8a56f761ee85d6be7deae3b7 | |
parent | 1d9fdf00fbf7e31f584f971465ddc5147eedd2fe (diff) | |
download | buildstream-f876d30a2130b8373f25d07b0df7d74c3badc392.tar.gz |
main.py: Use context.log_element_format as default format for `bst show`
-rw-r--r-- | buildstream/_frontend/main.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/buildstream/_frontend/main.py b/buildstream/_frontend/main.py index 9c0641146..d57b93cf2 100644 --- a/buildstream/_frontend/main.py +++ b/buildstream/_frontend/main.py @@ -218,7 +218,7 @@ def track(app, target, variant, deps, except_): @click.option('--order', default="stage", type=click.Choice(['stage', 'alpha']), help='Staging or alphabetic ordering of dependencies') -@click.option('--format', '-f', metavar='FORMAT', default="%{state: >12} %{key} %{name}", +@click.option('--format', '-f', metavar='FORMAT', default=None, type=click.STRING, help='Format string for each element') @click.option('--variant', @@ -248,6 +248,7 @@ def show(app, target, variant, deps, except_, order, format): \b %{name} The element name + %{variant} The selected element variant %{key} The abbreviated cache key (if all sources are consistent) %{full-key} The full cache key (if all sources are consistent) %{state} cached, buildable, waiting or inconsistent @@ -280,6 +281,9 @@ def show(app, target, variant, deps, except_, order, format): if order == "alpha": dependencies = sorted(dependencies) + if not format: + format = app.context.log_element_format + report = app.logger.show_pipeline(dependencies, format) click.echo(report, color=app.colors) |