changeset 1112:59f77f472b06

Merge with main.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Mon, 31 Jul 2006 11:24:00 +0200
parents b27d720fbc8e (current diff) 2aa53ed0afa0 (diff)
children a300349712b9 a31940162a32
files
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Mon Jul 31 01:07:59 2006 +0200
+++ b/MoinMoin/config/multiconfig.py	Mon Jul 31 11:24:00 2006 +0200
@@ -553,7 +553,7 @@
         # check if mail is possible and set flag:
         self.mail_enabled = (self.mail_smarthost is not None or self.mail_sendmail is not None) and self.mail_from
         
-        self.meta_dict = wikiutil.MetaDict(os.path.join(data_dir, 'meta'))
+        self.meta_dict = wikiutil.MetaDict(os.path.join(data_dir, 'meta'), self.cache_dir)
 
         # interwiki ID processing
         self.load_IWID()
--- a/MoinMoin/script/migration/data.py	Mon Jul 31 01:07:59 2006 +0200
+++ b/MoinMoin/script/migration/data.py	Mon Jul 31 11:24:00 2006 +0200
@@ -39,7 +39,7 @@
         meta_fname = os.path.join(data_dir, 'meta')
         while True:
             try:
-                meta = wikiutil.MetaDict(meta_fname)
+                meta = wikiutil.MetaDict(meta_fname, request.cfg.cache_dir)
                 try:
                     curr_rev = meta['data_format_revision']
                     mig_name = str(curr_rev)
--- a/MoinMoin/wikiutil.py	Mon Jul 31 01:07:59 2006 +0200
+++ b/MoinMoin/wikiutil.py	Mon Jul 31 11:24:00 2006 +0200
@@ -411,13 +411,13 @@
     """ store meta informations as a dict.
     XXX It is not thread-safe, add locks!
     """
-    def __init__(self, metafilename):
+    def __init__(self, metafilename, cache_directory):
         """ create a MetaDict from metafilename """
         dict.__init__(self)
         self.metafilename = metafilename
         self.dirty = False
         self.loaded = False
-        lock_dir = os.path.normpath(os.path.join(metafilename, '..', 'cache', '__metalock__'))
+        lock_dir = os.path.join(cache_directory, '__metalock__')
         self.rlock = lock.ReadLock(lock_dir, 60.0)
         self.wlock = lock.WriteLock(lock_dir, 60.0)