Commits

MattMaker committed edd2486

patch fs19 to handle items with missing revs gracefully

Comments (0)

Files changed (2)

MoinMoin/storage/backends/__init__.py

 from MoinMoin.error import ConfigurationError
 from MoinMoin.storage.backends import router, fs, fs2, fs19, memory
 
+from MoinMoin import log
+logging = log.getLogger(__name__)
 
 CONTENT = 'content'
 USERPROFILES = 'userprofiles'
         # special case: old moin19 stuff
         from os import path
         data_dir = backend_uri[len(FS19_PREFIX):]
+        logging.debug("backend: %s" % data_dir)
         userprofile = fs19.FSUserBackend(path.join(data_dir, 'user'), '/dev/shm') # assumes user below data_dir
         content = fs19.FSPageBackend(data_dir, '/dev/shm', deleted_mode='keep', default_markup=u'wiki')
         namespace_mapping = [

MoinMoin/storage/backends/fs19.py

             if meta['__rev'] == revno:
                 break
         else:
+            self.to_end()
             raise KeyError
         del meta['__rev']
         meta = dict([(k, v) for k, v in meta.items() if v]) # remove keys with empty values
                 meta[EXTRA] == attachname):
                 break
         else:
+            self.to_begin()
             raise KeyError
         del meta['__rev']
         del meta[EXTRA] #  we have full name in NAME