[Apt-listbugs-commits] [apt-listbugs] 02/06: suppress duplicate merged bugs in RSS output

Francesco Poli frx-guest at moszumanska.debian.org
Wed Apr 15 20:35:30 UTC 2015


This is an automated email from the git hooks/post-receive script.

frx-guest pushed a commit to branch master
in repository apt-listbugs.

commit 3e4b4f2f308e4acfef6d3761ee21f1d95dd530c1
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date:   Wed Apr 1 23:19:14 2015 +0200

    suppress duplicate merged bugs in RSS output
---
 debian/changelog         | 1 +
 lib/aptlistbugs/logic.rb | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 62cb103..d6e4049 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,7 @@ apt-listbugs (0.1.17) UNRELEASED; urgency=medium
   * improved HTML bug lists (strings are now encoded to be valid XML)
   * fixed RSS output (suppressed double encoding of strings)
   * improved and internationalized RSS output
+  * suppressed duplicate entries for merged bugs in RSS output
 
  -- Francesco Poli (wintermute) <invernomuto at paranoici.org>  Sun, 04 Jan 2015 11:42:30 +0100
 
diff --git a/lib/aptlistbugs/logic.rb b/lib/aptlistbugs/logic.rb
index 4bc1b0f..0009557 100644
--- a/lib/aptlistbugs/logic.rb
+++ b/lib/aptlistbugs/logic.rb
@@ -819,8 +819,12 @@ class Viewer
         maker.channel.description = @config.title
         maker.channel.link = "http://bugs.debian.org/"
 
+        p_bug_numbers = []
+
         bugs.each { |bug|
           if @config.stats.include?( bug.stat )
+            next if p_bug_numbers.include?(bug.bug_number)
+            p_bug_numbers << bug.bug_number
             item = maker.items.new_item
             item.link = "http://bugs.debian.org/#{bug.bug_number}"
             item.title = "##{bug.bug_number} - #{bug.desc}"
@@ -840,6 +844,7 @@ class Viewer
               bug.mergeids.each { |id|
                 url  = "http://bugs.debian.org/#{id}"
                 buf << " <a href=\"#{url}\">#{id}</a>"
+                p_bug_numbers << id
               }
               buf << "</li>\n"
             end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/apt-listbugs/apt-listbugs.git



More information about the Apt-listbugs-commits mailing list