Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: brenocon@gmail.com (Brendan O'Connor)
Subject: [sup-talk] tiny fix for sup-faked message id's crashing sup-sync
Date: Mon, 29 Oct 2007 18:55:59 -0700	[thread overview]
Message-ID: <fba9be1d0710291855x15e90fbbp6138a31dd48f0cc1@mail.gmail.com> (raw)

Hello all --

After a tiny bugfix off SVN 650, I'm importing gmail imap!  Very exciting!

I hate it when I add a puts or logging statement and it messes up
ruby's returning conventions, returning nil that clobbers something
elsewhere.  Glad to see it happens to other people too :)

Index: lib/sup/message.rb
===================================================================
--- lib/sup/message.rb  (revision 650)
+++ lib/sup/message.rb  (working copy)
@@ -62,8 +62,8 @@
       if header["message-id"]
         sanitize_message_id header["message-id"]
       else
+        Redwood::log "faking message-id for message from #@from: #@id"
         "sup-faked-" + Digest::MD5.hexdigest(raw_header)
-        Redwood::log "faking message-id for message from #@from: #@id"
       end

     date = header["date"]

................... for reference the error was later, after the
Message's id was nil:

$ sup-sync

...

[Mon Oct 29 17:16:12 -0700 2007] faking message-id for message from
Mail Delivery Subsystem <mailer-daemon at googlemail.com>:
[Mon Oct 29 17:16:12 -0700 2007] saving index and sources...
[Mon Oct 29 17:16:12 -0700 2007] unlocking /Users/brendano/.sup/lock...
/Users/brendano/sw/sup/lib/sup/index.rb:323:in `initialize': can't
convert nil into String (TypeError)
        from /Users/brendano/sw/sup/lib/sup/index.rb:323:in `new'
        from /Users/brendano/sw/sup/lib/sup/index.rb:323:in `load_entry_for_id'
        from /Users/brendano/sw/sup/lib/sup/util.rb:395:in `send'
        from /Users/brendano/sw/sup/lib/sup/util.rb:395:in `method_missing'
        from /Users/brendano/sw/sup/lib/sup/poll.rb:149:in `add_messages_from'
        from /Users/brendano/sw/sup/lib/sup/imap.rb:174:in `each'
        from /Users/brendano/sw/sup/lib/sup/imap.rb:163:in `upto'
        from /Users/brendano/sw/sup/lib/sup/imap.rb:163:in `each'
        from /Users/brendano/sw/sup/lib/sup/util.rb:431:in `send'
        from /Users/brendano/sw/sup/lib/sup/util.rb:431:in `__pass'
        from /Users/brendano/sw/sup/lib/sup/util.rb:420:in `method_missing'
        from /Users/brendano/sw/sup/lib/sup/poll.rb:133:in `add_messages_from'
        from /Users/brendano/sw/sup/lib/sup/util.rb:395:in `send'
        from /Users/brendano/sw/sup/lib/sup/util.rb:395:in `method_missing'
        from /Users/brendano/sw/sup/bin/sup-sync:133
        from /Users/brendano/sw/sup/bin/sup-sync:128:in `each'
        from /Users/brendano/sw/sup/bin/sup-sync:128
Rats, that failed. You may have to do it manually.


             reply	other threads:[~2007-10-30  1:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-30  1:55 Brendan O'Connor [this message]
2007-11-02  2:35 ` William Morgan
     [not found] ` <321bb12900151bd3@IMSS-WIN>
2007-11-02 10:01   ` Marcus Williams
2007-11-02 15:17     ` 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=fba9be1d0710291855x15e90fbbp6138a31dd48f0cc1@mail.gmail.com \
    --to=brenocon@gmail.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