# HG changeset patch # User Ludovic Chabant # Date 1497418245 25200 # Node ID 3004ab31bb46dcd0d13db2669952d10409c51f5e # Parent 504ddb370df809db666a083ef679d35e27e2f578 showrecord: Don't show records that don't match the given filters. diff -r 504ddb370df8 -r 3004ab31bb46 piecrust/commands/builtin/baking.py --- 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: