Mercurial > piecrust2
changeset 872:3004ab31bb46
showrecord: Don't show records that don't match the given filters.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 13 Jun 2017 22:30:45 -0700 |
parents | 504ddb370df8 |
children | 93ea115027fc |
files | piecrust/commands/builtin/baking.py |
diffstat | 1 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/piecrust/commands/builtin/baking.py Tue Jun 13 22:30:27 2017 -0700 +++ b/piecrust/commands/builtin/baking.py Tue Jun 13 22:30:45 2017 -0700 @@ -209,9 +209,12 @@ if ctx.args.fails and rec.success: continue - logger.info("Record: %s" % rec.name) - logger.info("Status: %s" % ('SUCCESS' if rec.success - else 'FAILURE')) + ppname = rec.name[rec.name.index('@') + 1:] + if ppname not in pipelines: + continue + + entries_to_show = [] + for e in rec.getEntries(): if ctx.args.fails and e.success: continue @@ -221,9 +224,15 @@ [fnmatch.fnmatch(op, out_pattern) for op in e.getAllOutputPaths()]): continue - _print_record_entry(e) + entries_to_show.append(e) - logger.info("") + if entries_to_show: + logger.info("Record: %s" % rec.name) + logger.info("Status: %s" % ('SUCCESS' if rec.success + else 'FAILURE')) + for e in entries_to_show: + _print_record_entry(e) + logger.info("") stats = records.stats if ctx.args.show_stats: