[Pkg-mailman-hackers] Debian Mailman Patch 30_pipermail_threads.patch breaks threading

Mark Sapiro mark at msapiro.net
Tue Jul 28 23:40:21 UTC 2009


Mark Sapiro wrote:

>Mark Sapiro wrote:
>
>>The patch 30_pipermail_threads.patch for bug #167758
>><http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=167758> causes
>>improper threading in pipermail archives.
>>
>>For example, the post with subject "Twisted Trial" at
>><http://twistedmatrix.com/pipermail/twisted-python/2009-June/thread.html#19859>
>>is indented below the previous post even though it did not reference
>>that post in any way.
>>
>>Also, on the same index page, many posts are indented more than the
>>proper number of levels.
>>
>>This can also be seen at
>><http://twistedmatrix.com/pipermail/glyph-discuss/2009-May/thread.html>
>>where the only two posts are indented to the 'next' level even though
>>there are no posts at the 'higher' level.
>>
>>See <http://allmydata.org/pipermail/tahoe-dev/2009-July/thread.html>
>>for another example of an improperly indented index.
>>
>>I confirmed that 30_pipermail_threads.patch causes this by downloading
>><http://allmydata.org/pipermail/tahoe-dev/2009-July.txt> and building
>>an archive from it with Mailman's bin/arch. The threading in the
>>resulting index looked correct. I then applied
>>30_pipermail_threads.patch and built the archive again with bin/arch
>>and the result was the incorrectly indented index.
>>
>>I do see the problem in the original bug report, and in my test with a
>>simple 4-message input the patch does partially correct it, but even
>>there the subsequent messages are excessively indented.
>>
>>When I get a chance, I'll try to come up with a proper fix.
>
>
>I understand why the patch causes excessive indentation. The
>indentation level is determined by the number of hyphens ('-') in the
>threadKey. Thus when the patch does things like
>
>-            myThreadKey = article.date + '-'
>+            myThreadKey = article.date + '/' + article.msgid + '-'
>
>and article.msgid contains one or more hyphens, the resultant key winds
>up with too many hyphens and is thus indented too far.
>
>One possible fix to the patch is to remove any hyphens from the msgid
>or replace them with some other character before appending the msgid
>to the time stamp.
>
>Another possibility is to append article.sequence instead of
>article.msgid. This should still be unique and won't contain hyphens.
>
>I'll do some more testing with this.


I have modified the 30_pipermail_threads.patch and the modified patch
is attached as 30_pipermail_threads_mod.patch.txt.

This modified patch adds a stringified article.sequence to the article
timestamp to make that key unique even if two articles are timestamped
within the same second. This fixes the original problem of bug #167758
without causing spurious extra indentation in the archive thread index.

I intend to apply this upstream in the next release.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 30_pipermail_threads_mod.patch.txt
URL: <http://lists.alioth.debian.org/pipermail/pkg-mailman-hackers/attachments/20090728/43cf767f/attachment.txt>


More information about the Pkg-mailman-hackers mailing list