Attachment 'dicts_change.patch'
Download 1 diff -r 691dc24ee12e MoinMoin/caching.py
2 --- a/MoinMoin/caching.py Sat May 17 11:49:55 2008 +0200
3 +++ b/MoinMoin/caching.py Sat May 17 13:48:52 2008 +0200
4 @@ -13,7 +13,7 @@
5 from MoinMoin import log
6 logging = log.getLogger(__name__)
7
8 -from MoinMoin import config
9 +from MoinMoin import config, wikiutil
10 from MoinMoin.util import filesys, lock, pickle, PICKLE_PROTOCOL
11
12
13 @@ -81,10 +81,7 @@
14 return os.path.exists(self._filename())
15
16 def mtime(self):
17 - try:
18 - return os.path.getmtime(self._filename())
19 - except (IOError, OSError):
20 - return 0
21 + return wikiutil.pseudo_id()
22
23 def needsUpdate(self, filename, attachdir=None):
24 # following code is not necessary. will trigger exception and give same result
25 diff -r 691dc24ee12e MoinMoin/wikidicts.py
26 --- a/MoinMoin/wikidicts.py Sat May 17 11:49:55 2008 +0200
27 +++ b/MoinMoin/wikidicts.py Sat May 17 13:48:52 2008 +0200
28 @@ -292,7 +292,7 @@
29 current_disk_cache_mtime = cache.mtime()
30 try:
31 self.__dict__.update(self.cfg.cache.DICTS_DATA)
32 - if current_disk_cache_mtime > self.disk_cache_mtime:
33 + if current_disk_cache_mtime != self.disk_cache_mtime:
34 self.reset()
35 raise AttributeError # not fresh, force load from disk
36 else:
37 diff -r 691dc24ee12e MoinMoin/wikiutil.py
38 --- a/MoinMoin/wikiutil.py Sat May 17 11:49:55 2008 +0200
39 +++ b/MoinMoin/wikiutil.py Sat May 17 13:48:52 2008 +0200
40 @@ -21,9 +21,8 @@
41 logging = log.getLogger(__name__)
42
43 from MoinMoin import config
44 -from MoinMoin.util import pysupport, lock
45 +from MoinMoin.util import random_string, pysupport, lock
46 from inspect import getargspec, isfunction, isclass, ismethod
47 -
48
49 # Exceptions
50 class InvalidFileNameError(Exception):
51 @@ -2509,3 +2508,7 @@
52
53 return pi, body
54
55 +def pseudo_id():
56 + chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
57 + return id(random_string(10, chars))
58 +
59
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.