changeset 905:51475954290f storage-ng

rename all revno usages to revid (no numbers any more), remove update_item param todo: set meta and reduce revision script
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 30 Sep 2011 16:44:50 +0200
parents 46263060782e
children e1c76814a37d
files MoinMoin/_tests/__init__.py MoinMoin/apps/feed/views.py MoinMoin/apps/frontend/views.py MoinMoin/converter/link.py MoinMoin/datastruct/backends/_tests/test_wiki_dicts.py MoinMoin/datastruct/backends/_tests/test_wiki_groups.py MoinMoin/items/__init__.py MoinMoin/macro/_tests/test_GetVal.py MoinMoin/security/_tests/test_security.py MoinMoin/templates/destroy.html MoinMoin/templates/diff.html MoinMoin/templates/global_history.html MoinMoin/templates/meta.html MoinMoin/templates/revert.html MoinMoin/templates/show.html
diffstat 15 files changed, 104 insertions(+), 104 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/__init__.py	Fri Sep 30 15:53:00 2011 +0200
+++ b/MoinMoin/_tests/__init__.py	Fri Sep 30 16:44:50 2011 +0200
@@ -46,7 +46,7 @@
 
 # Creating and destroying test items --------------------------------
 
-def update_item(name, revno, meta, data):
+def update_item(name, meta, data):
     """ creates or updates an item  """
     if isinstance(data, unicode):
         data = data.encode(config.charset)
--- a/MoinMoin/apps/feed/views.py	Fri Sep 30 15:53:00 2011 +0200
+++ b/MoinMoin/apps/feed/views.py	Fri Sep 30 16:44:50 2011 +0200
@@ -52,14 +52,14 @@
         for rev in history:
             name = rev.meta[NAME]
             item = rev.item
-            this_revno = rev.meta[REVID]
-            previous_revno = rev.meta.get(PARENTID)
+            this_revid = rev.meta[REVID]
+            previous_revid = rev.meta.get(PARENTID)
             this_rev = rev
             try:
-                hl_item = Item.create(name, rev_no=this_revno)
-                if previous_revno is not None:
+                hl_item = Item.create(name, rev_id=this_revid)
+                if previous_revid is not None:
                     # simple text diff for changes
-                    previous_rev = item[previous_revno]
+                    previous_rev = item[previous_revid]
                     content = hl_item._render_data_diff_text(previous_rev.data, this_rev.data)
                     content = '<div><pre>%s</pre></div>' % content
                 else:
@@ -74,7 +74,7 @@
                      summary=rev.meta.get(COMMENT, ''), summary_type='text',
                      content=content, content_type=content_type,
                      author=get_editor_info(rev.meta, external=True),
-                     url=url_for_item(name, rev=this_revno, _external=True),
+                     url=url_for_item(name, rev=this_revid, _external=True),
                      updated=rev.meta[MTIME],
                     )
         content = feed.to_string()
--- a/MoinMoin/apps/frontend/views.py	Fri Sep 30 15:53:00 2011 +0200
+++ b/MoinMoin/apps/frontend/views.py	Fri Sep 30 16:44:50 2011 +0200
@@ -196,7 +196,7 @@
     item_displayed.send(app._get_current_object(),
                         item_name=item_name)
     try:
-        item = Item.create(item_name, rev_no=rev)
+        item = Item.create(item_name, rev_id=rev)
     except AccessDeniedError:
         abort(403)
     show_revision = rev != CURRENT
@@ -210,8 +210,8 @@
                               item=item, item_name=item.name,
                               rev=item.rev,
                               contenttype=item.contenttype,
-                              first_rev_no=first_rev,
-                              last_rev_no=last_rev,
+                              first_rev_id=first_rev,
+                              last_rev_id=last_rev,
                               data_rendered=Markup(item._render_data()),
                               show_revision=show_revision,
                               show_navigation=show_navigation,
@@ -229,7 +229,7 @@
 @frontend.route('/+dom/<itemname:item_name>', defaults=dict(rev=CURRENT))
 def show_dom(item_name, rev):
     try:
-        item = Item.create(item_name, rev_no=rev)
+        item = Item.create(item_name, rev_id=rev)
     except AccessDeniedError:
         abort(403)
     if isinstance(item, NonExistent):
