1. MattMaker
  2. moin-2.0


MattMaker  committed edd2486

patch fs19 to handle items with missing revs gracefully

  • Participants
  • Parent commits 5ac57ba
  • Branches default

Comments (0)

Files changed (2)

File MoinMoin/storage/backends/__init__.py

View file
  • Ignore whitespace
 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 = [

File MoinMoin/storage/backends/fs19.py

View file
  • Ignore whitespace
             if meta['__rev'] == revno:
+            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):
+            self.to_begin()
             raise KeyError
         del meta['__rev']
         del meta[EXTRA] #  we have full name in NAME