Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: sgoldman@tower-research.com (Steve Goldman)
Subject: [sup-talk] Inconsistent inbox after restart
Date: Fri, 01 May 2009 16:23:53 -0400	[thread overview]
Message-ID: <1241209146-sup-3561@sgoldmanlinux.tower-research.com> (raw)
In-Reply-To: <f96e0240904300729l1493160eqdcc642af5aae1c15@mail.gmail.com>

I have found the offensive commit...

Whoever was working on this, can you take a look and figure out where
the bug is?

(And for all you perl bashers out there, given this ridiculous line
of ruby, you officially can't talk any more shit.)


063ec996a24b13b5dc9a59e21aa42ba629ab510a

--- a/lib/sup/poll.rb
+++ b/lib/sup/poll.rb
@@ -97,7 +97,7 @@ EOS
         numi = 0
         add_messages_from source do |m, offset, entry|
           ## always preserve the labels on disk.
-          m.labels = entry[:label].split(/\s+/).map { |x| x.intern } if entry
+          m.labels = ((m.labels - [:unread, :inbox]) + entry[:label].split(/\s+/).map { |x| x.intern }).uniq if entry
           yield "Found message at #{offset} with labels {#{m.labels * ', '}}"
           unless entry
             num += 1
-- 

Steve Goldman
sgoldman at tower-research.com

T: 212.219.6014
F: 212.219.6007

Tower Research Capital, LLC
377 Broadway, 11th Fl.
New York, NY 10013


  parent reply	other threads:[~2009-05-01 20:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-28 19:19 Steve Goldman
2009-04-29  8:17 ` Tyberius Prime
2009-04-29  8:40 ` Nicolas Pouillard
2009-04-29  8:37   ` Tyberius Prime
2009-04-29 18:10 ` William Morgan
2009-04-30  7:11   ` Tyberius Prime
2009-04-30 12:51     ` Steve Goldman
2009-04-30 13:10       ` Ben Walton
2009-04-30 13:36         ` William Morgan
2009-04-30 14:23           ` Steve Goldman
     [not found]             ` <f96e0240904300729l1493160eqdcc642af5aae1c15@mail.gmail.com>
2009-05-01 20:23               ` Steve Goldman [this message]
2009-05-04 13:32                 ` William Morgan
2009-05-04 13:46                   ` Steve Goldman
2009-04-30 13:19       ` William Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1241209146-sup-3561@sgoldmanlinux.tower-research.com \
    --to=sgoldman@tower-research.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox