------------------------------------------------------------
revno: 1095
committer: Mark Sapiro <[email protected]>
branch nick: 2.2
timestamp: Mon 2010-02-22 17:10:05 -0800
message:
Additional cleanup of pipermail threading
modified:
Mailman/Archiver/HyperArch.py
Mailman/Archiver/pipermail.py
--
lp:mailman/2.2
https://code.launchpad.net/~mailman-coders/mailman/2.2
Your team Mailman Checkins is subscribed to branch lp:mailman/2.2.
To unsubscribe from this branch go to
https://code.launchpad.net/~mailman-coders/mailman/2.2/+edit-subscription.
=== modified file 'Mailman/Archiver/HyperArch.py'
--- Mailman/Archiver/HyperArch.py 2009-02-13 02:52:31 +0000
+++ Mailman/Archiver/HyperArch.py 2010-02-23 01:10:05 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2010 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -438,8 +438,11 @@
prefix_pat = re.sub(r'%\d*d', r'\s*\d+\s*', prefix_pat)
subject = re.sub(prefix_pat, '', subject)
subject = subject.lstrip()
+ # MAS Should we strip FW and FWD too?
strip_pat = re.compile('^((RE|AW|SV|VS)(\[\d+\])?:\s*)+', re.I)
stripped = strip_pat.sub('', subject)
+ # Also remove whitespace to avoid folding/unfolding differences
+ stripped = re.sub('\s', '', stripped)
return stripped
def decode_charset(self, field):
=== modified file 'Mailman/Archiver/pipermail.py'
--- Mailman/Archiver/pipermail.py 2010-02-13 21:51:10 +0000
+++ Mailman/Archiver/pipermail.py 2010-02-23 01:10:05 +0000
@@ -651,8 +651,10 @@
def get_parent_info(self, archive, article):
parentID = None
if article.in_reply_to:
- parentID = article.in_reply_to
- elif article.references:
+ if self.database.hasArticle(archive, article.in_reply_to):
+ # Only use In-Reply-To if it's in the archive.
+ parentID = article.in_reply_to
+ if not parentID and article.references:
refs = self._remove_external_references(article.references)
if refs:
maxdate = self.database.getArticle(archive, refs[0])
@@ -661,7 +663,7 @@
if a.date > maxdate.date:
maxdate = a
parentID = maxdate.msgid
- else:
+ if not parentID:
# Get the oldest article with a matching subject, and
# assume this is a follow-up to that article
# But, use the subject that's in the database
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org