Subject: [sup-talk] sup errors with 0 messages in a folder

From: [email-masked] (Dan Sully)
Date: Mon, 23 Jul 2007 14:03:34 -0700

If there is a maildir folder with 0 messages, sup will die:

lib/sup/source.rb:80:in `done?': undefined method `>=' for nil:NilClass
(NoMethodError)

I've tried catching that in lib/sup/poll.rb, which works for sup-sync (to get
it to "complete"), but the index isn't written out correctly, so sup proper
thinks that folder is then out of sync.

-D
--
<dsully> please describe web 2.0 to me in 2 sentences or less.
<jwb> you make all the content. they keep all the revenue.

---

From: [email-masked] (William Morgan)
Date: Tue, 24 Jul 2007 10:52:56 -0700

A non-text attachment was scrubbed...
Name: a.patch
Type: application/octet-stream
Size: 446 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070724/711d24a5/attachment-0001.obj

---

From: [email-masked] (Dan Sully)
Date: Tue, 24 Jul 2007 11:14:17 -0700

* William Morgan shaped the electrons to say...

>I don't have a good maildir testing setup any more. Can you try this
>quick fix? (Going through this code again reminds me how I need to
>rework it all...)

Yep - works much better than my hack did.

Thanks

-D

---

From: [email-masked] (Dan Sully)
Date: Tue, 24 Jul 2007 11:26:03 -0700

* Dan Sully shaped the electrons to say...

>Yep - works much better than my hack did.

Well, not quite. sup-sync now completes, but when running sup, I get:

Source: maildir:/home/daniel/mail/lists/perl/p5p/                                                                                                           
Error: Unknown message id 0.                                                                                                                               
Fix: sup-sync --changed maildir:/home/daniel/mail/lists/perl/p5p/         

And running that does not get rid of the message.

-D

---

From: [email-masked] (William Morgan)
Date: Tue, 24 Jul 2007 15:14:59 -0700

A non-text attachment was scrubbed...
Name: a.patch
Type: application/octet-stream
Size: 1233 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070724/25f8db5f/attachment.obj

---

From: [email-masked] (Dan Sully)
Date: Tue, 24 Jul 2007 15:22:44 -0700

>How about this one?

Better.. had to change the "check" to be "start = check"

-D

---

From: [email-masked] (William Morgan)
Date: Tue, 24 Jul 2007 17:00:21 -0700

> Better.. had to change the "check" to be "start = check"

Good catch. Thanks. I'm going to rework these to be less horrendous in
the near future.

-- 
William <wmorgan-sup at masanjin.net>