[Mailman-Users] Reverse chronological date order for archives

ListGnome ProtonMail listgnome at protonmail.ch
Thu Nov 26 00:17:02 EST 2015


Hi Mark,


I've tested the modified HyperDatabase.py file and it does indeed reverse the chronological order of the archives (but only in date view).
And also as you said, it was necessary to "/bin/arch --wipe LISTNAME" to reverse any existing archives.

Thanks again,
Mark

***
And the patch refactored for style against 2.1.20 is

$ diff -u 2.1/Mailman/Archiver/HyperDatabase.py

def first(self, archive, index):
self.__openIndices(archive)
+ if index == 'date':
+ dateIndex = 1
+ else:
+ dateIndex = 0
index = getattr(self, index + 'Index')
try:
+ if dateIndex == 1:
+ index.sorted.reverse()
key, msgid = index.first()
return msgid
except KeyError:


More information about the Mailman-Users mailing list