aboutsummaryrefslogtreecommitdiffstats
path: root/libbe
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-12-05 16:50:34 -0500
committerW. Trevor King <wking@drexel.edu>2009-12-05 16:50:34 -0500
commita1f3221ee5bd85a72b6e31a527b4c4e6f6933d6e (patch)
tree21140cad0adbed294b5bd2e35bcaec71d0980e2a /libbe
parente8f1c5709af7fb0d618dcf142d51dc95ef7d6c2c (diff)
downloadbugseverywhere-a1f3221ee5bd85a72b6e31a527b4c4e6f6933d6e.tar.gz
Fix libbe.diff.Diff._changed_bugs() to handle subscriptions by bug shortname.
Diffstat (limited to 'libbe')
-rw-r--r--libbe/diff.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/libbe/diff.py b/libbe/diff.py
index b3cd6bc..c0132ff 100644
--- a/libbe/diff.py
+++ b/libbe/diff.py
@@ -352,9 +352,14 @@ class Diff (object):
if bd_type in bugdir_types:
old_uuids = list(self.old_bugdir.uuids())
break
- subscribed_bugs = [s.id for s in subscriptions
- if BUG_TYPE_ALL.has_descendant( \
- s.type, match_self=True)]
+ subscribed_bugs = []
+ for s in subscriptions:
+ if s.id != BUGDIR_ID:
+ try:
+ bug = self.new_bugdir.bug_from_shortname(s.id)
+ except bugdir.NoBugMatches:
+ bug = self.old_bugdir.bug_from_shortname(s.id)
+ subscribed_bugs.append(bug.uuid)
new_uuids.extend([s for s in subscribed_bugs
if self.new_bugdir.has_bug(s)])
new_uuids = sorted(set(new_uuids))