@@ -257,7 +257,7 @@
 @frontend.route('/+highlight/<itemname:item_name>', defaults=dict(rev=CURRENT))
 def highlight_item(item_name, rev):
     try:
-        item = Item.create(item_name, rev_no=rev)
+        item = Item.create(item_name, rev_id=rev)
     except AccessDeniedError:
         abort(403)
     return render_template('highlight.html',
@@ -271,23 +271,23 @@
 def show_item_meta(item_name, rev):
     flaskg.user.addTrail(item_name)
     try:
-        item = Item.create(item_name, rev_no=rev)
+        item = Item.create(item_name, rev_id=rev)
     except AccessDeniedError:
         abort(403)
     show_revision = show_navigation = rev != CURRENT
     first_rev = None
     last_rev = None
     if show_navigation:
-        rev_nos = list(item.rev.item.iter_revs())
-        if rev_nos:
-            first_rev = rev_nos[0]
-            last_rev = rev_nos[-1]
+        rev_ids = list(item.rev.item.iter_revs())
+        if rev_ids:
+            first_rev = rev_ids[0]
+            last_rev = rev_ids[-1]
     return render_template('meta.html',
                            item=item, item_name=item.name,
                            rev=item.rev,
                            contenttype=item.contenttype,
-                           first_rev_no=first_rev,
-                           last_rev_no=last_rev,
+                           first_rev_id=first_rev,
+                           last_rev_id=last_rev,
                            meta_rendered=Markup(item._render_meta()),
                            show_revision=show_revision,
                            show_navigation=show_navigation,
@@ -305,7 +305,7 @@
     item_displayed.send(app._get_current_object(),
                         item_name=item_name)
     try:
-        item = Item.create(item_name, rev_no=rev)
+        item = Item.create(item_name, rev_id=rev)
     except AccessDeniedError:
         abort(403)
     return render_template('content.html',
@@ -317,7 +317,7 @@
 @frontend.route('/+get/<itemname:item_name>', defaults=dict(rev=CURRENT))
 def get_item(item_name, rev):
     try:
-        item = Item.create(item_name, rev_no=rev)
+        item = Item.create(item_name, rev_id=rev)
     except AccessDeniedError:
         abort(403)
     return item.do_get()
@@ -326,7 +326,7 @@
 @frontend.route('/+download/<itemname:item_name>', defaults=dict(rev=CURRENT))
 def download_item(item_name, rev):
     try:
-        item = Item.create(item_name, rev_no=rev)
+        item = Item.create(item_name, rev_id=rev)
         mimetype = request.values.get("mimetype")
     except AccessDeniedError:
         abort(403)
@@ -345,7 +345,7 @@
     """
     contenttype = request.values.get('contenttype')
     try:
-        item = Item.create(item_name, rev_no=-1)
+        item = Item.create(item_name, rev_id=CURRENT)
     except AccessDeniedError:
         abort(403)
     # We don't care about the name of the converted object
@@ -415,7 +415,7 @@
 @frontend.route('/+revert/<rev>/<itemname:item_name>', methods=['GET', 'POST'])
 def revert_item(item_name, rev):
     try:
-        item = Item.create(item_name, rev_no=rev)
+        item = Item.create(item_name, rev_id=rev)
     except AccessDeniedError:
         abort(403)
     if request.method == 'GET':
@@ -429,7 +429,7 @@
             return redirect(url_for_item(item_name))
     return render_template(item.revert_template,
                            item=item, item_name=item_name,
-                           rev_no=rev,
+                           rev_id=rev,
                            form=form,
                           )
 
@@ -577,7 +577,7 @@
         _rev = rev
         destroy_item = False
     try:
-        item = Item.create(item_name, rev_no=_rev)
+        item = Item.create(item_name, rev_id=_rev)
     except AccessDeniedError:
         abort(403)
     if request.method == 'GET':
@@ -592,7 +592,7 @@
             return redirect(url_for_item(item_name))
     return render_template(item.destroy_template,
                            item=item, item_name=item_name,
-                           rev_no=rev,
+                           rev_id=rev,
                            form=form,
                           )
 
@@ -612,12 +612,12 @@
     item_name = subitem_prefix + subitem_name
     try:
         item = Item.create(item_name)
-        revno, size = item.modify()
+        revid, size = item.modify()
         item_modified.send(app._get_current_object(),
                            item_name=item_name)
         return jsonify(name=subitem_name,
                        size=size,
-                       url=url_for('.show_item', item_name=item_name, rev=revno),
+                       url=url_for('.show_item', item_name=item_name, rev=revid),
                        contenttype=contenttype_to_class(contenttype),
                       )
     except AccessDeniedError:
@@ -755,12 +755,12 @@
             item_groups[current_item_name] = [doc]
 
     # Got the item dict, now doing grouping inside them
-    editor_info = namedtuple('editor_info', ['editor', 'editor_revnos'])
+    editor_info = namedtuple('editor_info', ['editor', 'editor_revids'])
     for item_name, docs in item_groups.items():
         item_info = {}
         editors_info = OrderedDict()
         editors = []
-        revnos = []
+        revids = []
         comments = []
         current_doc = docs[0]
         item_info["item_name"] = item_name
@@ -769,25 +769,25 @@
         item_info["contenttype"] = current_doc[CONTENTTYPE]
         item_info["action"] = current_doc[ACTION]
 
-        # Aggregating comments, authors and revno
+        # Aggregating comments, authors and revid
         for doc in docs:
-            rev_no = doc[REVID]
-            revnos.append(rev_no)
+            rev_id = doc[REVID]
+            revids.append(rev_id)
             comment = doc.get(COMMENT)
             if comment:
-                comment = "#%(revno)d %(comment)s" % {
-                          'revno': revnos.index(rev_no),
+                comment = "#%(revid)s %(comment)s" % {
+                          'revid': revids.index(rev_id),
                           'comment': comment
                           }
                 comments.append(comment)
             editor = get_editor_info(doc)
             editor_name = editor["name"]
             if editor_name in editors_info:
-                editors_info[editor_name].editor_revnos.append(rev_no)
+                editors_info[editor_name].editor_revids.append(rev_id)
             else:
-                editors_info[editor_name] = editor_info(editor, [rev_no])
+                editors_info[editor_name] = editor_info(editor, [rev_id])
 
-        if len(revnos) == 1:
+        if len(revids) == 1:
             # there is only one change for this item in the history considered
             info, positions = editors_info[editor_name]
             info_tuple = (info, "")
@@ -795,12 +795,12 @@
         else:
             # grouping the revision numbers into a range, which belong to a particular editor(user) for the current item
             for info, positions in editors_info.values():
-                idx = [revnos.index(pos) for pos in positions]
+                idx = [revids.index(pos) for pos in positions]
                 position_range = util.rangelist(idx)
                 info_tuple = (info, position_range)
                 editors.append(info_tuple)
 
-        item_info["revnos"] = revnos
+        item_info["revids"] = revids
         item_info["editors"] = editors
         item_info["comments"] = comments
         item_groups[item_name] = item_info
@@ -820,13 +820,13 @@
         tm = item_group["timestamp"]
         rev_date = format_date(tm)
         if revcount < offset:
-            revcount += len(item_group["revnos"])
+            revcount += len(item_group["revids"])
             if rev_date not in day_count:
                 day_count[rev_date] = 0
-            day_count[rev_date] += len(item_group["revnos"])
+            day_count[rev_date] += len(item_group["revids"])
         elif rev_date == prev_date:
             rev_tuples.item_revs.append(item_group)
-            revcount += len(item_group["revnos"])
+            revcount += len(item_group["revids"])
         else:
             grouped_history.append(rev_tuples)
             if results_per_page and revcount >= maxrev:
@@ -835,7 +835,7 @@
             else:
                 rev_tuples = rev_tuple(rev_date, [item_group])
                 prev_date = rev_date
-                revcount += len(item_group["revnos"])
+                revcount += len(item_group["revids"])
 
     if toappend:
         grouped_history.append(rev_tuples)
@@ -1527,33 +1527,33 @@
     return commonmt
 
 
-def _diff(item, revno1, revno2):
-    oldrev = item[revno1]
-    newrev = item[revno2]
+def _diff(item, revid1, revid2):
+    oldrev = item[revid1]
+    newrev = item[revid2]
     commonmt = _common_type(oldrev.meta[CONTENTTYPE], newrev.meta[CONTENTTYPE])
 
     try:
-        item = Item.create(item.name, contenttype=commonmt, rev_no=newrev.revid)
+        item = Item.create(item.name, contenttype=commonmt, rev_id=newrev.revid)
     except AccessDeniedError:
         abort(403)
-    rev_nos = [CURRENT]  # XXX TODO we need a reverse sorted list
+    rev_ids = [CURRENT]  # XXX TODO we need a reverse sorted list
     return render_template(item.diff_template,
                            item=item, item_name=item.name,
                            rev=item.rev,
-                           first_rev_no=rev_nos[0],
-                           last_rev_no=rev_nos[-1],
+                           first_rev_id=rev_ids[0],
+                           last_rev_id=rev_ids[-1],
                            oldrev=oldrev,
                            newrev=newrev,
                           )
 
 
-def _diff_raw(item, revno1, revno2):
-    oldrev = item[revno1]
-    newrev = item[revno2]
+def _diff_raw(item, revid1, revid2):
+    oldrev = item[revid1]
+    newrev = item[revid2]
     commonmt = _common_type(oldrev, newrev)
 
     try:
-        item = Item.create(item.name, contenttype=commonmt, rev_no=newrev.revid)
+        item = Item.create(item.name, contenttype=commonmt, rev_id=newrev.revid)
     except AccessDeniedError:
         abort(403)
     return item._render_data_diff_raw(oldrev, newrev)
--- a/MoinMoin/converter/link.py	Fri Sep 30 15:53:00 2011 +0200
+++ b/MoinMoin/converter/link.py	Fri Sep 30 16:44:50 2011 +0200
@@ -113,7 +113,7 @@
               url_encode quotes the qs values (and Iri code will quote them again)
         """
         do = None
-        revno = None
+        rev = None
         separator = '&'
         result = []
         if query:
@@ -128,7 +128,7 @@
                     do = v
                     continue # we remove do=xxx from qs
                 if k == 'rev':
-                    revno = v
+                    rev = v
                     continue # we remove rev=n from qs
                 result.append(u'%s=%s' % (k, v))
         if result:
@@ -144,7 +144,7 @@
             # ...
         )
         endpoint = do_to_endpoint[do or 'show']
-        return endpoint, revno, query
+        return endpoint, rev, query
 
     def handle_wiki_links(self, elem, input):
         wiki_name = 'Self'
@@ -155,8 +155,8 @@
                 elem.set(html.class_, 'moin-interwiki')
                 wiki_name = wn
         item_name = unicode(input.path[1:])
-        endpoint, revno, query = self._get_do_rev(input.query)
-        url = url_for_item(item_name, wiki_name=wiki_name, rev=revno, endpoint=endpoint)
+        endpoint, rev, query = self._get_do_rev(input.query)
+        url = url_for_item(item_name, wiki_name=wiki_name, rev=rev, endpoint=endpoint)
         link = Iri(url, query=query, fragment=input.fragment)
         elem.set(self._tag_xlink_href, link)
 
@@ -170,8 +170,8 @@
                 elem.set(html.class_, 'moin-nonexistent')
         else:
             item_name = unicode(page.path[1:])
-        endpoint, revno, query = self._get_do_rev(input.query)
-        url = url_for_item(item_name, rev=revno, endpoint=endpoint)
+        endpoint, rev, query = self._get_do_rev(input.query)
+        url = url_for_item(item_name, rev=rev, endpoint=endpoint)
         link = Iri(url, query=query, fragment=input.fragment)
         elem.set(self._tag_xlink_href, link)
 
--- a/MoinMoin/datastruct/backends/_tests/test_wiki_dicts.py	Fri Sep 30 15:53:00 2011 +0200
+++ b/MoinMoin/datastruct/backends/_tests/test_wiki_dicts.py	Fri Sep 30 16:44:50 2011 +0200
@@ -28,11 +28,11 @@
                     u"text with spaces": u"second item",
                     u'Empty string': u'',
                     u"Last": u"last item"}
-        update_item(u'SomeTestDict', 0, {SOMEDICT: somedict}, DATA)
+        update_item(u'SomeTestDict', {SOMEDICT: somedict}, DATA)
 
         somedict = {u"One": u"1",
                     u"Two": u"2"}
-        update_item(u'SomeOtherTestDict', 0, {SOMEDICT: somedict}, DATA)
+        update_item(u'SomeOtherTestDict', {SOMEDICT: somedict}, DATA)
 
     def test__retrieve_items(self):
         wikidict_obj = wiki_dicts.WikiDicts()
--- a/MoinMoin/datastruct/backends/_tests/test_wiki_groups.py	Fri Sep 30 15:53:00 2011 +0200
+++ b/MoinMoin/datastruct/backends/_tests/test_wiki_groups.py	Fri Sep 30 16:44:50 2011 +0200
@@ -33,18 +33,18 @@
     def setup_method(self, method):
         become_trusted()
         for group, members in self.test_groups.iteritems():
-            update_item(group, 0, {USERGROUP: members}, DATA)
+            update_item(group, {USERGROUP: members}, DATA)
 
     def test_rename_group_item(self):
         """
         Tests renaming of a group item.
         """
         become_trusted()
-        item = update_item(u'SomeGroup', 0, {USERGROUP: ["ExampleUser"]}, DATA)
+        item = update_item(u'SomeGroup', {USERGROUP: ["ExampleUser"]}, DATA)
         assert u'ExampleUser' in flaskg.groups[u'SomeGroup']
         pytest.raises(GroupDoesNotExistError, lambda: flaskg.groups[u'AnotherGroup'])
 
-        item = update_item(u'SomeGroup', 0, {NAME: u'AnotherGroup', USERGROUP: ["ExampleUser"]}, DATA)
+        item = update_item(u'SomeGroup', {NAME: u'AnotherGroup', USERGROUP: ["ExampleUser"]}, DATA)
         assert u'ExampleUser' in flaskg.groups[u'AnotherGroup']
         pytest.raises(GroupDoesNotExistError, lambda: flaskg.groups[u'SomeGroup'])
 
@@ -56,8 +56,8 @@
         # long list of users
         members = create_random_string_list(length=15, count=1234)
         test_user = create_random_string_list(length=15, count=1)[0]
-        update_item(u'UserGroup', 0, {USERGROUP: members}, DATA)
-        update_item(u'UserGroup', 1, {USERGROUP: members + [test_user]}, '')
+        update_item(u'UserGroup', {USERGROUP: members}, DATA)
+        update_item(u'UserGroup', {USERGROUP: members + [test_user]}, '')
         result = test_user in flaskg.groups['UserGroup']
 
         assert result
@@ -71,16 +71,16 @@
 
         # long list of users
         members = create_random_string_list()
-        update_item(u'UserGroup', 0,  {USERGROUP: members}, DATA)
+        update_item(u'UserGroup', {USERGROUP: members}, DATA)
 
         # updates the text with the text_user
         test_user = create_random_string_list(length=15, count=1)[0]
-        update_item(u'UserGroup', 1,  {USERGROUP: [test_user]}, DATA)
+        update_item(u'UserGroup', {USERGROUP: [test_user]}, DATA)
         result = test_user in flaskg.groups[u'UserGroup']
         assert result
 
         # updates the text without test_user
-        update_item(u'UserGroup', 2, {}, DATA)
+        update_item(u'UserGroup', {}, DATA)
         result = test_user in flaskg.groups[u'UserGroup']
         assert not result
 
@@ -91,7 +91,7 @@
         then add user member to an item group and check acl rights
         """
         become_trusted()
-        update_item(u'NewGroup', 0, {USERGROUP: ["ExampleUser"]}, DATA)
+        update_item(u'NewGroup', {USERGROUP: ["ExampleUser"]}, DATA)
 
         acl_rights = ["NewGroup:read,write"]
         acl = AccessControlList(acl_rights, valid=app.cfg.acl_rights_contents)
@@ -99,7 +99,7 @@
         has_rights_before = acl.may(u"AnotherUser", "read")
 
         # update item - add AnotherUser to a item group NewGroup
-        update_item(u'NewGroup', 1, {USERGROUP: ["AnotherUser"]}, '')
+        update_item(u'NewGroup', {USERGROUP: ["AnotherUser"]}, '')
 
         has_rights_after = acl.may(u"AnotherUser", "read")
 
--- a/MoinMoin/items/__init__.py	Fri Sep 30 15:53:00 2011 +0200
+++ b/MoinMoin/items/__init__.py	Fri Sep 30 16:44:50 2011 +0200
@@ -167,7 +167,7 @@
         return cls(name, contenttype=unicode(contenttype), **kw)
 
     @classmethod
-    def create(cls, name=u'', contenttype=None, rev_no=CURRENT, item=None):
+    def create(cls, name=u'', contenttype=None, rev_id=CURRENT, item=None):
         if contenttype is None:
             contenttype = u'application/x-nonexistent'
 
@@ -184,7 +184,7 @@
         else:
             logging.debug("Got item: %r" % name)
             try:
-                rev = item.get_revision(rev_no)
+                rev = item.get_revision(rev_id)
                 contenttype = u'application/octet-stream' # it exists
             except KeyError: # NoSuchRevisionError:
                 try:
@@ -194,7 +194,7 @@
                     logging.debug("Item %r has no revisions." % name)
                     rev = DummyRev(item, contenttype)
                     logging.debug("Item %r, created dummy revision with contenttype %r" % (name, contenttype))
-            logging.debug("Got item %r, revision: %r" % (name, rev_no))
+            logging.debug("Got item %r, revision: %r" % (name, rev_id))
         contenttype = rev.meta.get(CONTENTTYPE) or contenttype # use contenttype in case our metadata does not provide CONTENTTYPE
         logging.debug("Item %r, got contenttype %r from revision meta" % (name, contenttype))
         #logging.debug("Item %r, rev meta dict: %r" % (name, dict(rev.meta)))
@@ -301,15 +301,15 @@
 
     def _do_modify_show_templates(self):
         # call this if the item is still empty
-        rev_nos = []
+        rev_ids = []
         item_templates = self.get_templates(self.contenttype)
         return render_template('modify_show_template_selection.html',
                                item_name=self.name,
                                rev=self.rev,
                                contenttype=self.contenttype,
                                templates=item_templates,
-                               first_rev_no=rev_nos and rev_nos[0],
-                               last_rev_no=rev_nos and rev_nos[-1],
+                               first_rev_id=rev_ids and rev_ids[0],
+                               last_rev_id=rev_ids and rev_ids[-1],
                                meta_rendered='',
                                data_rendered='',
                               )
@@ -463,11 +463,11 @@
         storage_item = backend[self.name]
         try:
             currentrev = storage_item.get_revision(CURRENT)
-            rev_no = currentrev.revid
+            rev_id = currentrev.revid
             contenttype_current = currentrev.meta.get(CONTENTTYPE)
         except KeyError: # XXX was: NoSuchRevisionError:
             currentrev = None
-            rev_no = None
+            rev_id = None
             contenttype_current = None
 
         meta = dict(meta) # we may get a read-only dict-like, copy it
@@ -519,7 +519,7 @@
 
         newrev = storage_item.store_revision(meta, data, overwrite=overwrite)
         item_modified.send(app._get_current_object(), item_name=name)
-        return None, None # XXX was: new_revno, size
+        return newrev.revid, newrev.meta[SIZE]
 
     def get_index(self):
         """ create an index of sub items of this item """
--- a/MoinMoin/macro/_tests/test_GetVal.py	Fri Sep 30 15:53:00 2011 +0200
+++ b/MoinMoin/macro/_tests/test_GetVal.py	Fri Sep 30 16:44:50 2011 +0200
@@ -24,7 +24,7 @@
         become_trusted()
         somedict = {u"One": u"1",
                     u"Two": u"2"}
-        update_item(u'TestDict', 0, {SOMEDICT: somedict}, DATA)
+        update_item(u'TestDict', {SOMEDICT: somedict}, DATA)
 
     def teardown_method(self, method):
         deinit_test_app(self.app, self.ctx)
--- a/MoinMoin/security/_tests/test_security.py	Fri Sep 30 15:53:00 2011 +0200
+++ b/MoinMoin/security/_tests/test_security.py	Fri Sep 30 16:44:50 2011 +0200
@@ -288,9 +288,9 @@
         become_trusted(username=u'WikiAdmin')
         for item_name, item_acl, item_content in self.items:
             if item_acl is not None:
-                update_item(item_name, 0, {ACL: item_acl}, item_content)
+                update_item(item_name, {ACL: item_acl}, item_content)
             else:
-                update_item(item_name, 0, {}, item_content)
+                update_item(item_name, {}, item_content)
 
     def testItemACLs(self):
         """ security: test item acls """
@@ -364,9 +364,9 @@
         become_trusted(username=u'WikiAdmin')
         for item_name, item_acl, item_content in self.items:
             if item_acl is not None:
-                update_item(item_name, 0, {ACL: item_acl}, item_content)
+                update_item(item_name, {ACL: item_acl}, item_content)
             else:
-                update_item(item_name, 0, {}, item_content)
+                update_item(item_name, {}, item_content)
 
     def testItemACLs(self):
         """ security: test item acls """
--- a/MoinMoin/templates/destroy.html	Fri Sep 30 15:53:00 2011 +0200
+++ b/MoinMoin/templates/destroy.html	Fri Sep 30 16:44:50 2011 +0200
@@ -1,7 +1,7 @@
 {% import "forms.html" as forms %}
 {% extends theme("layout.html") %}
 {% block content %}
-{% if rev_no == None %}
+{% if rev_id == None %}
     <h1>{{ _("DESTROY COMPLETE item '%(item_name)s'", item_name=item.name) }}</h1>
     <div class="moin-form">
     {{ gen.form.open(form, method="post", action=url_for('frontend.destroy_item', item_name=item.name)) }}
@@ -14,9 +14,9 @@
     {{ gen.form.close() }}
     </div>
 {% else %}
-    <h1>{{ _("DESTROY REVISION '%(item_name)s' (rev %(rev_no)d)", item_name=item.name, rev_no=rev_no) }}</h1>
+    <h1>{{ _("DESTROY REVISION '%(item_name)s' (rev %(rev_id)d)", item_name=item.name, rev_id=rev_id) }}</h1>
     <div class="moin-form">
-    {{ gen.form.open(form, method="post", action=url_for('frontend.destroy_item', item_name=item.name, rev=rev_no)) }}
+    {{ gen.form.open(form, method="post", action=url_for('frontend.destroy_item', item_name=item.name, rev=rev_id)) }}
       {{ forms.render_errors(form) }}
       <dl>
         {{ forms.render_field(gen, form['comment'], 'text') }}
--- a/MoinMoin/templates/diff.html	Fri Sep 30 15:53:00 2011 +0200
+++ b/MoinMoin/templates/diff.html	Fri Sep 30 16:44:50 2011 +0200
@@ -1,7 +1,7 @@
 {% extends theme("show.html") %}
 {% block content %}
 {% block headline %}
-<h1>{{ _("Item: %(item_name)s (Diff between revision %(oldrevno)s and %(newrevno)s)", item_name=newrev.item.name, oldrevno=oldrev.revid, newrevno=newrev.revid) }}</h1>
+<h1>{{ _("Item: %(item_name)s (Diff between revision %(oldrevid)s and %(newrevid)s)", item_name=newrev.item.name, oldrevid=oldrev.revid, newrevid=newrev.revid) }}</h1>
 {% endblock %}
 {{ item._render_data_diff(oldrev, newrev) }}
 {% endblock %}
--- a/MoinMoin/templates/global_history.html	Fri Sep 30 15:53:00 2011 +0200
+++ b/MoinMoin/templates/global_history.html	Fri Sep 30 16:44:50 2011 +0200
@@ -34,17 +34,17 @@
                     <table>
                     {% for rev in revs %}
                         <tr>
-                            {% set item_latest_revno = rev.revnos[0] %}
+                            {% set item_latest_revid = rev.revids[0] %}
                             <td class="moin-action" title="{{ _("DIFF") }}">                                
-                                <a href="{{ url_for('frontend.diff', item_name=rev.item_name, rev1=item_latest_revno, rev2=rev.revnos[-1]) }}" class="moin-history-{{ rev.action|lower }}">  </a>
+                                <a href="{{ url_for('frontend.diff', item_name=rev.item_name, rev1=item_latest_revid, rev2=rev.revids[-1]) }}" class="moin-history-{{ rev.action|lower }}">  </a>
                             </td>
                             <td class="moin-history-item"><a class="{{ rev.contenttype|contenttype_to_class }}" href="{{ url_for('frontend.show_item', item_name=rev.item_name) }}" title="{{ rev.contenttype }}">{{ rev.item_name }}</a></td>
                             <td class="moin-history-time">{{ rev.timestamp|timeformat }}</td>
                             <td class="moin-history-links">
-                                {% for revno in rev.revnos %}
-                                    {% set position = rev.revnos.index(revno) %}
+                                {% for revid in rev.revids %}
+                                    {% set position = rev.revids.index(revid) %}
                                     {% if position > 0 %}
-                                        <a href="{{ url_for('frontend.diff', item_name=rev.item_name, rev1=revno, rev2=item_latest_revno) }}">[{{ position }}]</a>
+                                        <a href="{{ url_for('frontend.diff', item_name=rev.item_name, rev1=revid, rev2=item_latest_revid) }}">[{{ position }}]</a>
                                     {% else %}
                                         <span>[0]</span>
                                     {% endif %}
--- a/MoinMoin/templates/meta.html	Fri Sep 30 15:53:00 2011 +0200
+++ b/MoinMoin/templates/meta.html	Fri Sep 30 16:44:50 2011 +0200
@@ -7,7 +7,7 @@
 {% block headline %}
 <h1>
     {{ _("Metadata of '%(item_name)s'", item_name=item_name) }}
-    {% if show_revision %}({{ _("Revision") }} {{ rev.revno }}){% endif %}
+    {% if show_revision %}({{ _("Revision") }} {{ rev.revid }}){% endif %}
 </h1>
 {% endblock %}
 
--- a/MoinMoin/templates/revert.html	Fri Sep 30 15:53:00 2011 +0200
+++ b/MoinMoin/templates/revert.html	Fri Sep 30 16:44:50 2011 +0200
@@ -1,9 +1,9 @@
 {% import "forms.html" as forms %}
 {% extends theme("layout.html") %}
 {% block content %}
-<h1>{{ _("Revert '%(item_name)s' (rev %(rev_no)d)", item_name=item.name, rev_no=rev_no) }}</h1>
+<h1>{{ _("Revert '%(item_name)s' (rev %(rev_id)d)", item_name=item.name, rev_id=rev_id) }}</h1>
 <div class="moin-form">
-{{ gen.form.open(form, method="post", action=url_for('frontend.revert_item', item_name=item.name, rev=rev_no)) }}
+{{ gen.form.open(form, method="post", action=url_for('frontend.revert_item', item_name=item.name, rev=rev_id)) }}
   {{ forms.render_errors(form) }}
   <dl>
     {{ forms.render_field(gen, form['comment'], 'text') }}
--- a/MoinMoin/templates/show.html	Fri Sep 30 15:53:00 2011 +0200
+++ b/MoinMoin/templates/show.html	Fri Sep 30 16:44:50 2011 +0200
@@ -25,7 +25,7 @@
             <span class="moin-disabled">{{ _('no older revision') }}</span>
         {%- endif %}
         </li>
-        <li class="moin-rev-navigation-current">rev {{ rev.revno }}</li>
+        <li class="moin-rev-navigation-current">rev {{ rev.revid }}</li>
         <li class="moin-rev-navigation-newer">
             {% if rev.revno < last_rev_no -%}
                 <a href="{{ url_for(view, rev=rev.revno+1, item_name=item_name) }}">{{ _('newer') }} --&gt;</a>
@@ -44,7 +44,7 @@
     {% endif %}
     
     {% block headline %}
-    {# <h1>{{ rev.item.name }} {% if show_revision %}(Revision {{ rev.revno }}){% endif %}</h1> #}
+    {# <h1>{{ rev.item.name }} {% if show_revision %}(Revision {{ rev.revid }}){% endif %}</h1> #}
     {% endblock %}
     {% block content_data %}
     {% if data_rendered %}
@@ -64,7 +64,7 @@
 {% block footer_meta %}
     {% if rev %}
     <p id="moin-pageinfo" lang="{{ theme_supp.ui_lang }}" dir="{{ theme_supp.ui_dir }}">
-        {% if cfg.show_interwiki %}{{ cfg.interwikiname }}:{% endif %}{{ item_name }} (rev {{rev.revno}}),
+        {% if cfg.show_interwiki %}{{ cfg.interwikiname }}:{% endif %}{{ item_name }} (rev {{rev.revid}}),
         {{ _("modified") }} {{ rev.meta['mtime']|datetimeformat }}
         {{ _("by") }} {{ utils.editor_info(rev.meta) }}{% if rev.tags %},
         {{ _("tagged") }}