changeset 1114:a300349712b9

merge main
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 01 Aug 2006 00:12:17 +0200
parents 9485500daadf (current diff) 59f77f472b06 (diff)
children a349adcabffe
files
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Tue Aug 01 00:11:34 2006 +0200
+++ b/MoinMoin/config/multiconfig.py	Tue Aug 01 00:12:17 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	Tue Aug 01 00:11:34 2006 +0200
+++ b/MoinMoin/script/migration/data.py	Tue Aug 01 00:12:17 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	Tue Aug 01 00:11:34 2006 +0200
+++ b/MoinMoin/wikiutil.py	Tue Aug 01 00:12:17 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)