From a1f3221ee5bd85a72b6e31a527b4c4e6f6933d6e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 5 Dec 2009 16:50:34 -0500 Subject: Fix libbe.diff.Diff._changed_bugs() to handle subscriptions by bug shortname. --- libbe/diff.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'libbe') 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)) -- cgit