From 678d074ba2d20c22255abdcc8c41f3c0e2ec2c2a Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 23 Jul 2009 10:08:04 -0400 Subject: Added bugdir setting comparision to libbe.diff. Renamed libbe.diff.diff -> bug_diffs, since it doesn't compare bugdirs. Load comments before bug comparision so cmp_comments will see them. Use .settings_properties rather than static lists to create attribute lists for change_lines(). Removed trailing endline from becommands/diff.py output. --- becommands/diff.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'becommands/diff.py') diff --git a/becommands/diff.py b/becommands/diff.py index 491261e..13402c0 100644 --- a/becommands/diff.py +++ b/becommands/diff.py @@ -37,7 +37,6 @@ def execute(args, test=False): Modified bug reports: a:cm: Bug A status: open -> closed - """ parser = get_parser() options, args = parser.parse_args(args) @@ -53,7 +52,7 @@ def execute(args, test=False): print "This directory is not revision-controlled." else: old_bd = bd.duplicate_bugdir(revision) - r,m,a = diff.diff(old_bd, bd) + r,m,a = diff.bug_diffs(old_bd, bd) optbugs = [] if options.all == True: @@ -68,7 +67,9 @@ def execute(args, test=False): for bug in optbugs: print bug.uuid else : - print diff.diff_report((r,m,a), bd).encode(bd.encoding) + rep = diff.diff_report((r,m,a), old_bd, bd).encode(bd.encoding) + if len(rep) > 0: + print rep bd.remove_duplicate_bugdir() def get_parser(): -- cgit