changeset 864:653f12dbaf9f storage-ng

use colon to separate mountpoint from revid, not slash which makes it look like a path in the url
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 25 Sep 2011 13:23:35 +0200
parents d421f075eb30
children 8e63434d6c1a
files MoinMoin/storage/middleware/routing.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/storage/middleware/routing.py	Sun Sep 25 13:13:37 2011 +0200
+++ b/MoinMoin/storage/middleware/routing.py	Sun Sep 25 13:23:35 2011 +0200
@@ -73,10 +73,10 @@
         #       can be given to get_revision and be routed to the right backend.
         for mountpoint, backend in self.mapping:
             for revid in backend:
-                yield u'%s/%s' % (mountpoint, revid)
+                yield u'%s:%s' % (mountpoint, revid)
 
     def retrieve(self, revid):
-        mountpoint, revid = revid.rsplit(u'/', 1)
+        mountpoint, revid = revid.rsplit(u':', 1)
         backend = self._get_backend(mountpoint)[0]
         meta, data = backend.retrieve(revid)
         if mountpoint:
@@ -103,7 +103,7 @@
             raise TypeError('backend %r mounted at %r is readonly' % (
                 backend, mountpoint))
         meta[NAME] = itemname
-        return u'%s/%s' % (mountpoint, backend.store(meta, data))
+        return u'%s:%s' % (mountpoint, backend.store(meta, data))
 
     def remove(self, revid):
         mountpoint, revid = revid.rsplit(u'/', 1)