Store current revision ID in metadir
[mw] / src / mw / metadir.py
index 4549a29ffc5b5d4ebba82abd03ab5bea1f2fa49e..67e0b0950a58b95c20cf8b11542c0a4346e1234c 100644 (file)
@@ -70,10 +70,10 @@ class Metadir(object):
         # create cache/pages/
         os.mkdir(os.path.join(self.location, 'cache', 'pages'), 0755)
 
         # create cache/pages/
         os.mkdir(os.path.join(self.location, 'cache', 'pages'), 0755)
 
-    def pagedict_add(self, pagename, pageid):
+    def pagedict_add(self, pagename, pageid, currentrv):
         fd = file(os.path.join(self.location, 'cache', 'pagedict'), 'r+')
         pagedict = json.loads(fd.read())
         fd = file(os.path.join(self.location, 'cache', 'pagedict'), 'r+')
         pagedict = json.loads(fd.read())
-        pagedict[pagename] = int(pageid)
+        pagedict[pagename] = {'id': int(pageid), 'currentrv': int(currentrv)}
         fd.seek(0)
         fd.write(json.dumps(pagedict))
         fd.truncate()
         fd.seek(0)
         fd.write(json.dumps(pagedict))
         fd.truncate()

Benjamin Mako Hill || Want to submit a patch?