aboutsummaryrefslogtreecommitdiffstats
path: root/libbe
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2008-11-23 10:08:18 -0500
committerW. Trevor King <wking@drexel.edu>2008-11-23 10:08:18 -0500
commit298c3b34765821a81fede2ff6edc8769e87c0c27 (patch)
treefff424c55f9f00b9bd0ede1d02bf04889cb6ba38 /libbe
parent510c9f33393c1f222ee56732c026f229ed8ae49d (diff)
downloadbugseverywhere-298c3b34765821a81fede2ff6edc8769e87c0c27.tar.gz
libbe/diff.diff() was missing newly created bugs. Fixed.
Also added blank lines to separate the new/modified/removed groups.
Diffstat (limited to 'libbe')
-rw-r--r--libbe/diff.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/libbe/diff.py b/libbe/diff.py
index f147bce..84b3bfe 100644
--- a/libbe/diff.py
+++ b/libbe/diff.py
@@ -33,7 +33,7 @@ def diff(old_bugdir, new_bugdir):
except KeyError:
removed.append(old_bug)
for uuid in new_bugdir.list_uuids():
- if not old_bugdir.bug_map.has_key(new_bug.uuid):
+ if not old_bugdir.bug_map.has_key(uuid):
new_bug = new_bugdir.bug_from_uuid(uuid)
added.append(new_bug)
return (removed, modified, added)
@@ -51,6 +51,7 @@ def diff_report(diff_data, bug_dir):
print "New bug reports:"
for bug in added:
print bug.string(shortlist=True)
+ print ""
if len(modified) > 0:
printed = False
@@ -62,12 +63,14 @@ def diff_report(diff_data, bug_dir):
printed = True
print "Modified bug reports:"
print change_str
+ print ""
if len(removed) > 0:
print "Removed bug reports:"
for bug in removed:
print bug.string(shortlist=True)
-
+ print ""
+
def change_lines(old, new, attributes):
change_list = []
for attr in attributes: