Apply 02_HyperDatabase_mapkeys.patch
authorMichael Spang <mspang@uwaterloo.ca>
Thu, 13 Sep 2007 00:32:50 +0000 (20:32 -0400)
committerMichael Spang <mspang@uwaterloo.ca>
Thu, 13 Sep 2007 00:32:50 +0000 (20:32 -0400)
Mailman/Archiver/HyperDatabase.py

index 2867174..0289184 100644 (file)
@@ -336,3 +336,10 @@ class HyperDatabase(pipermail.Database):
             try:
                 key, msgid=self.threadIndex.next()
             except KeyError: finished=1
+
+    def mapKeys(self, f, archive, index):
+        self.__openIndices(archive)
+        index = getattr(self, index + 'Index')
+        d = index.dict
+        index.dict = dict(zip(map(f, d.keys()), d.values()))
+        index.__dirty = 1