Add Debian directory
[mspang/vmailman.git] / debian / patches / 02_HyperDatabase_mapkeys.patch
1 --- Mailman/Archiver/HyperDatabase.py   2005-08-27 03:40:17.000000000 +0200
2 +++ Mailman/Archiver/HyperDatabase.py   2007-02-27 20:33:41.103527160 +0100
3 @@ -324,15 +343,22 @@
4  
5      def clearIndex(self, archive, index):
6          self.__openIndices(archive)
7          if hasattr(self.threadIndex, 'clear'):
8              self.threadIndex.clear()
9              return
10          finished=0
11          try:
12              key, msgid=self.threadIndex.first()
13          except KeyError: finished=1
14          while not finished:
15              del self.threadIndex[key]
16              try:
17                  key, msgid=self.threadIndex.next()
18              except KeyError: finished=1
19 +
20 +    def mapKeys(self, f, archive, index):
21 +        self.__openIndices(archive)
22 +        index = getattr(self, index + 'Index')
23 +        d = index.dict
24 +        index.dict = dict(zip(map(f, d.keys()), d.values()))
25 +        index.__dirty = 1