changeset 1445:73901c32f75e

merged
author Pavel Sviderski <pavel@psviderski.name>
date Wed, 04 Jul 2012 21:53:24 +0400
parents 34069422fde1 (current diff) ac1059572d80 (diff)
children a7c967624de2
files MoinMoin/_tests/test_sourcecode.py MoinMoin/apps/frontend/views.py MoinMoin/constants/keys.py MoinMoin/storage/middleware/indexing.py MoinMoin/themes/modernized/static/css/common.css
diffstat 384 files changed, 774 insertions(+), 1375 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Wed Jul 04 21:51:39 2012 +0400
+++ b/Makefile	Wed Jul 04 21:53:24 2012 +0400
@@ -8,6 +8,9 @@
 all:
 	python setup.py build
 
+test:
+	py.test --pep8 -rs
+
 dist: clean-devwiki
 	-rm MANIFEST
 	python setup.py sdist
@@ -23,9 +26,6 @@
 	wget -U MoinMoin/Makefile -O contrib/interwiki/intermap.txt "http://master19.moinmo.in/InterWikiMap?action=raw"
 	chmod 664 contrib/interwiki/intermap.txt
 
-check-tabs:
-	@python -c 'import tabnanny ; tabnanny.check("MoinMoin")'
-
 pylint:
 	@pylint --disable-msg=W0142,W0511,W0612,W0613,C0103,C0111,C0302,C0321,C0322 --disable-msg-cat=R MoinMoin
 
--- a/MoinMoin/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -19,4 +19,3 @@
 from MoinMoin.util.version import Version
 
 version = Version(2, 0, 0, 'a0')
-
--- a/MoinMoin/_template.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/_template.py	Wed Jul 04 21:53:24 2012 +0400
@@ -16,4 +16,3 @@
 
 
 from __future__ import absolute_import, division
-
--- a/MoinMoin/_tests/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/_tests/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -82,5 +82,3 @@
         s.close()
     except socket.error as err:
         raise Exception("connecting to {0}:{1:d}, error: {2!s}".format(host, port, err))
-
-
--- a/MoinMoin/_tests/_test_template.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/_tests/_test_template.py	Wed Jul 04 21:53:24 2012 +0400
@@ -40,8 +40,8 @@
     can add a test by adding another line to this list
     """
     _tests = (
-        # description,  test,            expected
-        ('Line break',  '<<BR>>',        '<br>'),
+        # description, test, expected
+        ('Line break', '<<BR>>', '<br>'),
     )
 
     from MoinMoin._tests import wikiconfig
@@ -71,4 +71,3 @@
         module_tested.do_that()
         result = None
         return result
-
--- a/MoinMoin/_tests/ldap_testbase.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/_tests/ldap_testbase.py	Wed Jul 04 21:53:24 2012 +0400
@@ -258,4 +258,3 @@
 
 except ImportError:
     pass  # obviously pytest not in use
-
--- a/MoinMoin/_tests/ldap_testdata.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/_tests/ldap_testdata.py	Wed Jul 04 21:53:24 2012 +0400
@@ -116,4 +116,3 @@
 member: cn=Group A,ou=Groups,ou=testing,dc=example,dc=org
 objectClass: groupOfNames
 """
-
--- a/MoinMoin/_tests/test_error.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/_tests/test_error.py	Wed Jul 04 21:53:24 2012 +0400
@@ -73,4 +73,3 @@
         assert result == expected
 
 coverage_modules = ['MoinMoin.error']
-
--- a/MoinMoin/_tests/test_sourcecode.py	Wed Jul 04 21:51:39 2012 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-# Copyright: 2006 by Armin Rigo (originally only testing for tab chars)
-# Copyright: 2007 adapted and extended (calling the PEP8 checker for most stuff) by MoinMoin:ThomasWaldmann.
-# License: MIT licensed
-
-"""
-Verify that the MoinMoin source files conform (mostly) to PEP8 coding style.
-
-Additionally, we check that the files have no crlf (Windows style) line endings.
-"""
-
-
-import re, time
-import pytest
-import pep8
-
-import py
-
-moindir = py.path.local(__file__).pypkgpath()
-
-EXCLUDE = set([
-    moindir/'static', # this is our dist static stuff
-    moindir/'_tests/wiki', # this is our test wiki
-    moindir/'util/md5crypt.py', # 3rd party, do not fix pep8 there
-])
-
-PEP8IGNORE = (
-    "E121 E122 E123 E124 E125 E126 E127 E128 "  # continuation line indentation
-    "E225 "  # missing whitespace around operator
-    "E241 "  # whitespace around comma (we have some "tabular" formatting in the tests)
-    "E261 "  # less than 2 blanks before inline comment
-    "E301 E302 "  # separate toplevel definitions with 2 empty lines, method defs inside class by 1 empty line
-    "E401 "  # imports on separate lines
-    "E501 "  # maximum line length (default 79 chars)
-    "E502 "  # bug in pep8.py: https://github.com/jcrocholl/pep8/issues/75
-    "W391 "  # trailing blank line(s) at EOF. But: We want one of them so that diff does not complain!
-).split()
-
-TRAILING_SPACES = 'nochange' # 'nochange' or 'fix'
-                             # use 'fix' with extreme caution and in a separate changeset!
-FIX_TS_RE = re.compile(r' +$', re.M) # 'fix' mode: everything matching the trailing space re will be removed
-
-try:
-    import xattr
-    if not hasattr(xattr, "xattr"): # there seem to be multiple modules with that name
-        raise ImportError
-    def mark_file_ok(path, mtime):
-        x = xattr.xattr(path)
-        try:
-            x.set('user.moin-pep8-tested-mtime', str(int(mtime)))
-        except IOError:
-            # probably not supported
-            global mark_file_ok
-            mark_file_ok = lambda path, mtime: None
-
-    def should_check_file(path, mtime):
-        x = xattr.xattr(path)
-        try:
-            mt = x.get('user.moin-pep8-tested-mtime')
-            mt = long(mt)
-            return mtime > mt
-        except IOError:
-            # probably not supported
-            global should_check_file
-            should_check_file = lambda path, mtime: True
-        return True
-except ImportError:
-    def mark_file_ok(path, mtime):
-        pass
-    def should_check_file(path, mtime):
-        return True
-
-RECENTLY = time.time() - 7 * 24*60*60 # we only check stuff touched recently.
-#RECENTLY = 0 # check everything!
-
-# After doing a fresh clone, this procedure is recommended:
-# 1. Run the tests once to see if everything is OK (as cloning updates the mtime,
-#    it will test every file).
-# 2. Before starting to make new changes, use "touch" to change all timestamps
-#    to a time before <RECENTLY>.
-# 3. Regularly run the tests, they will run much faster now.
-
-def pep8_error_count(path):
-    # process_options initializes some data structures and MUST be called before each Checker().check_all()
-    pep8.process_options(['pep8', '--ignore=%s' % ','.join(PEP8IGNORE), '--show-source', 'dummy_path'])
-    error_count = pep8.Checker(path).check_all()
-    return error_count
-
-def check_py_file(reldir, path, mtime):
-    if TRAILING_SPACES == 'fix':
-        f = file(path, 'rb')
-        data = f.read()
-        f.close()
-        fixed = FIX_TS_RE.sub('', data)
-
-        # Don't write files if there's no need for that,
-        # as altering timestamps can be annoying with some tools.
-        if fixed == data:
-            return
-
-        f = file(path, 'wb')
-        f.write(fixed)
-        f.close()
-    # Please read and follow PEP8 - rerun this test until it does not fail any more,
-    # any type of error is only reported ONCE (even if there are multiple).
-    error_count = pep8_error_count(path)
-    assert error_count == 0
-    mark_file_ok(path, mtime)
-
-def pytest_generate_tests(metafunc):
-    for pyfile in sorted(moindir.visit('*.py', lambda p: p not in EXCLUDE)):
-        if pyfile not in EXCLUDE:
-            relpath = moindir.bestrelpath(pyfile)
-            metafunc.addcall(id=relpath, funcargs={'path': pyfile})
-
-def test_sourcecode(path):
-    mtime = path.stat().mtime
-    if mtime < RECENTLY:
-        pytest.skip("source change not recent")
-    if not should_check_file(str(path), mtime):
-        pytest.skip("source marked as should not be checked")
-
-    check_py_file(str(moindir.bestrelpath(path)), str(path), mtime)
-
-
--- a/MoinMoin/_tests/test_test_environ.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/_tests/test_test_environ.py	Wed Jul 04 21:53:24 2012 +0400
@@ -52,4 +52,3 @@
     def test_config(self):
         assert isinstance(app.cfg, wikiconfig.Config)
         assert app.cfg.content_acl == CONTENT_ACL
-
--- a/MoinMoin/_tests/test_user.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/_tests/test_user.py	Wed Jul 04 21:53:24 2012 +0400
@@ -431,4 +431,3 @@
 
 
 coverage_modules = ['MoinMoin.user']
-
--- a/MoinMoin/_tests/test_wikiutil.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/_tests/test_wikiutil.py	Wed Jul 04 21:53:24 2012 +0400
@@ -31,12 +31,12 @@
 class TestAnchorNames(object):
     def test_anchor_name_encoding(self):
         tests = [
-            # text                    expected output
-            (u'\xf6\xf6ll\xdf\xdf',   'A.2BAPYA9g-ll.2BAN8A3w-'),
-            (u'level 2',              'level_2'),
-            (u'level_2',              'level_2'),
-            (u'',                     'A'),
-            (u'123',                  'A123'),
+            # text, expected output
+            (u'\xf6\xf6ll\xdf\xdf', 'A.2BAPYA9g-ll.2BAN8A3w-'),
+            (u'level 2', 'level_2'),
+            (u'level_2', 'level_2'),
+            (u'', 'A'),
+            (u'123', 'A123'),
             # make sure that a valid anchor is not modified:
             (u'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789:_.-',
              u'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789:_.-')
@@ -224,12 +224,12 @@
 
 def testfile_headers():
     test_headers = [
-                #test_file               #content_type
-                ('imagefile.gif',       'image/gif'),
-                ('testfile.txt',        'text/plain'),
-                ('pdffile.pdf',         'application/pdf'),
-                ('docfile.doc',         'application/msword'),
-                (None,                  'application/octet-stream')
+                #test_file, content_type
+                ('imagefile.gif', 'image/gif'),
+                ('testfile.txt', 'text/plain'),
+                ('pdffile.pdf', 'application/pdf'),
+                ('docfile.doc', 'application/msword'),
+                (None, 'application/octet-stream')
                 ]
 
     for test_file, content_type in test_headers:
@@ -243,4 +243,3 @@
     assert result == expected
 
 coverage_modules = ['MoinMoin.wikiutil']
-
--- a/MoinMoin/_tests/wiki/data/plugin/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/_tests/wiki/data/plugin/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -1,4 +1,3 @@
 """
 This file was added so as to make hg track the folders necessary for the tests.
 """
-
--- a/MoinMoin/_tests/wikiconfig.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/_tests/wikiconfig.py	Wed Jul 04 21:53:24 2012 +0400
@@ -25,4 +25,3 @@
     interwikiname = u'MoinTest'
     interwiki_map = dict(Self='http://localhost:8080/', MoinMoin='http://moinmo.in/')
     interwiki_map[interwikiname] = 'http://localhost:8080/'
-
--- a/MoinMoin/app.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/app.py	Wed Jul 04 21:53:24 2012 +0400
@@ -261,4 +261,3 @@
         # can happen if teardown_wiki() is called twice, e.g. by unit tests.
         pass
     return response
-
--- a/MoinMoin/apps/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -11,4 +11,3 @@
 - admin Module for special stuff for wiki admins
 - serve Module for static file serving
 """
-
--- a/MoinMoin/apps/admin/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/admin/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -11,4 +11,3 @@
 from flask import Blueprint
 admin = Blueprint('admin', __name__, template_folder='templates')
 import MoinMoin.apps.admin.views
-
--- a/MoinMoin/apps/admin/_tests/test_admin.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/admin/_tests/test_admin.py	Wed Jul 04 21:53:24 2012 +0400
@@ -36,4 +36,3 @@
 
     def test_itemsize(self):
         self._test_view_get(url_for('admin.itemsize'))
-
--- a/MoinMoin/apps/admin/templates/admin/highlighterhelp.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/admin/templates/admin/highlighterhelp.html	Wed Jul 04 21:53:24 2012 +0400
@@ -4,4 +4,3 @@
 <h1>{{ _("Available Highlighters") }}</h1>
 {{ utils.table(headings, rows) }}
 {% endblock %}
-
--- a/MoinMoin/apps/admin/templates/admin/index.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/admin/templates/admin/index.html	Wed Jul 04 21:53:24 2012 +0400
@@ -20,4 +20,3 @@
     <li><a href="{{ url_for('admin.highlighterhelp') }}">{{ _("Available Highlighters") }}</a></li>
 </ul>
 {% endblock %}
-
--- a/MoinMoin/apps/admin/templates/admin/interwikihelp.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/admin/templates/admin/interwikihelp.html	Wed Jul 04 21:53:24 2012 +0400
@@ -4,4 +4,3 @@
 <h1>{{ _("Known InterWiki names") }}</h1>
 {{ utils.table(headings, rows) }}
 {% endblock %}
-
--- a/MoinMoin/apps/admin/templates/admin/itemsize.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/admin/templates/admin/itemsize.html	Wed Jul 04 21:53:24 2012 +0400
@@ -4,4 +4,3 @@
 <h1>{{ _("Item sizes (latest revision)") }}</h1>
 {{ utils.table(headings, rows) }}
 {% endblock %}
-
--- a/MoinMoin/apps/admin/templates/admin/sysitems_upgrade.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/admin/templates/admin/sysitems_upgrade.html	Wed Jul 04 21:53:24 2012 +0400
@@ -11,4 +11,3 @@
 </fieldset>
 </form>
 {% endblock %}
-
--- a/MoinMoin/apps/admin/templates/admin/userbrowser.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/admin/templates/admin/userbrowser.html	Wed Jul 04 21:53:24 2012 +0400
@@ -32,4 +32,3 @@
     {% endfor %}
 </table>
 {% endblock %}
-
--- a/MoinMoin/apps/admin/templates/admin/wikiconfig.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/admin/templates/admin/wikiconfig.html	Wed Jul 04 21:53:24 2012 +0400
@@ -33,4 +33,3 @@
 </tdbody>
 </table>
 {% endblock %}
-
--- a/MoinMoin/apps/admin/templates/admin/wikiconfighelp.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/admin/templates/admin/wikiconfighelp.html	Wed Jul 04 21:53:24 2012 +0400
@@ -26,4 +26,3 @@
     </table>
 {% endfor %}
 {% endblock %}
-
--- a/MoinMoin/apps/admin/views.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/admin/views.py	Wed Jul 04 21:53:24 2012 +0400
@@ -233,5 +233,3 @@
                            title_name=_(u"Item Size"),
                            headings=headings,
                            rows=rows)
-
-
--- a/MoinMoin/apps/feed/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/feed/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -12,4 +12,3 @@
 from flask import Blueprint
 feed = Blueprint('feed', __name__)
 import MoinMoin.apps.feed.views
-
--- a/MoinMoin/apps/feed/_tests/test_feed.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/feed/_tests/test_feed.py	Wed Jul 04 21:53:24 2012 +0400
@@ -44,4 +44,3 @@
             assert rv.headers['Content-Type'] == 'application/atom+xml'
             assert rv.data.startswith('<?xml')
             assert "checking if the cache invalidation works" in rv.data
-
--- a/MoinMoin/apps/feed/views.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/feed/views.py	Wed Jul 04 21:53:24 2012 +0400
@@ -110,4 +110,3 @@
         if cid is not None:
             app.cache.set(cid, content)
     return Response(content, content_type='application/atom+xml')
-
--- a/MoinMoin/apps/frontend/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/frontend/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -12,4 +12,3 @@
 from flask import Blueprint
 frontend = Blueprint('frontend', __name__)
 import MoinMoin.apps.frontend.views
-
--- a/MoinMoin/apps/frontend/_tests/test_frontend.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/frontend/_tests/test_frontend.py	Wed Jul 04 21:53:24 2012 +0400
@@ -296,4 +296,3 @@
         if email is None:
             email = "user@example.org"
         user.create_user(name, password, email, is_encrypted=pwencoded)
-
--- a/MoinMoin/apps/frontend/views.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/frontend/views.py	Wed Jul 04 21:53:24 2012 +0400
@@ -1,3 +1,4 @@
+# Copyright: 2012 MoinMoin:CheerXiao
 # Copyright: 2003-2010 MoinMoin:ThomasWaldmann
 # Copyright: 2011 MoinMoin:AkashSinha
 # Copyright: 2011 MoinMoin:ReimarBauer
@@ -20,6 +21,8 @@
 from datetime import datetime
 from itertools import chain
 from collections import namedtuple
+from functools import wraps
+
 try:
     import json
 except ImportError:
@@ -263,6 +266,36 @@
     return html
 
 
+def presenter(view, add_trail=False, abort404=True):
+    """
+    Decorator to create new "presenter" views.
+
+    Presenter views handle GET requests to locations like
+    +{view}/+<rev>/<item_name> and +{view}/<item_name>, and always try to
+    look up the item before processing.
+
+    :param view: name of view
+    :param add_trail: whether to call flaskg.user.add_trail
+    :param abort404: whether to abort(404) for nonexistent items
+    """
+    def decorator(wrapped):
+        @frontend.route('/+{view}/+<rev>/<itemname:item_name>'.format(view=view))
+        @frontend.route('/+{view}/<itemname:item_name>'.format(view=view), defaults=dict(rev=CURRENT))
+        @wraps(wrapped)
+        def wrapper(item_name, rev):
+            if add_trail:
+                flaskg.user.add_trail(item_name)
+            try:
+                item = Item.create(item_name, rev_id=rev)
+            except AccessDenied:
+                abort(403)
+            if abort404 and isinstance(item, NonExistent):
+                abort(404, item_name)
+            return wrapped(item)
+        return wrapper
+    return decorator
+
+
 @frontend.route('/<itemname:item_name>', defaults=dict(rev=CURRENT), methods=['GET'])
 @frontend.route('/+show/+<rev>/<itemname:item_name>', methods=['GET'])
 def show_item(item_name, rev):
@@ -298,13 +331,8 @@
     return redirect(url_for_item(item_name))
 
 
-@frontend.route('/+dom/+<rev>/<itemname:item_name>')
-@frontend.route('/+dom/<itemname:item_name>', defaults=dict(rev=CURRENT))
-def show_dom(item_name, rev):
-    try:
-        item = Item.create(item_name, rev_id=rev)
-    except AccessDenied:
-        abort(403)
+@presenter('dom', abort404=False)
+def show_dom(item):
     if isinstance(item, NonExistent):
         status = 404
     else:
@@ -329,32 +357,17 @@
     return Response(content, 200, mimetype='text/plain')
 
 
-@frontend.route('/+highlight/+<rev>/<itemname:item_name>')
-@frontend.route('/+highlight/<itemname:item_name>', defaults=dict(rev=CURRENT))
-def highlight_item(item_name, rev):
-    try:
-        item = Item.create(item_name, rev_id=rev)
-    except AccessDenied:
-        abort(403)
-    if isinstance(item, NonExistent):
-        abort(404, item_name)
+@presenter('highlight')
+def highlight_item(item):
     return render_template('highlight.html',
                            item=item, item_name=item.name,
                            data_text=Markup(item._render_data_highlight()),
                           )
 
 
-@frontend.route('/+meta/<itemname:item_name>', defaults=dict(rev=CURRENT))
-@frontend.route('/+meta/+<rev>/<itemname:item_name>')
-def show_item_meta(item_name, rev):
-    flaskg.user.add_trail(item_name)
-    try:
-        item = Item.create(item_name, rev_id=rev)
-    except AccessDenied:
-        abort(403)
-    if isinstance(item, NonExistent):
-        abort(404, item_name)
-    show_revision = rev != CURRENT
+@presenter('meta', add_trail=True)
+def show_item_meta(item):
+    show_revision = request.view_args['rev'] != CURRENT
     show_navigation = False # TODO
     first_rev = None
     last_rev = None
@@ -396,23 +409,13 @@
                            data_rendered=Markup(item._render_data()),
                            )
 
-@frontend.route('/+get/+<rev>/<itemname:item_name>')
-@frontend.route('/+get/<itemname:item_name>', defaults=dict(rev=CURRENT))
-def get_item(item_name, rev):
-    try:
-        item = Item.create(item_name, rev_id=rev)
-    except AccessDenied:
-        abort(403)
+@presenter('get')
+def get_item(item):
     return item.do_get()
 
-@frontend.route('/+download/+<rev>/<itemname:item_name>')
-@frontend.route('/+download/<itemname:item_name>', defaults=dict(rev=CURRENT))
-def download_item(item_name, rev):
-    try:
-        item = Item.create(item_name, rev_id=rev)
-        mimetype = request.values.get("mimetype")
-    except AccessDenied:
-        abort(403)
+@presenter('download')
+def download_item(item):
+    mimetype = request.values.get("mimetype")
     return item.do_get(force_attachment=True, mimetype=mimetype)
 
 @frontend.route('/+convert/<itemname:item_name>')
@@ -559,7 +562,7 @@
         form = RevertItemForm.from_flat(request.form)
         TextCha(form).amend_form()
         if form.validate():
-            item.revert()
+            item.revert(form['comment'])
             return redirect(url_for_item(item_name))
     return render_template(item.revert_template,
                            item=item, item_name=item_name,
@@ -733,6 +736,7 @@
     data_file = request.files.get('data_file')
     subitem_name = data_file.filename
     contenttype = data_file.content_type # guess by browser, based on file name
+    data = data_file.stream
     if item_name:
         subitem_prefix = item_name + u'/'
     else:
@@ -740,7 +744,7 @@
     item_name = subitem_prefix + subitem_name
     try:
         item = Item.create(item_name)
-        revid, size = item.modify()
+        revid, size = item.modify({}, data, contenttype_guessed=contenttype)
         item_modified.send(app._get_current_object(),
                            item_name=item_name)
         return jsonify(name=subitem_name,
@@ -1937,4 +1941,3 @@
 def page_not_found(e):
     return render_template('404.html',
                            item_name=e.description), 404
-
--- a/MoinMoin/apps/misc/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/misc/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -11,4 +11,3 @@
 from flask import Blueprint
 misc = Blueprint('misc', __name__, template_folder='templates')
 import MoinMoin.apps.misc.views
-
--- a/MoinMoin/apps/misc/_tests/test_misc.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/misc/_tests/test_misc.py	Wed Jul 04 21:53:24 2012 +0400
@@ -29,4 +29,3 @@
             rv = c.get(url_for('misc.urls_names'))
             assert rv.status == '200 OK'
             assert rv.headers['Content-Type'] == 'text/plain; charset=utf-8'
-
--- a/MoinMoin/apps/misc/views.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/misc/views.py	Wed Jul 04 21:53:24 2012 +0400
@@ -69,4 +69,3 @@
     item_names = sorted([rev.meta[NAME] for rev in flaskg.storage.documents(wikiname=app.cfg.interwikiname)])
     content = render_template('misc/urls_names.txt', item_names=item_names)
     return Response(content, mimetype='text/plain')
-
--- a/MoinMoin/apps/serve/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/serve/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -13,4 +13,3 @@
 from flask import Blueprint
 serve = Blueprint('serve', __name__)
 import MoinMoin.apps.serve.views
-
--- a/MoinMoin/apps/serve/_tests/test_serve.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/serve/_tests/test_serve.py	Wed Jul 04 21:53:24 2012 +0400
@@ -20,4 +20,3 @@
             assert rv.status == '404 NOT FOUND'
             assert rv.headers['Content-Type'] == 'text/html'
             assert '<!DOCTYPE HTML' in rv.data
-
--- a/MoinMoin/apps/serve/views.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/apps/serve/views.py	Wed Jul 04 21:53:24 2012 +0400
@@ -36,4 +36,3 @@
         abort(404)
 
     return send_from_directory(base_path, filename)
-
--- a/MoinMoin/auth/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/auth/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -447,4 +447,3 @@
                 userobj = None
     logging.debug("session started for user {0!r}".format(userobj))
     return userobj
-
--- a/MoinMoin/auth/_tests/test_auth.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/auth/_tests/test_auth.py	Wed Jul 04 21:53:24 2012 +0400
@@ -81,4 +81,3 @@
     assert 'password=test_pass' in test_url
     assert 'stage=test_auth_name' in test_url
     assert 'login_submit=1' in test_url
-
--- a/MoinMoin/auth/_tests/test_http.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/auth/_tests/test_http.py	Wed Jul 04 21:53:24 2012 +0400
@@ -41,4 +41,3 @@
         test_user, bool_val = httpauthmoin_obj.request(flaskg.user)
         assert not test_user.valid
         assert test_user.name == u'anonymous'
-
--- a/MoinMoin/auth/_tests/test_ldap_login.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/auth/_tests/test_ldap_login.py	Wed Jul 04 21:53:24 2012 +0400
@@ -232,4 +232,3 @@
         u2 = handle_login(None, username='usera', password='usera')
         assert u2 is not None
         assert u2.valid
-
--- a/MoinMoin/auth/_tests/test_log.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/auth/_tests/test_log.py	Wed Jul 04 21:53:24 2012 +0400
@@ -36,4 +36,3 @@
         assert test_user.name == u'anonymous'
         assert not test_user.valid
         assert bool_value
-
--- a/MoinMoin/auth/http.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/auth/http.py	Wed Jul 04 21:53:24 2012 +0400
@@ -70,4 +70,3 @@
         else:
             logging.debug("returning {0!r}".format(user_obj))
             return user_obj, True
-
--- a/MoinMoin/auth/ldap_login.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/auth/ldap_login.py	Wed Jul 04 21:53:24 2012 +0400
@@ -264,4 +264,3 @@
         except:
             logging.exception("caught an exception, traceback follows...")
             return ContinueLogin(user_obj)
-
--- a/MoinMoin/auth/log.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/auth/log.py	Wed Jul 04 21:53:24 2012 +0400
@@ -35,4 +35,3 @@
     def logout(self, user_obj, **kw):
         self.log('logout', user_obj, kw)
         return user_obj, True
-
--- a/MoinMoin/auth/openidrp.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/auth/openidrp.py	Wed Jul 04 21:53:24 2012 +0400
@@ -163,4 +163,3 @@
 
                 # returns a MultistageFormLogin
                 return MultistageFormLogin(form_html)
-
--- a/MoinMoin/auth/smb_mount.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/auth/smb_mount.py	Wed Jul 04 21:53:24 2012 +0400
@@ -94,4 +94,3 @@
         if user_obj and not user_obj.valid:
             self.do_smb(user_obj.name, None, False)
         return user_obj, True
-
--- a/MoinMoin/config/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/config/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -11,4 +11,3 @@
 from MoinMoin.constants.contenttypes import *
 from MoinMoin.constants.keys import *
 from MoinMoin.constants.misc import *
-
--- a/MoinMoin/config/_tests/test_defaultconfig.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/config/_tests/test_defaultconfig.py	Wed Jul 04 21:53:24 2012 +0400
@@ -37,4 +37,3 @@
                 assert result == (pw_error is None)
 
 coverage_modules = ['MoinMoin.config.default']
-
--- a/MoinMoin/config/default.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/config/default.py	Wed Jul 04 21:53:24 2012 +0400
@@ -577,4 +577,3 @@
 
 _add_options_to_defconfig(options)
 _add_options_to_defconfig(options_no_group_name, False)
-
--- a/MoinMoin/conftest.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/conftest.py	Wed Jul 04 21:53:24 2012 +0400
@@ -127,4 +127,3 @@
         if coverage is not None:
             coverage_modules.update(getattr(self.obj, 'coverage_modules', []))
         return super(Module, self).run(*args, **kwargs)
-
--- a/MoinMoin/constants/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/constants/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -4,4 +4,3 @@
 """
 MoinMoin - modules with constant definitions
 """
-
--- a/MoinMoin/constants/chartypes.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/constants/chartypes.py	Wed Jul 04 21:53:24 2012 +0400
@@ -6,6 +6,3 @@
 chars_digits = u"\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037\u0038\u0039\u00b2\u00b3\u00b9\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u09e6\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u0a66\u0a67\u0a68\u0a69\u0a6a\u0a6b\u0a6c\u0a6d\u0a6e\u0a6f\u0ae6\u0ae7\u0ae8\u0ae9\u0aea\u0aeb\u0aec\u0aed\u0aee\u0aef\u0b66\u0b67\u0b68\u0b69\u0b6a\u0b6b\u0b6c\u0b6d\u0b6e\u0b6f\u0be7\u0be8\u0be9\u0bea\u0beb\u0bec\u0bed\u0bee\u0bef\u0c66\u0c67\u0c68\u0c69\u0c6a\u0c6b\u0c6c\u0c6d\u0c6e\u0c6f\u0ce6\u0ce7\u0ce8\u0ce9\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef\u0d66\u0d67\u0d68\u0d69\u0d6a\u0d6b\u0d6c\u0d6d\u0d6e\u0d6f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0ed0\u0ed1\u0ed2\u0ed3\u0ed4\u0ed5\u0ed6\u0ed7\u0ed8\u0ed9\u0f20\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29\u1040\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049\u1369\u136a\u136b\u136c\u136d\u136e\u136f\u1370\u1371\u17e0\u17e1\u17e2\u17e3\u17e4\u17e5\u17e6\u17e7\u17e8\u17e9\u1810\u1811\u1812\u1813\u1814\u1815\u1816\u1817\u1818\u1819\u2070\u2074\u2075\u2076\u2077\u2078\u2079\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2460\u2461\u2462\u2463\u2464\u2465\u2466\u2467\u2468\u2474\u2475\u2476\u2477\u2478\u2479\u247a\u247b\u247c\u2488\u2489\u248a\u248b\u248c\u248d\u248e\u248f\u2490\u24ea\u24f5\u24f6\u24f7\u24f8\u24f9\u24fa\u24fb\u24fc\u24fd\u2776\u2777\u2778\u2779\u277a\u277b\u277c\u277d\u277e\u2780\u2781\u2782\u2783\u2784\u2785\u2786\u2787\u2788\u278a\u278b\u278c\u278d\u278e\u278f\u2790\u2791\u2792\uff10\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19"
 
 chars_spaces = u"\u0009\u000a\u000b\u000c\u000d\u001c\u001d\u001e\u001f\u0020\u0085\u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000"
-
-
-
--- a/MoinMoin/constants/contenttypes.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/constants/contenttypes.py	Wed Jul 04 21:53:24 2012 +0400
@@ -64,4 +64,3 @@
         ('application/octet-stream', 'binary file'),
     ]),
 ]
-
--- a/MoinMoin/constants/keys.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/constants/keys.py	Wed Jul 04 21:53:24 2012 +0400
@@ -90,4 +90,3 @@
 # index names
 LATEST_REVS = 'latest_revs'
 ALL_REVS = 'all_revs'
-
--- a/MoinMoin/constants/misc.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/constants/misc.py	Wed Jul 04 21:53:24 2012 +0400
@@ -44,4 +44,3 @@
                'notes',
                'rtp', 'rtsp', 'rtcp',
               ]
-
--- a/MoinMoin/constants/rights.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/constants/rights.py	Wed Jul 04 21:53:24 2012 +0400
@@ -38,4 +38,3 @@
 
 # rights that control access to operations on contents
 ACL_RIGHTS_CONTENTS = [READ, WRITE, CREATE, ADMIN, DESTROY, ]
-
--- a/MoinMoin/constants/tools/chartypes_create.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/constants/tools/chartypes_create.py	Wed Jul 04 21:53:24 2012 +0400
@@ -43,4 +43,3 @@
 
 if __name__ == '__main__':
     main()
-
--- a/MoinMoin/converter/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -79,4 +79,3 @@
 
 default_registry = RegistryConverter()
 load_package_modules(__name__, __path__)
-
--- a/MoinMoin/converter/_args.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_args.py	Wed Jul 04 21:53:24 2012 +0400
@@ -65,4 +65,3 @@
             yield value
         for value in self.keyword.itervalues():
             yield value
-
--- a/MoinMoin/converter/_args_wiki.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_args_wiki.py	Wed Jul 04 21:53:24 2012 +0400
@@ -83,4 +83,3 @@
         ret.append(key + u'=' + value)
 
     return u' '.join(ret)
-
--- a/MoinMoin/converter/_table.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_table.py	Wed Jul 04 21:53:24 2012 +0400
@@ -38,4 +38,3 @@
             table_body.append(table_row)
         table.append(table_body)
         return table
-
--- a/MoinMoin/converter/_tests/test__args.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test__args.py	Wed Jul 04 21:53:24 2012 +0400
@@ -94,4 +94,3 @@
     assert l[1] == 'both'
     assert True in l
     assert False in l
-
--- a/MoinMoin/converter/_tests/test__args_wiki.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test__args_wiki.py	Wed Jul 04 21:53:24 2012 +0400
@@ -38,4 +38,3 @@
 
     s = unparse(Arguments(positional, keyword))
     assert s == wiki
-
--- a/MoinMoin/converter/_tests/test__wiki_macro.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test__wiki_macro.py	Wed Jul 04 21:53:24 2012 +0400
@@ -116,4 +116,3 @@
         result = self.conv.parser(name, args, text)
         if output is not None or result is not None:
             assert self.serialize(result) == output
-
--- a/MoinMoin/converter/_tests/test_creole_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_creole_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -261,4 +261,3 @@
     def do(self, input, output, args={}):
         out = self.conv(input, 'text/x.moin.creole;charset=utf-8', **args)
         assert self.serialize(out) == output
-
--- a/MoinMoin/converter/_tests/test_docbook_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_docbook_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -429,4 +429,3 @@
         ]
         for i in data:
             yield (self.do_nonamespace, ) + i
-
--- a/MoinMoin/converter/_tests/test_docbook_out.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_docbook_out.py	Wed Jul 04 21:53:24 2012 +0400
@@ -217,4 +217,3 @@
         ]
         for i in data:
             yield (self.do, ) + i
-
--- a/MoinMoin/converter/_tests/test_html_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_html_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -270,4 +270,3 @@
         ]
         for i in data:
             yield (self.do, ) + i
-
--- a/MoinMoin/converter/_tests/test_html_in_out.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_html_in_out.py	Wed Jul 04 21:53:24 2012 +0400
@@ -211,4 +211,3 @@
         ]
         for i in data:
             yield (self.do, ) + i
-
--- a/MoinMoin/converter/_tests/test_html_out.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_html_out.py	Wed Jul 04 21:53:24 2012 +0400
@@ -245,4 +245,3 @@
     def test_unknown(self):
         page = ET.XML("<page:unknown {0}/>".format(self.input_namespaces))
         pytest.raises(ElementException, self.conv.__call__, page)
-
--- a/MoinMoin/converter/_tests/test_include.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_include.py	Wed Jul 04 21:53:24 2012 +0400
@@ -129,4 +129,3 @@
         rendered = MoinWiki.create(u'page1')._render_data()
         assert '<p />' not in rendered
         assert '<p></p>' not in rendered
-
--- a/MoinMoin/converter/_tests/test_link.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_link.py	Wed Jul 04 21:53:24 2012 +0400
@@ -160,4 +160,3 @@
         assert sorted(links_result) == sorted(links_expected)
         assert sorted(transclusions_result) == sorted(transclusions_expected)
         assert sorted(external_result) == sorted(external_expected)
-
--- a/MoinMoin/converter/_tests/test_mediawiki_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_mediawiki_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -166,4 +166,3 @@
         assert self.serialize(out) == output
 
 coverage_modules = ['MoinMoin.converter.mediawiki_in']
-
--- a/MoinMoin/converter/_tests/test_moinwiki19_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_moinwiki19_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -37,4 +37,3 @@
         ]
         for i in data:
             yield (self.do, ) + i
-
--- a/MoinMoin/converter/_tests/test_moinwiki_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_moinwiki_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -317,4 +317,3 @@
             pytest.skip(skip)
         out = self.conv(input, 'text/x.moin.wiki;charset=utf-8', **args)
         assert self.serialize(out) == output
-
--- a/MoinMoin/converter/_tests/test_moinwiki_in_out.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_moinwiki_in_out.py	Wed Jul 04 21:53:24 2012 +0400
@@ -512,4 +512,3 @@
         out = self.conv_in(input, 'text/x.moin.wiki;charset=utf-8', **args)
         out = self.conv_out(self.handle_input(self.serialize(out)), **args)
         assert self.handle_output(out) == output
-
--- a/MoinMoin/converter/_tests/test_moinwiki_out.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_moinwiki_out.py	Wed Jul 04 21:53:24 2012 +0400
@@ -147,4 +147,3 @@
             yield (self.do, ) + i
 
 coverage_modules = ['MoinMoin.converter.moinwiki_out']
-
--- a/MoinMoin/converter/_tests/test_rst_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_rst_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -155,4 +155,3 @@
         assert self.serialize(out) == output
 
 coverage_modules = ['MoinMoin.converter.rst_in']
-
--- a/MoinMoin/converter/_tests/test_rst_out.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_rst_out.py	Wed Jul 04 21:53:24 2012 +0400
@@ -181,4 +181,3 @@
             yield (self.do, ) + i
 
 coverage_modules = ['MoinMoin.converter.rst_out']
-
--- a/MoinMoin/converter/_tests/test_smiley.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_tests/test_smiley.py	Wed Jul 04 21:53:24 2012 +0400
@@ -77,4 +77,3 @@
     result = tree.xpath(query)
     print 'query result:', result
     assert result
-
--- a/MoinMoin/converter/_util.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_util.py	Wed Jul 04 21:53:24 2012 +0400
@@ -48,4 +48,3 @@
     text = text.replace(u'\r\n', u'\n')
     lines = text.split(u'\n')
     return lines
-
--- a/MoinMoin/converter/_wiki_macro.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/_wiki_macro.py	Wed Jul 04 21:53:24 2012 +0400
@@ -169,4 +169,3 @@
             elem.append(moin_page.body(children=content))
 
         return elem
-
--- a/MoinMoin/converter/archive_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/archive_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -122,4 +122,3 @@
 default_registry.register(TarConverter._factory, Type('application/x-tar'), type_moin_document)
 default_registry.register(TarConverter._factory, Type('application/x-gtar'), type_moin_document)
 default_registry.register(ZipConverter._factory, Type('application/zip'), type_moin_document)
-
--- a/MoinMoin/converter/audio_video_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/audio_video_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -42,4 +42,3 @@
 default_registry.register(Converter._factory, Type('video/webm'), type_moin_document)
 default_registry.register(Converter._factory, Type('audio/ogg'), type_moin_document)
 default_registry.register(Converter._factory, Type('audio/wave'), type_moin_document)
-
--- a/MoinMoin/converter/creole_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/creole_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -706,4 +706,3 @@
 from MoinMoin.util.mime import Type, type_moin_document, type_moin_creole
 default_registry.register(Converter.factory, type_moin_creole, type_moin_document)
 default_registry.register(Converter.factory, Type('x-moin/format;name=creole'), type_moin_document)
-
--- a/MoinMoin/converter/docbook_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/docbook_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -1154,4 +1154,3 @@
 from . import default_registry
 from MoinMoin.util.mime import Type, type_moin_document
 default_registry.register(Converter._factory, Type('application/docbook+xml'), type_moin_document)
-
--- a/MoinMoin/converter/docbook_out.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/docbook_out.py	Wed Jul 04 21:53:24 2012 +0400
@@ -516,4 +516,3 @@
 from MoinMoin.util.mime import Type, type_moin_document
 default_registry.register(Converter._factory, type_moin_document,
     Type('application/docbook+xml'))
-
--- a/MoinMoin/converter/everything.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/everything.py	Wed Jul 04 21:53:24 2012 +0400
@@ -36,4 +36,3 @@
                           default_registry.PRIORITY_MIDDLE + 3)
 default_registry.register(Converter._factory, Type(type=None, subtype=None), type_moin_document,
                           default_registry.PRIORITY_MIDDLE + 3)
-
--- a/MoinMoin/converter/highlight.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/highlight.py	Wed Jul 04 21:53:24 2012 +0400
@@ -57,4 +57,3 @@
 from . import default_registry
 from MoinMoin.util.mime import Type, type_moin_document
 default_registry.register(Converter._factory, type_moin_document, type_moin_document)
-
--- a/MoinMoin/converter/html_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/html_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -559,4 +559,3 @@
 from . import default_registry
 from MoinMoin.util.mime import Type, type_moin_document
 default_registry.register(Converter._factory, Type('text/html'), type_moin_document)
-
--- a/MoinMoin/converter/html_out.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/html_out.py	Wed Jul 04 21:53:24 2012 +0400
@@ -736,4 +736,3 @@
 from . import default_registry
 from MoinMoin.util.mime import Type, type_moin_document
 default_registry.register(ConverterPage._factory, type_moin_document, Type('application/x-xhtml-moin-page'))
-
--- a/MoinMoin/converter/image_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/image_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -40,4 +40,3 @@
 default_registry.register(Converter._factory, Type('image/png'), type_moin_document)
 default_registry.register(Converter._factory, Type('image/jpeg'), type_moin_document)
 default_registry.register(Converter._factory, Type('image/gif'), type_moin_document)
-
--- a/MoinMoin/converter/include.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/include.py	Wed Jul 04 21:53:24 2012 +0400
@@ -349,4 +349,3 @@
 from . import default_registry
 from MoinMoin.util.mime import Type, type_moin_document
 default_registry.register(Converter._factory, type_moin_document, type_moin_document)
-
--- a/MoinMoin/converter/link.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/link.py	Wed Jul 04 21:53:24 2012 +0400
@@ -267,4 +267,3 @@
 from . import default_registry
 default_registry.register(ConverterExternOutput._factory, type_moin_document, type_moin_document)
 default_registry.register(ConverterItemRefs._factory, type_moin_document, type_moin_document)
-
--- a/MoinMoin/converter/macro.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/macro.py	Wed Jul 04 21:53:24 2012 +0400
@@ -117,4 +117,3 @@
 from . import default_registry
 from MoinMoin.util.mime import Type, type_moin_document
 default_registry.register(Converter._factory, type_moin_document, type_moin_document)
-
--- a/MoinMoin/converter/mediawiki_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/mediawiki_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -814,7 +814,7 @@
     class Mediawiki_preprocessor(object):
 
         class Preprocessor_tag(object):
-            def __init__(self, name='', text='', tag='',  status=True):
+            def __init__(self, name='', text='', tag='', status=True):
                 self.tag_name = name
                 self.tag = tag
                 self.text = [text]
@@ -1005,4 +1005,3 @@
 from MoinMoin.util.mime import Type, type_moin_document
 default_registry.register(Converter.factory, Type('x-moin/format;name=mediawiki'), type_moin_document)
 default_registry.register(Converter.factory, Type('text/x-mediawiki'), type_moin_document)
-
--- a/MoinMoin/converter/moinwiki19_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/moinwiki19_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -162,5 +162,3 @@
 from MoinMoin.util.mime import Type, type_moin_document, type_moin_wiki
 default_registry.register(ConverterFormat19.factory, Type('text/x.moin.wiki;format=1.9'), type_moin_document)
 default_registry.register(ConverterFormat19.factory, Type('x-moin/format;name=wiki;format=1.9'), type_moin_document)
-
-
--- a/MoinMoin/converter/moinwiki_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/moinwiki_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -1137,5 +1137,3 @@
 from MoinMoin.util.mime import Type, type_moin_document, type_moin_wiki
 default_registry.register(Converter.factory, type_moin_wiki, type_moin_document)
 default_registry.register(Converter.factory, Type('x-moin/format;name=wiki'), type_moin_document)
-
-
--- a/MoinMoin/converter/moinwiki_out.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/moinwiki_out.py	Wed Jul 04 21:53:24 2012 +0400
@@ -518,4 +518,3 @@
 from MoinMoin.util.mime import Type, type_moin_document, type_moin_wiki
 default_registry.register(Converter.factory, type_moin_document, type_moin_wiki)
 default_registry.register(Converter.factory, type_moin_document, Type('x-moin/format;name=wiki'))
-
--- a/MoinMoin/converter/nonexistent_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/nonexistent_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -34,4 +34,3 @@
 from . import default_registry
 from MoinMoin.util.mime import Type, type_moin_document
 default_registry.register(Converter._factory, Type('application/x-nonexistent'), type_moin_document)
-
--- a/MoinMoin/converter/opendocument_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/opendocument_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -70,4 +70,3 @@
 
 for t in openoffice_types:
     default_registry.register(OpenOfficeIndexingConverter._factory, Type(t), type_text_plain)
-
--- a/MoinMoin/converter/pdf_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/pdf_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -67,4 +67,3 @@
 from . import default_registry
 from MoinMoin.util.mime import Type, type_text_plain
 default_registry.register(PDFIndexingConverter._factory, Type('application/pdf'), type_text_plain)
-
--- a/MoinMoin/converter/pygments_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/pygments_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -137,4 +137,3 @@
                 blockcode.append(line.expandtabs())
             body = moin_page.body(children=(blockcode, ))
             return moin_page.page(children=(body, ))
-
--- a/MoinMoin/converter/rst_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/rst_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -783,4 +783,3 @@
                           Type('text/x-rst'), type_moin_document)
 default_registry.register(Converter.factory,
                           Type('x-moin/format;name=rst'), type_moin_document)
-
--- a/MoinMoin/converter/rst_out.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/rst_out.py	Wed Jul 04 21:53:24 2012 +0400
@@ -778,4 +778,3 @@
 default_registry.register(Converter.factory,
                           type_moin_document,
                           Type('x-moin/format;name=rst'))
-
--- a/MoinMoin/converter/smiley.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/smiley.py	Wed Jul 04 21:53:24 2012 +0400
@@ -139,4 +139,3 @@
 from . import default_registry
 from MoinMoin.util.mime import type_moin_document
 default_registry.register(Converter._factory, type_moin_document, type_moin_document)
-
--- a/MoinMoin/converter/text_csv_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/text_csv_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -45,4 +45,3 @@
 from . import default_registry
 from MoinMoin.util.mime import Type, type_moin_document
 default_registry.register(Converter._factory, Type('text/csv'), type_moin_document)
-
--- a/MoinMoin/converter/text_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/text_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -44,4 +44,3 @@
 from MoinMoin.util.mime import Type, type_moin_document
 default_registry.register(Converter._factory, Type(type='text'), type_moin_document,
                           default_registry.PRIORITY_MIDDLE + 2)
-
--- a/MoinMoin/converter/text_out.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/text_out.py	Wed Jul 04 21:53:24 2012 +0400
@@ -30,4 +30,3 @@
 from . import default_registry
 from MoinMoin.util.mime import Type, type_moin_document, type_text_plain
 default_registry.register(Converter.factory, type_moin_document, type_text_plain)
-
--- a/MoinMoin/converter/xml_in.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/converter/xml_in.py	Wed Jul 04 21:53:24 2012 +0400
@@ -40,4 +40,3 @@
 from . import default_registry
 from MoinMoin.util.mime import Type, type_text_plain
 default_registry.register(XMLIndexingConverter._factory, Type('text/xml'), type_text_plain)
-
--- a/MoinMoin/datastruct/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -16,4 +16,3 @@
 
 from MoinMoin.datastruct.backends import GroupDoesNotExistError
 from MoinMoin.datastruct.backends import DictDoesNotExistError
-
--- a/MoinMoin/datastruct/backends/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -330,4 +330,3 @@
             return self[key]
         except DictDoesNotExistError:
             return default
-
--- a/MoinMoin/datastruct/backends/_tests/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/_tests/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -183,4 +183,3 @@
                 assert u'SomeNotExistingKey' not in test_dict
                 assert test_dict.get(u'SomeNotExistingKey') is None
                 assert test_dict.get(u'SomeNotExistingKey', {}) == {}
-
--- a/MoinMoin/datastruct/backends/_tests/test_composite_dicts.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/_tests/test_composite_dicts.py	Wed Jul 04 21:53:24 2012 +0400
@@ -31,4 +31,3 @@
 
 
 coverage_modules = ['MoinMoin.datastruct.backends.composite_dicts']
-
--- a/MoinMoin/datastruct/backends/_tests/test_composite_groups.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/_tests/test_composite_groups.py	Wed Jul 04 21:53:24 2012 +0400
@@ -86,4 +86,3 @@
 
 
 coverage_modules = ['MoinMoin.datastruct.backends.composite_groups']
-
--- a/MoinMoin/datastruct/backends/_tests/test_config_dicts.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/_tests/test_config_dicts.py	Wed Jul 04 21:53:24 2012 +0400
@@ -27,4 +27,3 @@
             assert result in expected
 
 coverage_modules = ['MoinMoin.datastruct.backends.config_dicts']
-
--- a/MoinMoin/datastruct/backends/_tests/test_config_groups.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/_tests/test_config_groups.py	Wed Jul 04 21:53:24 2012 +0400
@@ -21,4 +21,3 @@
 
 
 coverage_modules = ['MoinMoin.datastruct.backends.config_groups']
-
--- a/MoinMoin/datastruct/backends/_tests/test_lazy_config_groups.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/_tests/test_lazy_config_groups.py	Wed Jul 04 21:53:24 2012 +0400
@@ -55,4 +55,3 @@
 
 
 coverage_modules = ['MoinMoin.datastruct.backends.config_lazy_groups']
-
--- a/MoinMoin/datastruct/backends/_tests/test_wiki_dicts.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/_tests/test_wiki_dicts.py	Wed Jul 04 21:53:24 2012 +0400
@@ -41,4 +41,3 @@
         assert result == expected
 
 coverage_modules = ['MoinMoin.datastruct.backends.wiki_dicts']
-
--- a/MoinMoin/datastruct/backends/_tests/test_wiki_groups.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/_tests/test_wiki_groups.py	Wed Jul 04 21:53:24 2012 +0400
@@ -107,4 +107,3 @@
         assert has_rights_after, 'AnotherUser must have read rights because after appenditem he is member of NewGroup'
 
 coverage_modules = ['MoinMoin.datastruct.backends.wiki_groups']
-
--- a/MoinMoin/datastruct/backends/composite_dicts.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/composite_dicts.py	Wed Jul 04 21:53:24 2012 +0400
@@ -44,4 +44,3 @@
 
     def __repr__(self):
         return "<{0} backends={1}>".format(self.__class__, self._backends)
-
--- a/MoinMoin/datastruct/backends/composite_groups.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/composite_groups.py	Wed Jul 04 21:53:24 2012 +0400
@@ -67,4 +67,3 @@
 
     def __repr__(self):
         return "<{0} backends={1}>".format(self.__class__, self._backends)
-
--- a/MoinMoin/datastruct/backends/config_dicts.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/config_dicts.py	Wed Jul 04 21:53:24 2012 +0400
@@ -36,4 +36,3 @@
             return self._dicts[dict_name]
         except KeyError:
             raise DictDoesNotExistError(dict_name)
-
--- a/MoinMoin/datastruct/backends/config_groups.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/config_groups.py	Wed Jul 04 21:53:24 2012 +0400
@@ -41,4 +41,3 @@
             return self._groups[group_name]
         except KeyError:
             raise GroupDoesNotExistError(group_name)
-
--- a/MoinMoin/datastruct/backends/config_lazy_groups.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/config_lazy_groups.py	Wed Jul 04 21:53:24 2012 +0400
@@ -41,4 +41,3 @@
 
     def _group_has_member(self, group_name, member):
         return group_name in self and member in self._groups[group_name]
-
--- a/MoinMoin/datastruct/backends/wiki_dicts.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/wiki_dicts.py	Wed Jul 04 21:53:24 2012 +0400
@@ -45,4 +45,3 @@
         rev = item.get_revision(CURRENT)
         somedict = rev.meta.get(SOMEDICT, {})
         return somedict
-
--- a/MoinMoin/datastruct/backends/wiki_groups.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/datastruct/backends/wiki_groups.py	Wed Jul 04 21:53:24 2012 +0400
@@ -53,4 +53,3 @@
         rev = item[CURRENT]
         usergroup = rev.meta.get(USERGROUP, [])
         return usergroup
-
--- a/MoinMoin/error.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/error.py	Wed Jul 04 21:53:24 2012 +0400
@@ -105,4 +105,3 @@
 
 class InternalError(FatalError):
     """ Raise when internal fatal error is found """
-
--- a/MoinMoin/i18n/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/i18n/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -66,4 +66,3 @@
     u = getattr(flaskg, 'user', None)
     if u and u.timezone is not None:
         return u.timezone
-
--- a/MoinMoin/i18n/_tests/test_i18n.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/i18n/_tests/test_i18n.py	Wed Jul 04 21:53:24 2012 +0400
@@ -31,4 +31,3 @@
     assert result1 == 'text1'
     result2 = N_('text1', 'text2', 2)
     assert result2 == 'text2'
-
--- a/MoinMoin/items/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/items/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -1,3 +1,4 @@
+# Copyright: 2012 MoinMoin:CheerXiao
 # Copyright: 2009 MoinMoin:ThomasWaldmann
 # Copyright: 2009-2011 MoinMoin:ReimarBauer
 # Copyright: 2009 MoinMoin:ChristopherDenter
@@ -69,7 +70,7 @@
 from MoinMoin.util.interwiki import url_for_item
 from MoinMoin.storage.error import NoSuchItemError, NoSuchRevisionError, StorageError
 from MoinMoin.config import NAME, NAME_OLD, NAME_EXACT, WIKINAME, MTIME, REVERTED_TO, ACL, \
-                            IS_SYSITEM, SYSITEM_VERSION,  USERGROUP, SOMEDICT, \
+                            IS_SYSITEM, SYSITEM_VERSION, USERGROUP, SOMEDICT, \
                             CONTENTTYPE, SIZE, LANGUAGE, ITEMLINKS, ITEMTRANSCLUSIONS, \
                             TAGS, ACTION, ADDRESS, HOSTNAME, USERID, EXTRA, COMMENT, \
                             HASH_ALGORITHM, CONTENTTYPE_GROUPS, ITEMID, REVID, DATAID, \
@@ -400,10 +401,8 @@
         trashname = u'{0}{1} ({2} UTC)'.format(trash_prefix, self.name, now)
         return self._rename(trashname, comment, action=u'TRASH')
 
-    def revert(self):
-        # called from revert UI/POST
-        comment = request.form.get('comment')
-        self._save(self.meta, self.data, action=u'REVERT', comment=comment)
+    def revert(self, comment=u''):
+        return self._save(self.meta, self.data, action=u'REVERT', comment=comment)
 
     def destroy(self, comment=u'', destroy_item=False):
         # called from destroy UI/POST
@@ -414,43 +413,11 @@
             # just destroy this revision
             self.rev.item.destroy_revision(self.rev.revid)
 
-    def modify(self):
-        # called from modify UI/POST
-        meta = data = contenttype_guessed = None
-        contenttype_qs = request.values.get('contenttype')
-        data_file = request.files.get('data_file')
-        if data_file and data_file.filename: # XXX is this the right way to check if there was a file uploaded?
-            data = data_file.stream
-            # this is likely a guess by the browser, based on the filename
-            contenttype_guessed = data_file.content_type # comes from form multipart data
-        if data is None:
-            # no file upload, try taking stuff from textarea
-            data = request.form.get('data_text')
-            if data is not None:
-                # there was a data_text field with (possibly empty) content
-                assert isinstance(data, unicode) # we get unicode from the form
-                data = self.data_form_to_internal(data)
-                data = self.data_internal_to_storage(data)
-                # we know it is text and utf-8 - XXX is there a way to get the charset of the form?
-                contenttype_guessed = u'text/plain;charset=utf-8'
-        # data might be None here, if we have a form with just the data_file field, no file was uploaded
-        # and no data_text field. this can happen if just metadata of a non-text item is edited.
-
-        meta_text = request.form.get('meta_text')
-        if meta_text is not None:
-            # there was a meta_text field with (possibly empty) content
-            # Note: if you get crashes here, please see the ValidJSON validator
-            # to catch invalid json issues early.
-            meta = self.meta_text_to_dict(meta_text)
-        if meta is None:
-            # no form metadata - reuse some stuff from previous metadata?
-            meta = {}
-
+    def modify(self, meta, data, comment=u'', contenttype_guessed=None, contenttype_qs=None):
         if contenttype_qs:
             # we use querystring param to FORCE content type
             meta[CONTENTTYPE] = contenttype_qs
 
-        comment = request.form.get('comment')
         return self._save(meta, data, contenttype_guessed=contenttype_guessed, comment=comment)
 
     def _save(self, meta, data=None, name=None, action=u'SAVE', contenttype_guessed=None, comment=u'', overwrite=False):
@@ -644,7 +611,6 @@
         if not flaskg.user.may.create(self.name):
             abort(403)
 
-        # XXX think about and add item template support
         return render_template('modify_show_type_selection.html',
                                item_name=self.name,
                                contenttype_groups=CONTENTTYPE_GROUPS,
@@ -693,25 +659,64 @@
         revs = flaskg.storage.search(query, sortedby=NAME_EXACT, limit=None)
         return [rev.meta[NAME] for rev in revs]
 
-    def do_modify(self, contenttype, template_name):
-        # XXX think about and add item template support
-        #if template_name is None and isinstance(self.rev, DummyRev):
-        #    return self._do_modify_show_templates()
-        from MoinMoin.apps.frontend.views import CommentForm
-        class ModifyForm(CommentForm):
-            meta_text = String.using(optional=False).with_properties(placeholder=L_("MetaData (JSON)")).validated_by(ValidJSON())
-            data_file = FileStorage.using(optional=True, label=L_('Upload file:'))
+    from MoinMoin.apps.frontend.views import CommentForm
+    class ModifyForm(CommentForm):
+        """Base class for ModifyForm of Binary's subclasses."""
+        meta_text = String.using(optional=False).with_properties(placeholder=L_("MetaData (JSON)")).validated_by(ValidJSON())
+        data_file = FileStorage.using(optional=True, label=L_('Upload file:'))
 
-        if request.method == 'GET':
-            form = ModifyForm.from_defaults()
+        def _load(self, item):
+            self['meta_text'] = item.meta_dict_to_text(item.prepare_meta_for_modify(item.meta))
+
+        def _dump(self, item):
+            data = meta = contenttype_guessed = None
+            data_file = self['data_file'].value
+            if data_file:
+                data = data_file.stream
+                # this is likely a guess by the browser, based on the filename
+                contenttype_guessed = data_file.content_type # comes from form multipart data
+            meta = item.meta_text_to_dict(self['meta_text'].value)
+            comment = self['comment'].value
+            return meta, data, contenttype_guessed, comment
+
+        extra_template_args = {}
+
+        @classmethod
+        def from_item(cls, item):
+            form = cls.from_defaults()
             TextCha(form).amend_form()
-            form['meta_text'] = self.meta_dict_to_text(self.prepare_meta_for_modify(self.meta))
-        elif request.method == 'POST':
-            form = ModifyForm.from_flat(request.form.items() + request.files.items())
+            form._load(item)
+            return form
+
+        @classmethod
+        def from_request(cls, request):
+            form = cls.from_flat(request.form.items() + request.files.items())
             TextCha(form).amend_form()
+            return form
+
+    def do_modify(self, contenttype, template_name):
+        """
+        Handle +modify requests, both GET and POST.
+
+        This method can be overridden in subclasses, providing polymorphic
+        behavior for the +modify view.
+        """
+        method = request.method
+        if method == 'GET':
+            item = self
+            if isinstance(self.rev, DummyRev):
+                if template_name is None:
+                    return self._do_modify_show_templates()
+                elif template_name:
+                    item = Item.create(template_name)
+            form = self.ModifyForm.from_item(item)
+        elif method == 'POST':
+            form = self.ModifyForm.from_request(request)
             if form.validate():
+                meta, data, contenttype_guessed, comment = form._dump(self)
+                contenttype_qs = request.values.get('contenttype')
                 try:
-                    self.modify() # XXX
+                    self.modify(meta, data, comment, contenttype_guessed, contenttype_qs)
                 except AccessDenied:
                     abort(403)
                 else:
@@ -722,6 +727,7 @@
                                help=self.modify_help,
                                form=form,
                                search_form=None,
+                               **form.extra_template_args
                               )
 
     def _render_data_diff(self, oldrev, newrev):
@@ -1044,14 +1050,14 @@
         url = url_for('frontend.diffraw', _external=True, item_name=self.name, rev1=oldrev.revid, rev2=newrev.revid)
         return render_template('atom.html',
                                oldrev=oldrev, newrev=newrev, get='binary',
-                               content=Markup('<img src="{0}" />'.format(escape(url))))
+                               content=Markup(u'<img src="{0}" />'.format(escape(url))))
 
     def _render_data_diff(self, oldrev, newrev):
         if PIL is None:
             # no PIL, we can't do anything, we just call the base class method
             return super(TransformableBitmapImage, self)._render_data_diff(oldrev, newrev)
         url = url_for('frontend.diffraw', item_name=self.name, rev1=oldrev.revid, rev2=newrev.revid)
-        return Markup('<img src="{0}" />'.format(escape(url)))
+        return Markup(u'<img src="{0}" />'.format(escape(url)))
 
     def _render_data_diff_raw(self, oldrev, newrev):
         hash_name = HASH_ALGORITHM
@@ -1106,6 +1112,28 @@
     """ Base class for text/* """
     template = "modify_text.html"
 
+    class ModifyForm(Binary.ModifyForm):
+        data_text = String.using(strip=False, optional=True).with_properties(placeholder=L_("Type your text here"))
+
+        def _load(self, item):
+            super(Text.ModifyForm, self)._load(item)
+            data = item.data
+            data = item.data_storage_to_internal(data)
+            data = item.data_internal_to_form(data)
+            self['data_text'] = data
+
+        def _dump(self, item):
+            meta, data, contenttype_guessed, comment = super(Text.ModifyForm, self)._dump(item)
+            if data is None:
+                data = self['data_text'].value
+                data = item.data_form_to_internal(data)
+                data = item.data_internal_to_storage(data)
+                # we know it is text and utf-8 - XXX is there a way to get the charset of the form?
+                contenttype_guessed = u'text/plain;charset=utf-8'
+            return meta, data, contenttype_guessed, comment
+
+        extra_template_args = {'rows_data': str(ROWS_DATA)}
+
     # text/plain mandates crlf - but in memory, we want lf only
     def data_internal_to_form(self, text):
         """ convert data from memory format to form format """
@@ -1164,45 +1192,6 @@
         doc = html_conv(doc)
         return conv_serialize(doc, {html.namespace: ''})
 
-    def do_modify(self, contenttype, template_name):
-        # XXX think about and add item template support
-        #if template_name is None and isinstance(self.rev, DummyRev):
-        #    return self._do_modify_show_templates()
-        from MoinMoin.apps.frontend.views import CommentForm
-        class ModifyForm(CommentForm):
-            meta_text = String.using(optional=False).with_properties(placeholder=L_("MetaData (JSON)")).validated_by(ValidJSON())
-            data_text = String.using(strip=False, optional=True).with_properties(placeholder=L_("Type your text here"))
-            data_file = FileStorage.using(optional=True, label=L_('Upload file:'))
-
-        if request.method == 'GET':
-            if template_name is None and isinstance(self.rev, DummyRev):
-                return self._do_modify_show_templates()
-            form = ModifyForm.from_defaults()
-            TextCha(form).amend_form()
-            if template_name:
-                item = Item.create(template_name)
-                form['data_text'] = self.data_storage_to_internal(item.data)
-            else:
-                form['data_text'] = self.data_storage_to_internal(self.data)
-            form['meta_text'] = self.meta_dict_to_text(self.prepare_meta_for_modify(self.meta))
-        elif request.method == 'POST':
-            form = ModifyForm.from_flat(request.form.items() + request.files.items())
-            TextCha(form).amend_form()
-            if form.validate():
-                try:
-                    self.modify() # XXX
-                except AccessDenied:
-                    abort(403)
-                else:
-                    return redirect(url_for_item(self.name))
-        return render_template(self.template,
-                               item_name=self.name,
-                               rows_data=str(ROWS_DATA), rows_meta=str(ROWS_META), cols=str(COLS),
-                               help=self.modify_help,
-                               form=form,
-                               search_form=None,
-                              )
-
 item_registry.register(Text._factory, Type('text/*'))
 
 
@@ -1300,14 +1289,40 @@
 item_registry.register(DocBook._factory, Type('application/docbook+xml'))
 
 
-class TWikiDraw(TarMixin, Image):
+class Draw(TarMixin, Image):
+    """
+    Base class for *Draw that use special Java/Javascript applets to modify and store data in a tar file.
+    """
+    class ModifyForm(Binary.ModifyForm):
+        pass
+
+    def handle_post():
+        raise NotImplementedError
+
+    def do_modify(self, contenttype, template_name):
+        # XXX as the "saving" POSTs come from *Draw applets (not the form),
+        # they need to be handled specially for each applet. Besides, editing
+        # meta_text doesn't work
+        if request.method == 'POST':
+            try:
+                self.handle_post()
+            except AccessDenied:
+                abort(403)
+            else:
+                # *Draw Applets POSTs more than once, redirecting would break them
+                return "OK"
+        else:
+            return super(Draw, self).do_modify(contenttype, template_name)
+
+
+class TWikiDraw(Draw):
     """
     drawings by TWikiDraw applet. It creates three files which are stored as tar file.
     """
     modify_help = ""
     template = "modify_twikidraw.html"
 
-    def modify(self):
+    def handle_post(self):
         # called from modify UI/POST
         file_upload = request.files.get('filepath')
         filename = request.form['filename']
@@ -1331,38 +1346,6 @@
         self.put_member('drawing' + ext, filecontent, content_length,
                         expected_members=set(['drawing.draw', 'drawing.map', 'drawing.png']))
 
-    def do_modify(self, contenttype, template_name):
-        # XXX think about and add item template support
-        #if template_name is None and isinstance(self.rev, DummyRev):
-        #    return self._do_modify_show_templates()
-        from MoinMoin.apps.frontend.views import CommentForm
-        class ModifyForm(CommentForm):
-            # XXX as the "saving" POSTs come from TWikiDraw (not the form), editing meta_text doesn't work
-            meta_text = String.using(optional=False).with_properties(placeholder=L_("MetaData (JSON)")).validated_by(ValidJSON())
-            data_file = FileStorage.using(optional=True, label=L_('Upload file:'))
-
-        if request.method == 'GET':
-            form = ModifyForm.from_defaults()
-            TextCha(form).amend_form()
-            # XXX currently this is rather pointless, as the form does not get POSTed:
-            form['meta_text'] = self.meta_dict_to_text(self.prepare_meta_for_modify(self.meta))
-        elif request.method == 'POST':
-            # this POST comes directly from TWikiDraw (not from Browser), thus no validation
-            try:
-                self.modify() # XXX
-            except AccessDenied:
-                abort(403)
-            else:
-                # TWikiDraw POSTs more than once, redirecting would break them
-                return "OK"
-        return render_template(self.template,
-                               item_name=self.name,
-                               rows_meta=str(ROWS_META), cols=str(COLS),
-                               help=self.modify_help,
-                               form=form,
-                               search_form=None,
-                              )
-
     def _render_data(self):
         # TODO: this could be a converter -> dom, then transcluding this kind
         # of items and also rendering them with the code in base class could work
@@ -1386,21 +1369,30 @@
             image_map = image_map.replace('%TWIKIDRAW%"', '{0}" alt="{1}" title="{2}"'.format((drawing_url, title, title)))
             title = _('Clickable drawing: %(filename)s', filename=item_name)
 
-            return Markup(image_map + '<img src="{0}" alt="{1}" usemap="#{2}" />'.format(png_url, title, mapid))
+            return Markup(image_map + u'<img src="{0}" alt="{1}" usemap="#{2}" />'.format(png_url, title, mapid))
         else:
-            return Markup('<img src="{0}" alt="{1}" />'.format(png_url, title))
+            return Markup(u'<img src="{0}" alt="{1}" />'.format(png_url, title))
 
 item_registry.register(TWikiDraw._factory, Type('application/x-twikidraw'))
 
 
-class AnyWikiDraw(TarMixin, Image):
+class AnyWikiDraw(Draw):
     """
     drawings by AnyWikiDraw applet. It creates three files which are stored as tar file.
     """
     modify_help = ""
     template = "modify_anywikidraw.html"
 
-    def modify(self):
+    class ModifyForm(Draw.ModifyForm):
+        def _load(self, item):
+            super(AnyWikiDraw.ModifyForm, self)._load(item)
+            try:
+                drawing_exists = 'drawing.svg' in item.list_members()
+            except tarfile.TarError: # item doesn't exist yet
+                drawing_exists = False
+            self.extra_template_args = {'drawing_exists': drawing_exists}
+
+    def handle_post(self):
         # called from modify UI/POST
         file_upload = request.files.get('filepath')
         filename = request.form['filename']
@@ -1422,43 +1414,6 @@
         self.put_member('drawing' + ext, filecontent, content_length,
                         expected_members=set(['drawing.svg', 'drawing.map', 'drawing.png']))
 
-    def do_modify(self, contenttype, template_name):
-        # XXX think about and add item template support
-        #if template_name is None and isinstance(self.rev, DummyRev):
-        #    return self._do_modify_show_templates()
-        from MoinMoin.apps.frontend.views import CommentForm
-        class ModifyForm(CommentForm):
-            # XXX as the "saving" POSTs come from AnyWikiDraw (not the form), editing meta_text doesn't work
-            meta_text = String.using(optional=False).with_properties(placeholder=L_("MetaData (JSON)")).validated_by(ValidJSON())
-            data_file = FileStorage.using(optional=True, label=L_('Upload file:'))
-
-        if request.method == 'GET':
-            form = ModifyForm.from_defaults()
-            TextCha(form).amend_form()
-            # XXX currently this is rather pointless, as the form does not get POSTed:
-            form['meta_text'] = self.meta_dict_to_text(self.prepare_meta_for_modify(self.meta))
-        elif request.method == 'POST':
-            # this POST comes directly from AnyWikiDraw (not from Browser), thus no validation
-            try:
-                self.modify() # XXX
-            except AccessDenied:
-                abort(403)
-            else:
-                # AnyWikiDraw POSTs more than once, redirecting would break them
-                return "OK"
-        try:
-            drawing_exists = 'drawing.svg' in self.list_members()
-        except:
-            drawing_exists = False
-        return render_template(self.template,
-                               item_name=self.name,
-                               rows_meta=str(ROWS_META), cols=str(COLS),
-                               help=self.modify_help,
-                               drawing_exists=drawing_exists,
-                               form=form,
-                               search_form=None,
-                              )
-
     def _render_data(self):
         # TODO: this could be a converter -> dom, then transcluding this kind
         # of items and also rendering them with the code in base class could work
@@ -1483,19 +1438,19 @@
             # unxml, because 4.01 concrete will not validate />
             image_map = image_map.replace(u'/>', u'>')
             title = _('Clickable drawing: %(filename)s', filename=self.name)
-            return Markup(image_map + '<img src="{0}" alt="{1}" usemap="#{2}" />'.format(png_url, title, mapid))
+            return Markup(image_map + u'<img src="{0}" alt="{1}" usemap="#{2}" />'.format(png_url, title, mapid))
         else:
-            return Markup('<img src="{0}" alt="{1}" />'.format(png_url, title))
+            return Markup(u'<img src="{0}" alt="{1}" />'.format(png_url, title))
 
 item_registry.register(AnyWikiDraw._factory, Type('application/x-anywikidraw'))
 
 
-class SvgDraw(TarMixin, Image):
+class SvgDraw(Draw):
     """ drawings by svg-edit. It creates two files (svg, png) which are stored as tar file. """
     modify_help = ""
     template = "modify_svg-edit.html"
 
-    def modify(self):
+    def handle_post(self):
         # called from modify UI/POST
         png_upload = request.values.get('png_data')
         svg_upload = request.values.get('filepath')
@@ -1509,45 +1464,12 @@
         self.put_member("drawing.png", png_content, content_length,
                         expected_members=set(['drawing.svg', 'drawing.png']))
 
-    def do_modify(self, contenttype, template_name):
-        # XXX think about and add item template support
-        #if template_name is None and isinstance(self.rev, DummyRev):
-        #    return self._do_modify_show_templates()
-        from MoinMoin.apps.frontend.views import CommentForm
-        class ModifyForm(CommentForm):
-            # XXX as the "saving" POSTs come from SvgDraw (not the form), editing meta_text doesn't work
-            meta_text = String.using(optional=False).with_properties(placeholder=L_("MetaData (JSON)")).validated_by(ValidJSON())
-            data_file = FileStorage.using(optional=True, label=L_('Upload file:'))
-
-        if request.method == 'GET':
-            form = ModifyForm.from_defaults()
-            TextCha(form).amend_form()
-            # XXX currently this is rather pointless, as the form does not get POSTed:
-            form['meta_text'] = self.meta_dict_to_text(self.prepare_meta_for_modify(self.meta))
-        elif request.method == 'POST':
-            # this POST comes directly from SvgDraw (not from Browser), thus no validation
-            try:
-                self.modify() # XXX
-            except AccessDenied:
-                abort(403)
-            else:
-                # SvgDraw POSTs more than once, redirecting would break them
-                return "OK"
-        return render_template(self.template,
-                               item_name=self.name,
-                               rows_meta=str(ROWS_META), cols=str(COLS),
-                               help=self.modify_help,
-                               form=form,
-                               search_form=None,
-                              )
-
     def _render_data(self):
         # TODO: this could be a converter -> dom, then transcluding this kind
         # of items and also rendering them with the code in base class could work
         item_name = self.name
         drawing_url = url_for('frontend.get_item', item_name=item_name, member='drawing.svg', rev=self.rev.revid)
         png_url = url_for('frontend.get_item', item_name=item_name, member='drawing.png', rev=self.rev.revid)
-        return Markup('<img src="{0}" alt="{1}" />'.format(png_url, drawing_url))
+        return Markup(u'<img src="{0}" alt="{1}" />'.format(png_url, drawing_url))
 
 item_registry.register(SvgDraw._factory, Type('application/x-svgdraw'))
-
--- a/MoinMoin/items/_tests/test_Item.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/items/_tests/test_Item.py	Wed Jul 04 21:53:24 2012 +0400
@@ -274,7 +274,7 @@
         item = Item.create(name)
         item._save(meta, data, comment=comment)
         item = Item.create(name)
-        item.revert()
+        item.revert(u'revert')
         item = Item.create(name)
         assert item.meta['action'] == u'REVERT'
 
@@ -289,12 +289,16 @@
         item = Item.create(name)
         assert item.name == u'Test_Item'
         assert item.meta['test_key'] == 'test_value'
-        # call item.modify
-        item.modify()
+        # modify
+        another_data = 'another_test_data'
+        another_meta = {'another_test_key': 'another_test_value'}
+        item.modify(another_meta, another_data)
         item = Item.create(name)
         assert item.name == u'Test_Item'
         with pytest.raises(KeyError):
             item.meta['test_key']
+        assert item.meta['another_test_key'] == another_meta['another_test_key']
+        assert item.data == another_data
 
 
 class TestBinary(object):
@@ -519,4 +523,3 @@
         assert item2.data == ''
 
 coverage_modules = ['MoinMoin.items']
-
--- a/MoinMoin/log.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/log.py	Wed Jul 04 21:53:24 2012 +0400
@@ -154,4 +154,3 @@
         if isinstance(levelnumber, int): # that list has also the reverse mapping...
             setattr(logger, levelname, levelnumber)
     return logger
-
--- a/MoinMoin/macro/Anchor.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/Anchor.py	Wed Jul 04 21:53:24 2012 +0400
@@ -16,4 +16,3 @@
 
         anchor = arguments[0]
         return moin_page.span(attrib={moin_page.id: anchor})
-
--- a/MoinMoin/macro/Date.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/Date.py	Wed Jul 04 21:53:24 2012 +0400
@@ -65,4 +65,3 @@
             stamp = arguments[0]
             tm = self.parse_time(stamp)
         return format_date(datetime.utcfromtimestamp(tm))
-
--- a/MoinMoin/macro/DateTime.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/DateTime.py	Wed Jul 04 21:53:24 2012 +0400
@@ -22,4 +22,3 @@
             stamp = arguments[0]
             tm = self.parse_time(stamp)
         return format_datetime(datetime.utcfromtimestamp(tm))
-
--- a/MoinMoin/macro/GetText.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/GetText.py	Wed Jul 04 21:53:24 2012 +0400
@@ -21,4 +21,3 @@
         translation = ' '.join(arguments.positional)
         translation = _(translation)
         return translation
-
--- a/MoinMoin/macro/GetVal.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/GetVal.py	Wed Jul 04 21:53:24 2012 +0400
@@ -22,4 +22,3 @@
         d = flaskg.dicts[item_name]
         result = d.get(key, '')
         return result
-
--- a/MoinMoin/macro/MailTo.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/MailTo.py	Wed Jul 04 21:53:24 2012 +0400
@@ -38,4 +38,3 @@
             result = moin_page.code(children=[text, "<{0}>".format(email)])
 
         return result
-
--- a/MoinMoin/macro/PagenameList.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/PagenameList.py	Wed Jul 04 21:53:24 2012 +0400
@@ -39,4 +39,3 @@
         item_names.sort()
 
         return self.create_pagelink_list(item_names, ordered=False)
-
--- a/MoinMoin/macro/RandomItem.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/RandomItem.py	Wed Jul 04 21:53:24 2012 +0400
@@ -60,4 +60,3 @@
 
         del result[-1] # kill last comma
         return result
-
--- a/MoinMoin/macro/Verbatim.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/Verbatim.py	Wed Jul 04 21:53:24 2012 +0400
@@ -11,4 +11,3 @@
 class Macro(MacroInlineBase):
     def macro(self, text=u''):
         return text
-
--- a/MoinMoin/macro/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -16,4 +16,3 @@
 from MoinMoin.util import pysupport
 
 modules = pysupport.getPackageModules(__file__)
-
--- a/MoinMoin/macro/_base.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/_base.py	Wed Jul 04 21:53:24 2012 +0400
@@ -98,4 +98,3 @@
             item = moin_page.list_item(children=[item_label, item_body])
             def_list.append(item)
         return def_list
-
--- a/MoinMoin/macro/_tests/test_Anchor.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/_tests/test_Anchor.py	Wed Jul 04 21:53:24 2012 +0400
@@ -18,4 +18,3 @@
     test_anchor = result.attrib.values()
     # test_anchor[0] since it returns a list
     assert test_anchor[0] == arguments[0]
-
--- a/MoinMoin/macro/_tests/test_Date.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/_tests/test_Date.py	Wed Jul 04 21:53:24 2012 +0400
@@ -40,4 +40,3 @@
         result = macro_obj.macro('content', arguments, 'page_url', 'alternative')
         expected = u'Aug 7, 2011'
         assert result == expected
-
--- a/MoinMoin/macro/_tests/test_DateTime.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/_tests/test_DateTime.py	Wed Jul 04 21:53:24 2012 +0400
@@ -30,4 +30,3 @@
     arguments = ['incorrect_argument']
     with pytest.raises(ValueError):
         macro_obj.macro('content', arguments, 'page_url', 'alternative')
-
--- a/MoinMoin/macro/_tests/test_GetText.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/_tests/test_GetText.py	Wed Jul 04 21:53:24 2012 +0400
@@ -16,4 +16,3 @@
     result = macro_obj.macro('content', arguments, 'page_url', 'alternative')
     expected = u'test_argument1 test_argument2'
     assert result == expected
-
--- a/MoinMoin/macro/_tests/test_GetVal.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/_tests/test_GetVal.py	Wed Jul 04 21:53:24 2012 +0400
@@ -49,4 +49,3 @@
         arguments[1] = u'Two'
         result = macro_obj.macro('content', arguments, 'page_url', 'alternative')
         assert result == u'2'
-
--- a/MoinMoin/macro/_tests/test_Verbatim.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/_tests/test_Verbatim.py	Wed Jul 04 21:53:24 2012 +0400
@@ -11,4 +11,3 @@
     macro_obj = Macro()
     result = macro_obj.macro(u'test_text')
     assert result == u'test_text'
-
--- a/MoinMoin/macro/_tests/test__base.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/macro/_tests/test__base.py	Wed Jul 04 21:53:24 2012 +0400
@@ -56,4 +56,3 @@
         macroinlineonlybase_obj = Test_MacroInlineOnlyBase()
         result = macroinlineonlybase_obj.__call__('content', 'arguments', 'page_url', 'alternative', context_block=False)
         assert result == 'test_macro'
-
--- a/MoinMoin/mail/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/mail/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -6,5 +6,3 @@
 
     Subpackage containing e-mail support code.
 """
-
-
--- a/MoinMoin/mail/_tests/test_sendmail.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/mail/_tests/test_sendmail.py	Wed Jul 04 21:53:24 2012 +0400
@@ -128,4 +128,3 @@
         assert sendmail.encodeAddress(address, self.charset) == expected
 
 coverage_modules = ['MoinMoin.mail.sendmail']
-
--- a/MoinMoin/mail/sendmail.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/mail/sendmail.py	Wed Jul 04 21:53:24 2012 +0400
@@ -243,4 +243,3 @@
 
     # return concatenated parts
     return ''.join(email)
-
--- a/MoinMoin/script/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -59,4 +59,3 @@
 
 def fatal(msg):
     sys.exit(msg)
-
--- a/MoinMoin/script/account/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/account/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -4,4 +4,3 @@
 """
     MoinMoin - User Accounts Management Scripts
 """
-
--- a/MoinMoin/script/account/create.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/account/create.py	Wed Jul 04 21:53:24 2012 +0400
@@ -41,4 +41,3 @@
         else:
             u = user.User(auth_username=name)
             print " %-20s %-25s %-35s - created." % (u.itemid, u.name, u.email),
-
--- a/MoinMoin/script/account/disable.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/account/disable.py	Wed Jul 04 21:53:24 2012 +0400
@@ -51,4 +51,3 @@
             print "- disabled."
         else:
             print "- is already disabled."
-
--- a/MoinMoin/script/account/resetpw.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/account/resetpw.py	Wed Jul 04 21:53:24 2012 +0400
@@ -47,4 +47,3 @@
         u.enc_password = crypto.crypt_password(password)
         u.save()
         print 'Password set.'
-
--- a/MoinMoin/script/maint/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/maint/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -4,4 +4,3 @@
 """
     MoinMoin - Maintenance Script Package
 """
-
--- a/MoinMoin/script/maint/index.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/maint/index.py	Wed Jul 04 21:53:24 2012 +0400
@@ -106,4 +106,3 @@
                 for k, v in kvs:
                     print k, repr(v)[:70]
                 print
-
--- a/MoinMoin/script/maint/modified_systemitems.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/maint/modified_systemitems.py	Wed Jul 04 21:53:24 2012 +0400
@@ -40,4 +40,3 @@
                 print item_name
         else:
             print "Not any modified system items found!"
-
--- a/MoinMoin/script/maint/modify_item.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/maint/modify_item.py	Wed Jul 04 21:53:24 2012 +0400
@@ -72,4 +72,3 @@
         item = app.storage[name]
         with open(data_file, 'rb') as df:
             item.store_revision(meta, df, overwrite=overwrite)
-
--- a/MoinMoin/script/maint/moinshell.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/maint/moinshell.py	Wed Jul 04 21:53:24 2012 +0400
@@ -78,4 +78,3 @@
                 pass
 
         code.interact(self.banner, local=context)
-
--- a/MoinMoin/script/maint/reduce_revisions.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/maint/reduce_revisions.py	Wed Jul 04 21:53:24 2012 +0400
@@ -42,4 +42,3 @@
                     rev.destroy()
 
         print "Finished reducing backend."
-
--- a/MoinMoin/script/maint/serialization.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/maint/serialization.py	Wed Jul 04 21:53:24 2012 +0400
@@ -60,4 +60,3 @@
     def run(self, filename=None):
         with open_file(filename, "rb") as f:
             deserialize(f, app.storage.backend)
-
--- a/MoinMoin/script/maint/set_meta.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/maint/set_meta.py	Wed Jul 04 21:53:24 2012 +0400
@@ -76,4 +76,3 @@
                 print "Processing {0!r}, removing {1}.".format(item_name, key)
 
             item.commit()
-
--- a/MoinMoin/script/migration/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/migration/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -4,4 +4,3 @@
 """
 MoinMoin - migration scripts
 """
-
--- a/MoinMoin/script/migration/moin19/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/migration/moin19/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -4,4 +4,3 @@
 """
 MoinMoin - migration (upgrading) code for upgrades 1.9 -> 2.0
 """
-
--- a/MoinMoin/script/migration/moin19/_logfile19.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/migration/moin19/_logfile19.py	Wed Jul 04 21:53:24 2012 +0400
@@ -454,4 +454,3 @@
             self._output.write(line)
             self._output.close() # does this maybe help against the sporadic fedora wikis 160 \0 bytes in the edit-log?
             del self._output # re-open the output file automagically
-
--- a/MoinMoin/script/migration/moin19/_utils19.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/migration/moin19/_utils19.py	Wed Jul 04 21:53:24 2012 +0400
@@ -161,4 +161,3 @@
         wikiname = ''.join(parts)
 
     return wikiname.decode(charset)
-
--- a/MoinMoin/script/migration/moin19/import19.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/script/migration/moin19/import19.py	Wed Jul 04 21:53:24 2012 +0400
@@ -609,4 +609,3 @@
     else:
         raise ValueError("unsupported content object: {0!r}".format(content))
     return size, HASH_ALGORITHM, unicode(hash.hexdigest())
-
--- a/MoinMoin/search/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/search/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -29,4 +29,3 @@
     submit = String.using(default=L_('Search'), optional=True)
 
     validators = [ValidSearch()]
-
--- a/MoinMoin/search/_tests/test_analyzers.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/search/_tests/test_analyzers.py	Wed Jul 04 21:53:24 2012 +0400
@@ -168,4 +168,3 @@
         for value, expected_tokens in self.test_cases_index:
             tokens = [token.text for token in tokenizer(value, mode="index")]
             assert set(expected_tokens) == set(tokens)
-
--- a/MoinMoin/search/analyzers.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/search/analyzers.py	Wed Jul 04 21:53:24 2012 +0400
@@ -134,4 +134,3 @@
                      )
     analyzer = RegexTokenizer(r"\S+") | iwf | LowercaseFilter()
     return analyzer
-
--- a/MoinMoin/security/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/security/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -356,4 +356,3 @@
             rights = [r for r in rights.split(',') if r in self.rights]
 
         return modifier, entries, rights
-
--- a/MoinMoin/security/_tests/test_security.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/security/_tests/test_security.py	Wed Jul 04 21:53:24 2012 +0400
@@ -412,4 +412,3 @@
 
 
 coverage_modules = ['MoinMoin.security']
-
--- a/MoinMoin/security/_tests/test_textcha.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/security/_tests/test_textcha.py	Wed Jul 04 21:53:24 2012 +0400
@@ -115,4 +115,3 @@
         test_element.parent = test_form
         result = textchavalid_obj.validate(test_element, 'test_state')
         assert result
-
--- a/MoinMoin/security/_tests/test_ticket.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/security/_tests/test_ticket.py	Wed Jul 04 21:53:24 2012 +0400
@@ -27,4 +27,3 @@
 
 
 coverage_modules = ['MoinMoin.security.ticket']
-
--- a/MoinMoin/security/textcha.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/security/textcha.py	Wed Jul 04 21:53:24 2012 +0400
@@ -176,4 +176,3 @@
     """a form providing TextCha support"""
     textcha_question = String
     textcha = String.using(label=L_('TextCha')).validated_by(TextChaValid())
-
--- a/MoinMoin/security/ticket.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/security/ticket.py	Wed Jul 04 21:53:24 2012 +0400
@@ -64,4 +64,3 @@
     ourticket = createTicket(timestamp_str, **kw)
     logging.debug("checkTicket: returning {0!r}, got {1!r}, expected {2!r}".format(ticket == ourticket, ticket, ourticket))
     return ticket == ourticket
-
--- a/MoinMoin/signalling/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/signalling/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -14,4 +14,3 @@
 
 # import all signal handler modules so they install their handlers:
 from . import log
-
--- a/MoinMoin/signalling/log.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/signalling/log.py	Wed Jul 04 21:53:24 2012 +0400
@@ -21,4 +21,3 @@
 def log_item_modified(app, item_name):
     wiki_name = app.cfg.interwikiname
     logging.info("item {0}:{1} modified".format(wiki_name, item_name))
-
--- a/MoinMoin/signalling/signals.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/signalling/signals.py	Wed Jul 04 21:53:24 2012 +0400
@@ -14,4 +14,3 @@
 
 item_displayed = _signals.signal('item_displayed')
 item_modified = _signals.signal('item_modified')
-
--- a/MoinMoin/static/js/common.js	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/static/js/common.js	Wed Jul 04 21:53:24 2012 +0400
@@ -488,4 +488,3 @@
     $('#moin-usersettings form').submit(submitHandler);
 }
 $(document).ready(initMoinUsersettings);
-
--- a/MoinMoin/static/js/index_action.js	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/static/js/index_action.js	Wed Jul 04 21:53:24 2012 +0400
@@ -247,4 +247,3 @@
     $('#moin-download-trigger').multiDownload('click', { delay: 3000 });
 
 });
-
--- a/MoinMoin/static/js/jfu.js	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/static/js/jfu.js	Wed Jul 04 21:53:24 2012 +0400
@@ -296,4 +296,3 @@
     // Initialize jQuery File Upload (Extended User Interface Version):
     $('#file_upload').fileUploadUIX();
 });
-
--- a/MoinMoin/storage/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -88,4 +88,3 @@
         '': content_acl,
     }
     return create_mapping(uri, mounts, acls)
-
--- a/MoinMoin/storage/backends/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/backends/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -77,4 +77,3 @@
         """
         delete meta, data related to metaid from the backend
         """
-
--- a/MoinMoin/storage/backends/_tests/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/backends/_tests/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -127,4 +127,3 @@
             m = tuple(sorted(m.items()))
             result.add((k, m, d.read()))
         assert result == expected_result
-
--- a/MoinMoin/storage/backends/_tests/test_fileserver.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/backends/_tests/test_fileserver.py	Wed Jul 04 21:53:24 2012 +0400
@@ -114,4 +114,3 @@
             data = data.read()
             result.add((meta, data))
         assert result == expected_result
-
--- a/MoinMoin/storage/backends/_tests/test_stores.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/backends/_tests/test_stores.py	Wed Jul 04 21:53:24 2012 +0400
@@ -44,5 +44,3 @@
         self.be = MutableBackend(meta_store, data_store)
         self.be.create()
         self.be.open()
-
-
--- a/MoinMoin/storage/backends/_util.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/backends/_util.py	Wed Jul 04 21:53:24 2012 +0400
@@ -50,4 +50,3 @@
         if not self._finished:
             raise AttributeError("do not access hash attribute before having read all data")
         return self._hash
-
--- a/MoinMoin/storage/backends/fileserver.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/backends/fileserver.py	Wed Jul 04 21:53:24 2012 +0400
@@ -180,4 +180,3 @@
         meta = self._get_meta(itemname, path)
         data = self._get_data(itemname, path)
         return meta, data
-
--- a/MoinMoin/storage/backends/stores.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/backends/stores.py	Wed Jul 04 21:53:24 2012 +0400
@@ -169,4 +169,3 @@
         dataid = meta[DATAID]
         self._del_meta(metaid)
         self._del_data(dataid)
-
--- a/MoinMoin/storage/error.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/error.py	Wed Jul 04 21:53:24 2012 +0400
@@ -40,4 +40,3 @@
     """
     Raised if the Revision you are trying to create already exists.
     """
-
--- a/MoinMoin/storage/middleware/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/middleware/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -6,4 +6,3 @@
 
 Middleware sits either on a backend or on another middleware.
 """
-
--- a/MoinMoin/storage/middleware/_tests/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/middleware/_tests/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -4,4 +4,3 @@
 """
 MoinMoin - middleware tests
 """
-
--- a/MoinMoin/storage/middleware/_tests/test_indexing.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/middleware/_tests/test_indexing.py	Wed Jul 04 21:53:24 2012 +0400
@@ -417,4 +417,3 @@
             #print r.meta
             #print r.data.read()
             pass
-
--- a/MoinMoin/storage/middleware/_tests/test_protecting.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/middleware/_tests/test_protecting.py	Wed Jul 04 21:53:24 2012 +0400
@@ -121,6 +121,3 @@
         item = self.imw[PROTECTED]
         with pytest.raises(AccessDenied):
             item.destroy_all_revisions()
-
-
-
--- a/MoinMoin/storage/middleware/_tests/test_routing.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/middleware/_tests/test_routing.py	Wed Jul 04 21:53:24 2012 +0400
@@ -97,4 +97,3 @@
     sub_revid = router.store(dict(name=u'sub/bar'), StringIO(''))
     existing_now = set([revid for mountpoint, revid in router])
     assert existing_now == set([root_revid, sub_revid]) | existing_before
-
--- a/MoinMoin/storage/middleware/_tests/test_serialization.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/middleware/_tests/test_serialization.py	Wed Jul 04 21:53:24 2012 +0400
@@ -83,4 +83,3 @@
     print sorted(source.backend)
     print sorted(target.backend)
     assert sorted(source.backend) == sorted(target.backend)
-
--- a/MoinMoin/storage/middleware/_tests/test_validation.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/middleware/_tests/test_validation.py	Wed Jul 04 21:53:24 2012 +0400
@@ -84,4 +84,3 @@
                 print e.valid, e
             print m.valid, m
         assert valid
-
--- a/MoinMoin/storage/middleware/indexing.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/middleware/indexing.py	Wed Jul 04 21:53:24 2012 +0400
@@ -1003,4 +1003,3 @@
 
     def __repr__(self):
         return "Meta _doc: {0!r} _meta: {1!r}".format(self._doc, self._meta)
-
--- a/MoinMoin/storage/middleware/protecting.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/middleware/protecting.py	Wed Jul 04 21:53:24 2012 +0400
@@ -280,4 +280,3 @@
 
     def __cmp__(self, other):
         return cmp(self.meta, other.meta)
-
--- a/MoinMoin/storage/middleware/routing.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/middleware/routing.py	Wed Jul 04 21:53:24 2012 +0400
@@ -114,4 +114,3 @@
         if not isinstance(backend, MutableBackendBase):
             raise TypeError('backend {0!r} mounted at {1!r} is readonly'.format(backend, mountpoint))
         backend.remove(revid)
-
--- a/MoinMoin/storage/middleware/serialization.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/middleware/serialization.py	Wed Jul 04 21:53:24 2012 +0400
@@ -71,4 +71,3 @@
             assert limited._pos == 0
             # but we must seek to get forward to the next item:
             src.seek(curr_pos + data_size)
-
--- a/MoinMoin/storage/middleware/validation.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/middleware/validation.py	Wed Jul 04 21:53:24 2012 +0400
@@ -356,5 +356,3 @@
     #TODO: DuckDict.named('bookmarks').using(optional=True),
     *common_meta
 )
-
-
--- a/MoinMoin/storage/stores/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -124,4 +124,3 @@
               closing that file later. caller must not rely on some specific
               file pointer position after we return.
         """
-
--- a/MoinMoin/storage/stores/_tests/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/_tests/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -12,4 +12,3 @@
 
 class BytesStoreTestBase(object):
     pass
-
--- a/MoinMoin/storage/stores/_tests/conftest.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/_tests/conftest.py	Wed Jul 04 21:53:24 2012 +0400
@@ -97,4 +97,3 @@
     if kind == 'FileStore':
         store = ByteToStreamWrappingStore(store)
     return store
-
--- a/MoinMoin/storage/stores/_tests/test_all.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/_tests/test_all.py	Wed Jul 04 21:53:24 2012 +0400
@@ -64,4 +64,3 @@
     for i in range(1000):
         key = str(i)
         del store[key]
-
--- a/MoinMoin/storage/stores/_tests/test_fs.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/_tests/test_fs.py	Wed Jul 04 21:53:24 2012 +0400
@@ -39,4 +39,3 @@
 def test_from_uri(tmpdir, Store):
     store = Store.from_uri("%s" % tmpdir)
     assert store.path == tmpdir
-
--- a/MoinMoin/storage/stores/_tests/test_kc.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/_tests/test_kc.py	Wed Jul 04 21:53:24 2012 +0400
@@ -34,5 +34,3 @@
     target = tmpdir.join('store.kch')
     store.destroy()
     assert not target.check()
-
-
--- a/MoinMoin/storage/stores/_tests/test_kt.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/_tests/test_kt.py	Wed Jul 04 21:53:24 2012 +0400
@@ -44,4 +44,3 @@
     store = Store.from_uri("localhost:1970")
     assert store.host == 'localhost'
     assert store.port == 1970
-
--- a/MoinMoin/storage/stores/_tests/test_memory.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/_tests/test_memory.py	Wed Jul 04 21:53:24 2012 +0400
@@ -33,4 +33,3 @@
 def test_from_uri(Store):
     store = Store.from_uri("mem://")
     assert isinstance(store, Store)
-
--- a/MoinMoin/storage/stores/_tests/test_sqla.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/_tests/test_sqla.py	Wed Jul 04 21:53:24 2012 +0400
@@ -33,4 +33,3 @@
     store = Store.from_uri("sqlite://%s::test_base" % tmpdir)
     assert store.db_uri == "sqlite://%s" % tmpdir
     assert store.table_name == "test_base"
-
--- a/MoinMoin/storage/stores/_tests/test_sqlite.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/_tests/test_sqlite.py	Wed Jul 04 21:53:24 2012 +0400
@@ -57,4 +57,3 @@
     assert store.db_name == tmpdir
     assert store.table_name == 'test_table'
     assert store.compression_level == 2
-
--- a/MoinMoin/storage/stores/fs.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/fs.py	Wed Jul 04 21:53:24 2012 +0400
@@ -83,4 +83,3 @@
         with open(self._mkpath(key), "wb") as f:
             blocksize = 64 * 1024
             shutil.copyfileobj(stream, f, blocksize)
-
--- a/MoinMoin/storage/stores/kc.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/kc.py	Wed Jul 04 21:53:24 2012 +0400
@@ -105,4 +105,3 @@
     def __setitem__(self, key, stream):
         if not self._db.set(key, stream.read()):
             raise KeyError("set error: " + str(self._db.error()))
-
--- a/MoinMoin/storage/stores/kt.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/kt.py	Wed Jul 04 21:53:24 2012 +0400
@@ -159,4 +159,3 @@
         response = self.client.getresponse()
         body = response.read()
         return response.status == 201
-
--- a/MoinMoin/storage/stores/memory.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/memory.py	Wed Jul 04 21:53:24 2012 +0400
@@ -63,4 +63,3 @@
 
     def __setitem__(self, key, stream):
         self._st[key] = stream.read()
-
--- a/MoinMoin/storage/stores/sqla.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/sqla.py	Wed Jul 04 21:53:24 2012 +0400
@@ -112,4 +112,3 @@
 
     def __setitem__(self, key, stream):
         self.table.insert().execute(key=key, value=stream.read())
-
--- a/MoinMoin/storage/stores/sqlite.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/sqlite.py	Wed Jul 04 21:53:24 2012 +0400
@@ -126,4 +126,3 @@
         value = self._compress(value)
         with self.conn:
             self.conn.execute('insert into {0} values (?, ?)'.format(self.table_name), (key, buffer(value)))
-
--- a/MoinMoin/storage/stores/wrappers.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/storage/stores/wrappers.py	Wed Jul 04 21:53:24 2012 +0400
@@ -35,4 +35,3 @@
 
     def __len__(self):
         return len(self._st)
-
--- a/MoinMoin/templates/404.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/404.html	Wed Jul 04 21:53:24 2012 +0400
@@ -7,8 +7,3 @@
 </p>
 
 {% endblock %}
-
-
-
-
-
--- a/MoinMoin/templates/atom.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/atom.html	Wed Jul 04 21:53:24 2012 +0400
@@ -59,4 +59,3 @@
     </table>
     {{ atom_style() }}
 {%- endif -%}
-
--- a/MoinMoin/templates/base.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/base.html	Wed Jul 04 21:53:24 2012 +0400
@@ -70,4 +70,3 @@
 
 </body>
 </html>
-
--- a/MoinMoin/templates/content.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/content.html	Wed Jul 04 21:53:24 2012 +0400
@@ -6,4 +6,3 @@
     <div>
 {% endif %}
 {% endblock %}
-
--- a/MoinMoin/templates/delete.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/delete.html	Wed Jul 04 21:53:24 2012 +0400
@@ -16,6 +16,3 @@
 {{ gen.form.close() }}
 </div>
 {% endblock %}
-
-
-
--- a/MoinMoin/templates/destroy.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/destroy.html	Wed Jul 04 21:53:24 2012 +0400
@@ -30,8 +30,3 @@
     </div>
 {% endif %}
 {% endblock %}
-
-
-
-
-
--- a/MoinMoin/templates/diff.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/diff.html	Wed Jul 04 21:53:24 2012 +0400
@@ -6,4 +6,3 @@
 {% endblock %}
 {{ diff_html }}
 {% endblock %}
-
--- a/MoinMoin/templates/diff_text.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/diff_text.html	Wed Jul 04 21:53:24 2012 +0400
@@ -45,4 +45,3 @@
         </tr>
     {% endfor %}
 </table>
-
--- a/MoinMoin/templates/diff_text_atom.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/diff_text_atom.html	Wed Jul 04 21:53:24 2012 +0400
@@ -40,4 +40,3 @@
     .moin-diff-added span { background-color: #80FF80; }
     .moin-diff-removed span { background-color: #FFFF80; }
 </style>
-
--- a/MoinMoin/templates/error.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/error.html	Wed Jul 04 21:53:24 2012 +0400
@@ -3,4 +3,3 @@
 <h1>{{ title }}</h1>
 <p>{{ description }}</p>
 {% endblock %}
-
--- a/MoinMoin/templates/forms.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/forms.html	Wed Jul 04 21:53:24 2012 +0400
@@ -119,4 +119,3 @@
     <script src="{{ url_for('serve.files', name='jquery_file_upload', filename='jquery.fileupload.js') }}"></script>
     <script src="{{ url_for('serve.files', name='jquery_file_upload', filename='jquery.fileupload-ui.js') }}"></script>
 {% endmacro %}
-
--- a/MoinMoin/templates/global_history.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/global_history.html	Wed Jul 04 21:53:24 2012 +0400
@@ -53,4 +53,3 @@
         {% endif %}
     </div>
 {% endblock %}
-
--- a/MoinMoin/templates/global_tags.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/global_tags.html	Wed Jul 04 21:53:24 2012 +0400
@@ -11,4 +11,3 @@
 </ul>
 {% endif %}
 {% endblock %}
-
--- a/MoinMoin/templates/highlight.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/highlight.html	Wed Jul 04 21:53:24 2012 +0400
@@ -8,4 +8,3 @@
 {% endblock %}
 {{ data_text }}
 {% endblock %}
-
--- a/MoinMoin/templates/history.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/history.html	Wed Jul 04 21:53:24 2012 +0400
@@ -75,4 +75,3 @@
         </form>
     {% endif %}
 {% endblock %}
-
--- a/MoinMoin/templates/index.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/index.html	Wed Jul 04 21:53:24 2012 +0400
@@ -179,4 +179,3 @@
     <script src="{{ url_for('static', filename='js/jfu.js') }}"></script>
     <div id="lightbox">&nbsp;</div>
 {% endblock %}
-
--- a/MoinMoin/templates/item_link_list.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/item_link_list.html	Wed Jul 04 21:53:24 2012 +0400
@@ -12,4 +12,3 @@
 </ul>
 {% endif %}
 {% endblock %}
-
--- a/MoinMoin/templates/itemviews.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/itemviews.html	Wed Jul 04 21:53:24 2012 +0400
@@ -94,4 +94,3 @@
         {%- endif %}
     {%- endfor %}
 </ul>
-
--- a/MoinMoin/templates/layout.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/layout.html	Wed Jul 04 21:53:24 2012 +0400
@@ -175,4 +175,3 @@
 {{ after_footer }}
 
 {% endblock %}
-
--- a/MoinMoin/templates/login.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/login.html	Wed Jul 04 21:53:24 2012 +0400
@@ -37,4 +37,3 @@
 
 </div>
 {% endblock %}
-
--- a/MoinMoin/templates/lookup.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/lookup.html	Wed Jul 04 21:53:24 2012 +0400
@@ -48,4 +48,3 @@
     {% endif %}
     {% endif %}
 {% endblock %}
-
--- a/MoinMoin/templates/lostpass.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/lostpass.html	Wed Jul 04 21:53:24 2012 +0400
@@ -15,4 +15,3 @@
 {{ gen.form.close() }}
 </div>
 {% endblock %}
-
--- a/MoinMoin/templates/meta.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/meta.html	Wed Jul 04 21:53:24 2012 +0400
@@ -20,5 +20,3 @@
 </div>
 {% endif %}
 {% endblock %}
-
-
--- a/MoinMoin/templates/modify_anywikidraw.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/modify_anywikidraw.html	Wed Jul 04 21:53:24 2012 +0400
@@ -20,4 +20,3 @@
 </p>
 <br />
 {% endblock %}
-
--- a/MoinMoin/templates/modify_applet.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/modify_applet.html	Wed Jul 04 21:53:24 2012 +0400
@@ -20,4 +20,3 @@
     {{ gen.form.close() }}
 </div>
 {% endblock %}
-
--- a/MoinMoin/templates/modify_binary.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/modify_binary.html	Wed Jul 04 21:53:24 2012 +0400
@@ -7,4 +7,3 @@
     {{ forms.render_field(gen, form['comment'], 'text') }}
 </dl>
 {% endblock %}
-
--- a/MoinMoin/templates/modify_show_template_selection.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/modify_show_template_selection.html	Wed Jul 04 21:53:24 2012 +0400
@@ -14,4 +14,3 @@
     {% endfor %}
 </ul>
 {% endblock %}
-
--- a/MoinMoin/templates/modify_show_type_selection.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/modify_show_type_selection.html	Wed Jul 04 21:53:24 2012 +0400
@@ -19,4 +19,3 @@
     {% endfor %}
 </table>
 {% endblock %}
-
--- a/MoinMoin/templates/modify_svg-edit.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/modify_svg-edit.html	Wed Jul 04 21:53:24 2012 +0400
@@ -6,4 +6,3 @@
 </p>
 <br />
 {% endblock %}
-
--- a/MoinMoin/templates/modify_text.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/modify_text.html	Wed Jul 04 21:53:24 2012 +0400
@@ -21,4 +21,3 @@
 {% endif %}
 <br />
 {% endblock %}
-
--- a/MoinMoin/templates/modify_text_html.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/modify_text_html.html	Wed Jul 04 21:53:24 2012 +0400
@@ -11,4 +11,3 @@
 {{ gen.textarea(form['data_text'], class='ckeditor', lang=lang, dir=direction, rows=rows_data, cols=cols) }}
 </p>
 {% endblock %}
-
--- a/MoinMoin/templates/modify_twikidraw.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/modify_twikidraw.html	Wed Jul 04 21:53:24 2012 +0400
@@ -15,4 +15,3 @@
 </p>
 <br />
 {% endblock %}
-
--- a/MoinMoin/templates/openid_register.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/openid_register.html	Wed Jul 04 21:53:24 2012 +0400
@@ -22,4 +22,3 @@
 {{ gen.form.close() }}
 </div>
 {% endblock %}
-
--- a/MoinMoin/templates/recoverpass.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/recoverpass.html	Wed Jul 04 21:53:24 2012 +0400
@@ -14,4 +14,3 @@
   {{ gen.input(form['submit'], type='submit') }}
 {{ gen.form.close() }}
 {% endblock %}
-
--- a/MoinMoin/templates/register.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/register.html	Wed Jul 04 21:53:24 2012 +0400
@@ -18,4 +18,3 @@
 {{ gen.form.close() }}
 </div>
 {% endblock %}
-
--- a/MoinMoin/templates/rename.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/rename.html	Wed Jul 04 21:53:24 2012 +0400
@@ -17,4 +17,3 @@
 {{ gen.form.close() }}
 </div>
 {% endblock %}
-
--- a/MoinMoin/templates/revert.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/revert.html	Wed Jul 04 21:53:24 2012 +0400
@@ -13,4 +13,3 @@
 {{ gen.form.close() }}
 </div>
 {% endblock %}
-
--- a/MoinMoin/templates/search.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/search.html	Wed Jul 04 21:53:24 2012 +0400
@@ -73,4 +73,3 @@
         {% endif %}
     {% endif %}
 {% endblock %}
-
--- a/MoinMoin/templates/show.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/show.html	Wed Jul 04 21:53:24 2012 +0400
@@ -93,4 +93,3 @@
     <br id="moin-show-comments" />
 {%- endif %}
 {% endblock %}
-
--- a/MoinMoin/templates/sitemap.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/sitemap.html	Wed Jul 04 21:53:24 2012 +0400
@@ -16,4 +16,3 @@
     {% endif %}
 {% endfor %}
 {% endblock %}
-
--- a/MoinMoin/templates/snippets.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/snippets.html	Wed Jul 04 21:53:24 2012 +0400
@@ -70,4 +70,3 @@
 {# Additional Javascript #}
 {% macro scripts() -%}
 {%- endmacro %}
-
--- a/MoinMoin/templates/usersettings.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/usersettings.html	Wed Jul 04 21:53:24 2012 +0400
@@ -37,4 +37,3 @@
 </div>
 
 {% endblock %}
-
--- a/MoinMoin/templates/usersettings_ajax.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/usersettings_ajax.html	Wed Jul 04 21:53:24 2012 +0400
@@ -13,4 +13,3 @@
 {% elif part == 'options' %}
     {{ user_forms.options(form) }}
 {% endif %}
-
--- a/MoinMoin/templates/usersettings_forms.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/usersettings_forms.html	Wed Jul 04 21:53:24 2012 +0400
@@ -81,4 +81,3 @@
 {{ forms.render_button(_("Save")) }}
 {{ gen.form.close() }}
 {% endmacro %}
-
--- a/MoinMoin/templates/utils.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/templates/utils.html	Wed Jul 04 21:53:24 2012 +0400
@@ -82,4 +82,3 @@
         </div>
     {% endif %}
 {% endmacro %}
-
--- a/MoinMoin/themes/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -433,4 +433,3 @@
                             'gen': make_generator(),
                             'search_form': SearchForm.from_defaults(),
                             })
-
--- a/MoinMoin/themes/_tests/test_navi_bar.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/_tests/test_navi_bar.py	Wed Jul 04 21:53:24 2012 +0400
@@ -65,4 +65,3 @@
     test_result = themes.contenttype_to_class(u'MoinMoin/some/value')
     expected = u'moin-mime-MoinMoin'
     assert test_result == expected
-
--- a/MoinMoin/themes/foobar/static/css/common.css	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/static/css/common.css	Wed Jul 04 21:53:24 2012 +0400
@@ -237,4 +237,3 @@
 .moin-small{font-size:.83em}
 @media print{#moin-global-tray,#moin-local-panel,#moin-footer,#moin-search{display:none}
 }
-
--- a/MoinMoin/themes/foobar/static/css/msie.css	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/static/css/msie.css	Wed Jul 04 21:53:24 2012 +0400
@@ -1,2 +1,1 @@
 /* for now, don't add special workarounds for Internet Explorer */
-
--- a/MoinMoin/themes/foobar/static/css/stylus/pygments_default.css	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/static/css/stylus/pygments_default.css	Wed Jul 04 21:53:24 2012 +0400
@@ -59,4 +59,3 @@
 .vg { color: #19177C } /* Name.Variable.Global */
 .vi { color: #19177C } /* Name.Variable.Instance */
 .il { color: #666666 } /* Literal.Number.Integer.Long */
-
--- a/MoinMoin/themes/foobar/static/css/stylus/reset.css	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/static/css/stylus/reset.css	Wed Jul 04 21:53:24 2012 +0400
@@ -30,4 +30,3 @@
 hr { display: block; height: 1px; border: 0; border-top: 1px solid #cccccc; margin: 1em 0; padding: 0; }
 input, select { vertical-align: middle; }
 /* end HTML5 reset */
-
--- a/MoinMoin/themes/foobar/static/css/stylus/smileys.css	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/static/css/stylus/smileys.css	Wed Jul 04 21:53:24 2012 +0400
@@ -25,4 +25,3 @@
 .moin-thumbs-up:before { content: url('../img/smileys/thumbs-up.png'); }
 .moin-tired:before { content: url('../img/smileys/tired.png'); }
 .moin-tongue:before { content: url('../img/smileys/tongue.png'); }
-
--- a/MoinMoin/themes/foobar/static/css/stylus/stylus_notice.css	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/static/css/stylus/stylus_notice.css	Wed Jul 04 21:53:24 2012 +0400
@@ -6,5 +6,3 @@
  *
  * stylus --include-css --compress < main.styl > ../common.css
  */
-
-
--- a/MoinMoin/themes/foobar/static/css/stylus/userstyles.css	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/static/css/stylus/userstyles.css	Wed Jul 04 21:53:24 2012 +0400
@@ -12,4 +12,3 @@
 .center { text-align: center; }
 .right { text-align: right; }
 .justify { text-align: justify; }
-
--- a/MoinMoin/themes/foobar/templates/delete.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/delete.html	Wed Jul 04 21:53:24 2012 +0400
@@ -13,6 +13,3 @@
 {{ gen.form.close() }}
 </div>
 {% endblock %}
-
-
-
--- a/MoinMoin/themes/foobar/templates/destroy.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/destroy.html	Wed Jul 04 21:53:24 2012 +0400
@@ -27,8 +27,3 @@
     </div>
 {% endif %}
 {% endblock %}
-
-
-
-
-
--- a/MoinMoin/themes/foobar/templates/global.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/global.html	Wed Jul 04 21:53:24 2012 +0400
@@ -8,4 +8,3 @@
     {% endblock %}
 </div>
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/global_history.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/global_history.html	Wed Jul 04 21:53:24 2012 +0400
@@ -53,4 +53,3 @@
         {% endif %}
     </div>
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/global_tags.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/global_tags.html	Wed Jul 04 21:53:24 2012 +0400
@@ -11,4 +11,3 @@
 </ul>
 {% endif %}
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/history.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/history.html	Wed Jul 04 21:53:24 2012 +0400
@@ -72,4 +72,3 @@
         </form>
     {% endif %}
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/index.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/index.html	Wed Jul 04 21:53:24 2012 +0400
@@ -172,4 +172,3 @@
     <script src="{{ url_for('static', filename='js/jfu.js') }}"></script>
     <div id="lightbox">&nbsp;</div>
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/item_link_list.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/item_link_list.html	Wed Jul 04 21:53:24 2012 +0400
@@ -12,4 +12,3 @@
 </ul>
 {% endif %}
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/itemviews.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/itemviews.html	Wed Jul 04 21:53:24 2012 +0400
@@ -88,4 +88,3 @@
         {%- endif %}
     {%- endfor %}
 </ul>
-
--- a/MoinMoin/themes/foobar/templates/layout.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/layout.html	Wed Jul 04 21:53:24 2012 +0400
@@ -167,4 +167,3 @@
 </div>
 
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/local.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/local.html	Wed Jul 04 21:53:24 2012 +0400
@@ -130,4 +130,3 @@
 </ul>
 </div>
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/login.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/login.html	Wed Jul 04 21:53:24 2012 +0400
@@ -39,4 +39,3 @@
 
 </div>
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/lostpass.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/lostpass.html	Wed Jul 04 21:53:24 2012 +0400
@@ -15,4 +15,3 @@
 {{ gen.form.close() }}
 </div>
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/meta.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/meta.html	Wed Jul 04 21:53:24 2012 +0400
@@ -7,4 +7,3 @@
 </div>
 {% endif %}
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/modify_applet.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/modify_applet.html	Wed Jul 04 21:53:24 2012 +0400
@@ -15,4 +15,3 @@
 {{ gen.form.close() }}
 </div>
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/modify_binary.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/modify_binary.html	Wed Jul 04 21:53:24 2012 +0400
@@ -5,4 +5,3 @@
 {{ forms.render_textcha(gen, form) }}
 {{ forms.render_field(gen, form['comment'], 'text') }}
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/modify_show_template_selection.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/modify_show_template_selection.html	Wed Jul 04 21:53:24 2012 +0400
@@ -14,4 +14,3 @@
     {% endfor %}
 </ul>
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/modify_show_type_selection.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/modify_show_type_selection.html	Wed Jul 04 21:53:24 2012 +0400
@@ -19,4 +19,3 @@
     {% endfor %}
 </table>
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/modify_text.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/modify_text.html	Wed Jul 04 21:53:24 2012 +0400
@@ -17,4 +17,3 @@
 {{ gen.textarea(form['data_text'], lang=lang, dir=direction, rows=rows_data, cols=cols) }}
 <br />
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/modify_text_html.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/modify_text_html.html	Wed Jul 04 21:53:24 2012 +0400
@@ -11,4 +11,3 @@
 {{ gen.textarea(form['data_text'], class='ckeditor', lang=lang, dir=direction, rows=rows_data, cols=cols) }}
 </p>
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/recoverpass.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/recoverpass.html	Wed Jul 04 21:53:24 2012 +0400
@@ -14,4 +14,3 @@
   {{ gen.input(form['submit'], type='submit') }}
 {{ gen.form.close() }}
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/register.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/register.html	Wed Jul 04 21:53:24 2012 +0400
@@ -18,4 +18,3 @@
 {{ gen.form.close() }}
 </div>
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/rename.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/rename.html	Wed Jul 04 21:53:24 2012 +0400
@@ -14,4 +14,3 @@
 {{ gen.form.close() }}
 </div>
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/show.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/show.html	Wed Jul 04 21:53:24 2012 +0400
@@ -27,4 +27,3 @@
     <br id="moin-show-comments" />
 {%- endif %}
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/sitemap.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/sitemap.html	Wed Jul 04 21:53:24 2012 +0400
@@ -13,4 +13,3 @@
     {% endif %}
 {% endfor %}
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/snippets.html	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/foobar/templates/snippets.html	Wed Jul 04 21:53:24 2012 +0400
@@ -50,4 +50,3 @@
 {# Additional Javascript #}
 {% macro scripts() -%}
 {%- endmacro %}
-
--- a/MoinMoin/themes/modernized/static/css/common.css	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/modernized/static/css/common.css	Wed Jul 04 21:53:24 2012 +0400
@@ -703,4 +703,3 @@
 #moin-pagelocation, #moin-pageinfo  { display: none; }
 
 }   /* end of @media projection */
-
--- a/MoinMoin/themes/modernized/static/css/msie.css	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/themes/modernized/static/css/msie.css	Wed Jul 04 21:53:24 2012 +0400
@@ -42,4 +42,3 @@
 
 /*  avoid a gap between navibar and pageline on IE7  */
 #moin-navibar { zoom: 1; }
-
--- a/MoinMoin/user.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/user.py	Wed Jul 04 21:53:24 2012 +0400
@@ -734,4 +734,3 @@
                     sitename=self._cfg.sitename or "Wiki")
         mailok, msg = sendmail.sendmail(subject, text, to=[self.email], mail_from=self._cfg.mail_from)
         return mailok, msg
-
--- a/MoinMoin/util/SubProcess.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/SubProcess.py	Wed Jul 04 21:53:24 2012 +0400
@@ -204,4 +204,3 @@
 if __name__ == '__main__':
     print exec_cmd("python", "import time ; time.sleep(20) ; print 'never!' ;", timeout=10)
     print exec_cmd("python", "import time ; time.sleep(20) ; print '20s gone' ;")
-
--- a/MoinMoin/util/__init__.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/__init__.py	Wed Jul 04 21:53:24 2012 +0400
@@ -114,4 +114,3 @@
         previous_offset = -1
     next_offset = count
     return (selected_result, next_offset, previous_offset)
-
--- a/MoinMoin/util/_tests/test_crypto.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_crypto.py	Wed Jul 04 21:53:24 2012 +0400
@@ -105,4 +105,3 @@
         assert result1 != result2, ("Expected different keys for different <kw> but got the same")
 
 coverage_modules = ['MoinMoin.util.crypto']
-
--- a/MoinMoin/util/_tests/test_diff3.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_diff3.py	Wed Jul 04 21:53:24 2012 +0400
@@ -83,4 +83,3 @@
 
 
 coverage_modules = ['MoinMoin.util.diff3']
-
--- a/MoinMoin/util/_tests/test_diff_html.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_diff_html.py	Wed Jul 04 21:53:24 2012 +0400
@@ -68,4 +68,3 @@
     expected = [(4, '<br>AAA 00<span>1</span><br>AAA 00<span>2</span><br>AAA 00<span>3</span><br>AAA 00<span>4<br>AAA 005</span>',
                  4, '<span>AAA 006</span><br>AAA 00<span>7</span><br>AAA 00<span>8</span><br>AAA 00<span>9</span><br>AAA <span>1</span>00')]
     assert result == expected
-
--- a/MoinMoin/util/_tests/test_diff_text.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_diff_text.py	Wed Jul 04 21:53:24 2012 +0400
@@ -67,4 +67,3 @@
 
 
 coverage_modules = ['MoinMoin.util.diff_text']
-
--- a/MoinMoin/util/_tests/test_filesys.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_filesys.py	Wed Jul 04 21:53:24 2012 +0400
@@ -168,4 +168,3 @@
             filesys.copytree(self.test_dir, self.test_dest_dir)
 
 coverage_modules = ['MoinMoin.util.filesys']
-
--- a/MoinMoin/util/_tests/test_forms.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_forms.py	Wed Jul 04 21:53:24 2012 +0400
@@ -99,4 +99,3 @@
     attribute_result = test_attributes['class']
     expected = 'test_attribute_class test_moin_error'
     assert attribute_result == expected
-
--- a/MoinMoin/util/_tests/test_interwiki.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_interwiki.py	Wed Jul 04 21:53:24 2012 +0400
@@ -118,4 +118,3 @@
 
 
 coverage_modules = ['MoinMoin.util.interwiki']
-
--- a/MoinMoin/util/_tests/test_iri.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_iri.py	Wed Jul 04 21:53:24 2012 +0400
@@ -414,5 +414,3 @@
     assert u[0] == ''
     assert u[1] == 'test2'
     assert unicode(u) == '/test2'
-
-
--- a/MoinMoin/util/_tests/test_lock.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_lock.py	Wed Jul 04 21:53:24 2012 +0400
@@ -169,4 +169,3 @@
             assert lock.acquire(0.1)
 
 coverage_modules = ['MoinMoin.util.lock']
-
--- a/MoinMoin/util/_tests/test_md5crypt.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_md5crypt.py	Wed Jul 04 21:53:24 2012 +0400
@@ -26,4 +26,3 @@
     result = md5crypt.apache_md5_crypt('test_pass', 'Moin_test')
     expected = '$apr1$Moin_tes$4/5zV8nADrNv3BJcY1rZX1'
     assert result == expected
-
--- a/MoinMoin/util/_tests/test_mime.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_mime.py	Wed Jul 04 21:53:24 2012 +0400
@@ -89,4 +89,3 @@
     assert t1 != t2
     assert not t1.issupertype(t2)
     assert not t2.issupertype(t1)
-
--- a/MoinMoin/util/_tests/test_mimetype.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_mimetype.py	Wed Jul 04 21:53:24 2012 +0400
@@ -16,11 +16,11 @@
         MimeType_obj = mimetype.MimeType(filename='test_file.jpg')
         # format in config.parser_text_mimetype
         test = [
-        #test_format    # test_mimetype
-        ('html',        ('text', 'html')),
-        ('css',         ('text', 'css')),
-        ('python',      ('text', 'python')),
-        ('latex',       ('text', 'latex'))
+        #test_format, test_mimetype
+        ('html', ('text', 'html')),
+        ('css', ('text', 'css')),
+        ('python', ('text', 'python')),
+        ('latex', ('text', 'latex'))
         ]
 
         for test_format, test_mimetype in test:
@@ -29,9 +29,9 @@
 
         # format not in config.parser_text_mimetype
         test = [
-        # test_format   # test_mimetype
-        ('wiki',        ('text', 'x.moin.wiki')),
-        ('irc',         ('text', 'irssi')),
+        # test_format, test_mimetype
+        ('wiki', ('text', 'x.moin.wiki')),
+        ('irc', ('text', 'irssi')),
         ('test_random', ('text', 'x-test_random'))
         ]
 
@@ -42,14 +42,14 @@
 
     def test_mime_type(self):
         test = [
-        # test_extension     # test_major/minor
-        ('.mpeg',            'video/mpeg'),
-        ('.pdf',             'application/pdf'),
-        ('.txt',             'text/plain'),
-        ('.jpeg',            'image/jpeg'),
-        ('.png',             'image/png'),
-        ('.svg',             'image/svg+xml'),
-        ('',                 'application/octet-stream')
+        # test_extension, test_major/minor
+        ('.mpeg', 'video/mpeg'),
+        ('.pdf', 'application/pdf'),
+        ('.txt', 'text/plain'),
+        ('.jpeg', 'image/jpeg'),
+        ('.png', 'image/png'),
+        ('.svg', 'image/svg+xml'),
+        ('', 'application/octet-stream')
         ]
 
         # when mimestr is None
@@ -80,4 +80,3 @@
         result3 = MimeType_obj.content_type()
         expected = 'text/x-test_file.mpeg'
         assert result3 == expected
-
--- a/MoinMoin/util/_tests/test_paramparser.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_paramparser.py	Wed Jul 04 21:53:24 2012 +0400
@@ -701,4 +701,3 @@
         assert ief(has_complex, u'2.007, 2.007')
         assert ief(has_complex, u'2.007', [2.007])
         assert ief(has_complex, u'b=2.007', [2.007])
-
--- a/MoinMoin/util/_tests/test_pysupport.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_pysupport.py	Wed Jul 04 21:53:24 2012 +0400
@@ -135,4 +135,3 @@
 
 coverage_modules = ['MoinMoin.util.pysupport']
 pytest.main("-x test_pysupport.py")
-
--- a/MoinMoin/util/_tests/test_registry.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_registry.py	Wed Jul 04 21:53:24 2012 +0400
@@ -71,4 +71,3 @@
 
     pytest.raises(ValueError, r.unregister, factory_none)
     assert len(r._entries) == 0
-
--- a/MoinMoin/util/_tests/test_send_file.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_send_file.py	Wed Jul 04 21:53:24 2012 +0400
@@ -35,4 +35,3 @@
 
         with pytest.raises(TypeError):
             send_file.send_file(None, as_attachment=True)
-
--- a/MoinMoin/util/_tests/test_thread_monitor.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_thread_monitor.py	Wed Jul 04 21:53:24 2012 +0400
@@ -43,4 +43,3 @@
         with open(self.src, "r") as f:
             f.seek(1)
             assert 'Dumping thread' in f.readline()
-
--- a/MoinMoin/util/_tests/test_tree.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_tree.py	Wed Jul 04 21:53:24 2012 +0400
@@ -65,4 +65,3 @@
 
 def test_moin_page():
     assert isinstance(moin_page, Namespace)
-
--- a/MoinMoin/util/_tests/test_util.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_util.py	Wed Jul 04 21:53:24 2012 +0400
@@ -42,4 +42,3 @@
 
 
 coverage_modules = ['MoinMoin.util']
-
--- a/MoinMoin/util/_tests/test_version.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/_tests/test_version.py	Wed Jul 04 21:53:24 2012 +0400
@@ -59,4 +59,3 @@
 
 
 coverage_modules = ['MoinMoin.util.version']
-
--- a/MoinMoin/util/clock.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/clock.py	Wed Jul 04 21:53:24 2012 +0400
@@ -45,4 +45,3 @@
     def __del__(self):
         if self.timers:
             logging.warning('These timers have not been stopped: {0}'.format(', '.join(self.timers.keys())))
-
--- a/MoinMoin/util/crypto.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/crypto.py	Wed Jul 04 21:53:24 2012 +0400
@@ -224,4 +224,3 @@
     :param kw: keys/values to compute cache key from
     """
     return hashlib.md5(repr(kw)).hexdigest()
-
--- a/MoinMoin/util/diff3.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/diff3.py	Wed Jul 04 21:53:24 2012 +0400
@@ -266,4 +266,3 @@
 
 if __name__ == '__main__':
     main()
-
--- a/MoinMoin/util/diff_html.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/diff_html.py	Wed Jul 04 21:53:24 2012 +0400
@@ -103,4 +103,3 @@
         lastmatch = (match[0] + match[2], match[1] + match[2])
 
     return result
-
--- a/MoinMoin/util/diff_text.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/diff_text.py	Wed Jul 04 21:53:24 2012 +0400
@@ -77,4 +77,3 @@
         lines[-count+3:] = []
 
     return lines
-
--- a/MoinMoin/util/filesys.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/filesys.py	Wed Jul 04 21:53:24 2012 +0400
@@ -243,4 +243,3 @@
 
 def unlock(file):
     raise NotImplementedError
-
--- a/MoinMoin/util/forms.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/forms.py	Wed Jul 04 21:53:24 2012 +0400
@@ -98,4 +98,3 @@
         if not isinstance(value, (type(None), werkzeug.FileStorage)):
             raise AdaptationError
         return value
-
--- a/MoinMoin/util/interwiki.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/interwiki.py	Wed Jul 04 21:53:24 2012 +0400
@@ -203,4 +203,3 @@
             parser = InterWikiMap(f.read())
 
         return parser
-
--- a/MoinMoin/util/iri.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/iri.py	Wed Jul 04 21:53:24 2012 +0400
@@ -700,4 +700,3 @@
 
 class IriFragment(_Value):
     quote_filter = frozenset('@:/?')
-
--- a/MoinMoin/util/lock.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/lock.py	Wed Jul 04 21:53:24 2012 +0400
@@ -401,4 +401,3 @@
             return WriteLock.expire(self)
         else: # POSIX
             return True
-
--- a/MoinMoin/util/mime.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/mime.py	Wed Jul 04 21:53:24 2012 +0400
@@ -137,4 +137,3 @@
 
 # Generic types, text type
 type_text_plain = Type(type='text', subtype='plain')
-
--- a/MoinMoin/util/mimetype.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/mimetype.py	Wed Jul 04 21:53:24 2012 +0400
@@ -202,4 +202,3 @@
         yield self.raw_mimestr
         yield fragments[0]
         yield "application_octet_stream"
-
--- a/MoinMoin/util/monkeypatch.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/monkeypatch.py	Wed Jul 04 21:53:24 2012 +0400
@@ -24,4 +24,3 @@
 
 werkzeug.serving.BaseRequestHandler = BaseRequestHandler
 werkzeug.serving.WSGIRequestHandler = BaseRequestHandler
-
--- a/MoinMoin/util/paramparser.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/paramparser.py	Wed Jul 04 21:53:24 2012 +0400
@@ -723,4 +723,3 @@
             raise ValueError(_(u'No argument named "%(name)s"', name=kwargs_to_pass.keys()[0]))
 
     return function(*fixed_args, **kwargs)
-
--- a/MoinMoin/util/plugins.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/plugins.py	Wed Jul 04 21:53:24 2012 +0400
@@ -236,4 +236,3 @@
     'err': str(err),
 }
         raise error.ConfigurationError(msg)
-
--- a/MoinMoin/util/profile.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/profile.py	Wed Jul 04 21:53:24 2012 +0400
@@ -180,4 +180,3 @@
 if __name__ == '__main__':
     # In case someone try to run as a script
     print __doc__
-
--- a/MoinMoin/util/pysupport.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/pysupport.py	Wed Jul 04 21:53:24 2012 +0400
@@ -139,4 +139,3 @@
             lock.release()
 
     return decorated
-
--- a/MoinMoin/util/registry.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/registry.py	Wed Jul 04 21:53:24 2012 +0400
@@ -88,4 +88,3 @@
         :param factory: Factory to register. Callable, have to return a class
         """
         return self._register(self.Entry(factory, priority))
-
--- a/MoinMoin/util/send_file.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/send_file.py	Wed Jul 04 21:53:24 2012 +0400
@@ -184,4 +184,3 @@
             if rv.status_code == 304:
                 rv.headers.pop('x-sendfile', None)
     return rv
-
--- a/MoinMoin/util/thread_monitor.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/thread_monitor.py	Wed Jul 04 21:53:24 2012 +0400
@@ -65,4 +65,3 @@
 activate_hook = mon.activate_hook
 trigger_dump = mon.trigger_dump
 hook_enabled = mon.hook_enabled
-
--- a/MoinMoin/util/tree.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/tree.py	Wed Jul 04 21:53:24 2012 +0400
@@ -69,4 +69,3 @@
 xlink = Namespace('http://www.w3.org/1999/xlink')
 docbook = Namespace('http://docbook.org/ns/docbook')
 xml = Namespace('http://www.w3.org/XML/1998/namespace')
-
--- a/MoinMoin/util/version.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/util/version.py	Wed Jul 04 21:53:24 2012 +0400
@@ -64,4 +64,3 @@
         if self.additional != 'd0':
             version_str += self.additional
         return version_str
-
--- a/MoinMoin/wikiutil.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/MoinMoin/wikiutil.py	Wed Jul 04 21:53:24 2012 +0400
@@ -345,4 +345,3 @@
         if content_length is not None:
             headers.append(('Content-Length', str(content_length)))
         return headers
-
--- a/contrib/pep8/DeleteTrailingSpaces.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/contrib/pep8/DeleteTrailingSpaces.py	Wed Jul 04 21:53:24 2012 +0400
@@ -5,7 +5,7 @@
 """
 Detect and correct violations of the moin2 coding standards:
     - no trailing blanks
-    - blank line at file end
+    - exactly one linefeed at file end, see PEP8
     - DOS line endings on .bat files, unix line endings everywhere else
 
 Execute this script from the root directory of the moin2 repository or
@@ -17,9 +17,12 @@
 warnings.simplefilter("once")
 
 # file types to be processed
-selected_suffixes = "py bat html css js".split()
+SELECTED_SUFFIXES = set("py bat cmd html css js".split())
 
-# directories to ignore
+# stuff considered DOS/WIN
+WIN_SUFFIXES = set("bat cmd".split())
+
+
 def directories_to_ignore(starting_dir):
     """Return a list of directories that will not be processed."""
     # list format: [(fully qualified directory name, sub-directory name), ... ]
@@ -27,15 +30,16 @@
     level2_dirs = ".hg contrib dlc docs env moin.egg-info wiki".split()
     for dir in level2_dirs:
         ignore_dirs.append((starting_dir, dir))
-    ignore_dirs.append((starting_dir + os.sep + "MoinMoin",  "translations"))
+    ignore_dirs.append((starting_dir + os.sep + "MoinMoin", "translations"))
     return ignore_dirs
 
 
 def check_files(filename, suffix):
     """Delete trailing blanks,
-        force blank line at file end,
+        force a single linefeed at file end,
         force line ending to be \r\n for bat files and \n for all others."""
-    if suffix.lower() == "bat":
+    suffix = suffix.lower()
+    if suffix in WIN_SUFFIXES:
         line_end = "\r\n"
     else:
         line_end = "\n"
@@ -43,22 +47,25 @@
     with open(filename, "rb") as f:
         lines = f.readlines()
 
+    # now look at file end and get rid of all whitespace-only lines there:
+    while lines:
+        if not lines[-1].strip():
+            del lines[-1]
+        else:
+            break
+
     with open(filename, "wb") as f:
         for line in lines:
             pep8_line = line.rstrip() + line_end
             f.write(pep8_line)
             # if line was changed, issue warning once for each type of change
-            if suffix == "bat" and not line.endswith("\r\n"):
+            if suffix in WIN_SUFFIXES and not line.endswith("\r\n"):
                 warnings.warn("%s was changed to DOS line endings" % filename)
-            elif suffix != "bat" and line.endswith("\r\n"):
+            elif suffix not in WIN_SUFFIXES and line.endswith("\r\n"):
                 warnings.warn("%s was changed to Unix line endings" % filename)
             elif pep8_line != line:
                 warnings.warn("%s was changed to remove trailing blanks" % filename)
 
-        # add blank line at end of file if needed
-        if lines and pep8_line != line_end:
-            f.write(line_end)
-            warnings.warn("%s was changed to add blank line to end of file" % filename)
 
 def file_picker(starting_dir):
     """Select target files and pass each to file checker."""
@@ -72,13 +79,16 @@
         # check files with selected suffixes
         for file in files:
             suffix = file.split(".")[-1]
-            if suffix in selected_suffixes:
+            if suffix in SELECTED_SUFFIXES:
                 filename = os.path.join(root, file)
                 check_files(filename, suffix)
 
+
 if __name__ == "__main__":
-    starting_dir = os.path.abspath(os.path.dirname(__file__))
-    starting_dir = starting_dir.split(os.sep + 'contrib')[0]
+    if len(sys.argv) > 1:
+        starting_dir = os.path.abspath(sys.argv[1])
+    else:
+        starting_dir = os.path.abspath(os.path.dirname(__file__))
+        starting_dir = starting_dir.split(os.sep + 'contrib')[0]
     warnings.warn("%s is starting directory" % starting_dir)
     file_picker(starting_dir)
-
--- a/contrib/wsgi/print_hotshot_profile.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/contrib/wsgi/print_hotshot_profile.py	Wed Jul 04 21:53:24 2012 +0400
@@ -36,4 +36,3 @@
 
 if __name__ == "__main__":
     run()
-
--- a/contrib/wsgi/proxy.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/contrib/wsgi/proxy.py	Wed Jul 04 21:53:24 2012 +0400
@@ -1,6 +1,6 @@
 """
     WSGI Middleware for running WSGI apps behind proxies.
-    
+
     Analyzes HTTP-X-Forwarded-For header and uses the address our outermost
     trusted proxy is seeing as REMOTE_ADDR.
 
@@ -34,4 +34,3 @@
         else:
             del environ['REMOTE_ADDR']
         return self.app(environ, start_response)
-
--- a/docs/admin/backup.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/admin/backup.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -2,52 +2,43 @@
 Backup and Restore
 ==================
 
-General remarks
-===============
-
-Everyone wants Restore. Nobody wants Backup.
-
-.. warning::
-
-   Unfortunately, that doesn't work. Read below about a working procedure.
-
 Full Backup / Restore
 =====================
 
-Of course, it's best to have a **full** backup of your machine. If you do,
-you can easily restore it to a working condition, even if things go horribly wrong.
+The best way to recover from data loss is to have a **full** backup of your machine. 
+With this backup you can easily restore your machine to a working condition.
 
-However, you can use the procedure below to selectively backup only the files
+The procedure below explains how to selectively backup only the files
 essential to your MoinMoin installation. While there is no need to maintain both a full
-and a selective backup, having one of the two is strongly advised.
+and a selective backup, having at least one of the two is strongly recommended.
 
 Selective Backup
 ================
-If you just want a backup of MoinMoin and your data, backup the following files:
+If you want a backup of MoinMoin and your data, then backup the following::
 
-* your data (most important)
-* moin configuration (e.g. wikiconfig.py)
-* logging configuration (e.g. logging.conf)
-* moin script (e.g. moin.wsgi)
-* web server configuration (e.g. apache virtualhost config)
-* optional: moin code + dependencies (you should at least know which
-  version you ran, so you can download and install that version when you
-  need to restore)
+* your data
+* moin configuration, e.g. wikiconfig.py
+* logging configuration, e.g. logging.conf
+* moin script, e.g. moin.wsgi
+* web server configuration, e.g. apache virtualhost config
+* optional: moin code + dependencies; you should at least know which
+  version you ran, so you can reinstall that version when you
+  need to restore
 
-To create a dump of all data stored in moin (wiki items, user profiles), run the
+To create a dump of all data stored in moinmoin (wiki items, user profiles), run the
 following command::
 
  moin save --file backup.moin
 
-Please note that this file contains sensitive data (like user profiles, wiki
-contents), so store your backups in a safe place and make sure no unauthorized
-individuals can access them.
+Please note that this file contains sensitive data like user profiles, wiki
+contents, so store your backups in a safe place that no unauthorized
+individual can access.
 
 Selective Restore
 =================
 
-To restore all software and configuration files (see above) to their original
-place. Make sure your (empty) wiki works as expected::
+To restore all software and configuration files to their original
+place, create an empty wiki first::
 
  moin moin -s -i  # -s = create new storage
                   # -i = create new index
@@ -55,4 +46,3 @@
 To load the backup file into your empty wiki, run::
 
  moin load --file backup.moin
-
--- a/docs/admin/changes.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/admin/changes.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -1,6 +1,6 @@
 :tocdepth: 2
 
-.. _changes:
+.. _changes::
 
 Changes in MoinMoin
 ===================
--- a/docs/admin/configure.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/admin/configure.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -3,32 +3,32 @@
 ========================================
 Kinds of configuration files
 ============================
-To change how moin behaves and looks like, you may customize it by editing
-its misc. configuration files:
+To change how moinmoin behaves and looks, you may customize it by editing
+its configuration files::
 
 * Wiki Engine Configuration
 
   - the file is often called wikiconfig.py, but it can have any name
-  - in that file, there is a Config class - this is the wiki engine's config
-  - this is Python code
+  - in that file, there is a Config class; this is the wiki engine's configuration
+  - it is written in Python
 
 * Framework Configuration
   
   - this is also located in the same file as the Wiki Engine Configuration
-  - there are some UPPERCASE settings at the bottom - this is the framework's
+  - there are some UPPERCASE settings at the bottom; this is the framework's
     config (for Flask and Flask extensions)
-  - this is Python code
+  - it is written in Python
 
 * Logging Configuration
 
-  - optional, if you don't configure this, it'll use builtin defaults
-  - this is a separate file, often called logging.conf or so
-  - .ini-like file format
+  - optional; if you don't configure this, it will use the builtin defaults
+  - this is a separate file, often called logging.conf
+  - it has an .ini-like file format
 
 Do small steps and have backups
 -------------------------------
-It is a good idea to start from one of the sample configs provided with moin
-and only do small careful changes, then try it and then do the next change.
+Start from one of the sample configs provided with moin
+and only perform small changes, then try it before testing the next change.
 
 If you're not used to the config file format, backup your last working config
 so you can revert to it in case you make some hard to find typo or other error.
@@ -36,21 +36,21 @@
 Editing Python files
 --------------------
 When editing Python files, be careful with indentation, only use multiples of
-4 spaces to indent, no tabs!
+4 spaces to indent, and no tabs!
 
-Also, be careful with syntax in general, it must be valid python code or else
-it'll crash with some error when trying to load the config. If that happens,
-read the error message, it'll usually tell the line number and what the problem
-is. If you can't fix it easily, just revert to your backup of your last working
+Also, be careful with syntax in general, it must be valid Python code or else
+it will crash with some error when trying to load the config. If that happens,
+read the error message, it will usually tell the line number and what the problem
+is. If you can't fix it easily, then revert to your backup of your last working
 config.
 
-Why Python for configuration?
------------------------------
-At first, you might wonder why we use Python code for configuration. It is
-simply because it is powerful and we can make use of that power there.
-Using something else would usually mean much more work when developing new
-stuff and also would be much less flexible and powerful, dumbing down
-everything.
+Why use Python for configuration?
+---------------------------------
+At first, you might wonder why we use Python code for configuration. One of the 
+reasons is that it is a powerful language. Moinmoin itself is developed in Python 
+and using something else would usually mean much more work when developing new 
+functionality.
+
 
 wikiconfig.py Layout
 ====================
@@ -61,37 +61,37 @@
  from MoinMoin.config.default import DefaultConfig
 
  class Config(DefaultConfig):
-     # a comment
+     # some comment
      sometext = u'your value'
      somelist = [1, 2, 3]
 
- MOINCFG = Config  # Flask only likes uppercase stuff
+ MOINCFG = Config  # Flask only likes uppercase characters
  SOMETHING_FLASKY = 'foobar'
 
-Let's go through this line-by-line:
+Let's go through this line-by-line::
 
-0. this declares the encoding of the config file. make sure your editor uses
-   the same encoding (character set), esp. if you intend to use non-ASCII
-   characters (e.g. non-english stuff).
-1. this gets the DefaultConfig class from the moin code - it has default
-   values for all settings (this will save you work, you only have to define
-   stuff you want different from the default).
-2. an empty line, for better readability
-3. now we define a new class `Config` that inherits most stuff from
-   `DefaultConfig` - this is the wiki engine configuration. If you define some
-   setting within this class, it'll overwrite the setting from DefaultConfig.
-4. with a `#` character you can write a comment into your config. This line (as
-   well as all other following lines with Config settings) is indented by 4
+0. this declares the encoding of the config file; make sure your editor uses
+   the same encoding (character set), especially if you intend to use non-ASCII
+   characters.
+1. this gets the DefaultConfig class from the moin code; it has default
+   values for all settings and this will save you work, because you only have to define
+   the parts that should be different from the defaults.
+2. empty line, for better readability
+3. define a new class `Config` that inherits most content from
+   `DefaultConfig`; this is the wiki engine configuration and if you define some
+   setting within this class, it will overwrite the setting from DefaultConfig.
+4. a `#` character defines a comment in your config. This line, as
+   well as all other following lines with Config settings, is indented by 4
    blanks, because Python defines blocks by indentation.
-5. define a Config attribute called `sometext` with value u'your value' -
+5. define a Config attribute called `sometext` with value u'your value' whereby
    the `u'...'` means that this is a unicode string.
-6. define a Config attribute called `somelist` with value [1, 2, 3] - this is
-   a list with the numbers 1, 2 and 3 as list elements.
+6. define a Config attribute called `somelist` with value [1, 2, 3]; this is
+   a list with the numbers 1, 2 and 3 as its elements.
 7. empty line, for better readability
-8. The special line "MOINCFG = Config" must stay there in exactly this form due to
+8. the special line "MOINCFG = Config" must stay there in exactly this form for
    technical reasons.
-9. UPPERCASE stuff at the bottom, outside the Config class - this is framework
-   configuration (usually something for Flask or some Flask extension).
+9. UPPERCASE code at the bottom, outside the Config class is a framework
+   configuration; usually something for Flask or some Flask extension.
 
 A real-life example of a `wikiconfig.py` can be found in the
 `docs/examples/config/` directory.
@@ -105,43 +105,41 @@
 
 Using a custom snippets.html template
 -------------------------------------
-Some user interface or html elements that often need customization are
+The user interface or html elements that often need customization are
 defined as macros in the template file `snippets.html`.
 
-If you'ld like to customize some stuff, you have to make a copy of the built-in
-`MoinMoin/templates/snippets.html` and configure moin so it will prefer your
+If you would like to customize some parts, you have to make a copy of the built-in
+`MoinMoin/templates/snippets.html` and configure moin so it will use your
 copy instead of the built-in one.
 
-This is done by just giving a list of template directories where moin will
+This is done by giving a list of template directories where moin itself will
 look first::
 
     template_dirs = ['path/to/my/templates', ]
 
-To customize something, you usually have to insert your stuff between the
+To customize something, you usually have to insert your code between the
 `{% macro ... %}` and `{% endmacro %}` lines, see below for more details.
 
 Logo
 ~~~~
-To replace the default MoinMoin logo with your own logo (which is **strongly**
-recommended, especially if your wiki has private or sensitive information),
-so your users will immediately recognize which wiki site they are currently using.
+To replace the default MoinMoin logo with your own logo, apply the following code::
 
-You can even use some simple text (or just nothing) for the logo, it is not
+    {% macro logo() -%}
+    <img src="http://wiki.example.org/logos/my_logo.png" id="moin-img-logo" alt="Example Logo">
+    {%- endmacro %}
+
+This is recommended to allow your users to immediately recognize which wiki site they are currently on.
+
+You can even use some simple text or even nothing at all for the logo, it is not
 required to be an image.
 
 Make sure the dimensions of your logo image or text fit into the layout of
 the theme(s) your wiki users are using.
 
-Example code::
-
-    {% macro logo() -%}
-    <img src="http://wiki.example.org/logos/my_logo.png" id="moin-img-logo" alt="Example Logo">
-    {%- endmacro %}
-
 Displaying license information
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 If you need to display something like license information for your content or
-some other legalese, use this macro to do it::
+some other legalese, use this macro::
 
     {# License information in the footer #}
     {% macro license_info() -%}
@@ -150,7 +148,7 @@
 
 Inserting pieces of HTML
 ~~~~~~~~~~~~~~~~~~~~~~~~
-At some specific places, you can just add a piece of your own html into the
+At some specific places, you can add a piece of your own html into the
 head or body of the theme's html output::
 
     {# Additional HTML tags inside <head> #}
@@ -175,14 +173,14 @@
 
 Credits and Credit Logos
 ~~~~~~~~~~~~~~~~~~~~~~~~
-At the bottom, we usually show some text and image links pointing out that
-this wiki runs MoinMoin, uses Python, that MoinMoin is GPL licensed, etc.
+At the bottom of your wiki pages, usually some text and image links are shown
+pointing out that the wiki runs MoinMoin, uses Python, that MoinMoin is GPL licensed, etc.
 
-If you run a public site using MoinMoin, we would appreciate if you please
-*keep* those links (esp. the "MoinMoin powered" one).
+If you run a public site using MoinMoin, we would appreciate if you
+*keep* those links, especially the "MoinMoin powered" one.
 
 However, if you can't do that for some reason, feel free to modify these
-macros to show whatever you want::
+macros to show something else::
 
     {# Image links in the footer #}
     {% macro creditlogos(start='<ul id="moin-creditlogos"><li>'|safe, end='</li></ul>'|safe, sep='</li><li>'|safe) %}
@@ -219,8 +217,8 @@
 
 Adding CSS
 ~~~~~~~~~~
-If you just want some style changes, you can maybe do them by just adding
-some custom css (and overwrite any style you don't like in the base theme)::
+To apply some style changes, add some custom css and overwrite any style you 
+don't like in the base theme::
 
     {# Additional Stylesheets (after theme css, before user css #}
     {% macro stylesheets() -%}
@@ -229,21 +227,20 @@
         <link media="screen" href="http://wiki.example.org/static/green.css" title="Green Style" rel="alternate stylesheet" />
     {%- endmacro %}
 
-You can either just add some normal css stylesheet or add a choice of alternate
+You can either add some normal css stylesheet or add a choice of alternate
 stylesheets.
 
-See:
+See::
 
 * `CSS media types <http://www.w3.org/TR/CSS2/media.html>`_
 * `Alternate Stylesheets <http://www.alistapart.com/articles/alternate/>`_
 
-A good way to test a stylesheet is to first use it as user CSS before you
-configure it for everybody.
+A good way to test a stylesheet is to first use it as user CSS before
+configuring it for the public.
 
-Please note that `stylesheets` will be included no matter what theme the wiki
-user has selected, so maybe either only do changes applying to all available
-themes or force all users to use same theme, so that your CSS applies
-correctly.
+Please note that `stylesheets` will be included no matter what theme the
+user has selected, so either only apply changes to all available themes or 
+force all users to use the same theme, so that your CSS displays correctly.
 
 Displaying user avatars
 ~~~~~~~~~~~~~~~~~~~~~~~
@@ -255,7 +252,7 @@
 Please note that using the gravatar service has some privacy issues::
 
 * to register your image for your email at gravatar.com, you need to give them
-  your email address (same as you use in your wiki user profile).
+  your email address, which is the same as you use in your wiki user profile.
 * we try to avoid exposing the referrer URL to gravatar.com, but this only
   works if your browser correctly implements rel="noreferrer". If it does not,
   your wiki item URLs will be exposed, so they will roughly know which people
@@ -264,15 +261,15 @@
 XStatic Packages
 ----------------
 `XStatic <http://readthedocs.org/projects/xstatic>`_ is a packaging standard 
-to package external (often 3rd party) static files as a python package. 
-So they are easily usable on all operating systems, 
-with any package management system or even without one.
+to package external static files as a Python package, often third party. 
+That way they are easily usable on all operating systems, whether it has a package management 
+system or not.
 
 In many cases, those external static files are maintained by someone else (like jQuery
-javascript library or even much bigger js libraries or applications) and we
-definitely do not want to merge them into our project.
+javascript library or larger js libraries) and we definitely do not want to merge 
+them into our project.
 
-For MoinMoin we require the following XStatic Packages in setup.py:
+For MoinMoin we require the following XStatic Packages in setup.py::
 
 * `jquery <http://pypi.python.org/pypi/XStatic-jQuery>`_
   for jquery lib functions loaded in the template file base.html
@@ -302,7 +299,7 @@
   used in the template of index view for multiple parallel downloads.
 
 
-These packages are imported in wikiconfig by ::
+These packages are imported in wikiconfig by::
 
     from xstatic.main import XStatic
     mod_names = ['jquery', 'jquery_file_upload', 'ckeditor',
@@ -314,7 +311,7 @@
         xs = XStatic(mod, root_url='/static', provider='local', protocol='http')
         serve_files.update([(xs.name, xs.base_dir)])
 
-In a template file you access the files of such a package by its module name ::
+In a template file you access the files of such a package by its module name::
 
     url_for('serve.files', name='the mod name', filename='the file to load')
 
@@ -340,16 +337,11 @@
 
 Custom Themes
 -------------
-In case you want to do major changes to how MoinMoin looks (so just
-changing snippets or CSS is not enough), you could also write your own theme.
+In case you want to do major changes to how MoinMoin displays its pages, you 
+could also write your own theme.
 
-Be warned: doing this is a long-term thing, you don't just have to write it,
-but you'll also have to maintain and update it. Thus, we suggest you try
-living with the built-in themes or collaborate with the MoinMoin core and
-other interested developers on the internet.
-
-A few well-made, well-maintained and widespread themes are much better than
-lots of the opposite.
+Caution: developing your own theme means you also have to maintain and update it, 
+which normally requires a long-term effort.
 
 .. todo::
 
@@ -364,7 +356,7 @@
 
 Each authenticator is an instance of some specific class, configuration of
 the authenticators usually works by giving them keyword arguments. Most have
-reasonable defaults, though.
+reasonable defaults though.
 
 MoinAuth
 --------
@@ -378,8 +370,8 @@
 
 HTTPAuthMoin
 ------------
-With HTTPAuthMoin moin does http basic auth all by itself (without help of
-the web server)::
+With HTTPAuthMoin moin does http basic authentication by itself without the help of
+the web server::
 
     from MoinMoin.auth.http import HTTPAuthMoin
     auth = [HTTPAuthMoin(autocreate=True)]
@@ -389,27 +381,27 @@
 asking for username and password. Both then gets transmitted to moin and it
 is compared against the password hash stored in the user's profile.
 
-Note: when HTTPAuthMoin is used, the browser will show that login dialogue, so
+**Note:** when HTTPAuthMoin is used, the browser will show that login dialogue, so
 users must login to use the wiki.
 
 GivenAuth
 ---------
 With GivenAuth moin relies on the webserver doing the authentication and giving
-the result to moin (usually via environment variable REMOTE_USER)::
+the result to moin, usually via the environment variable REMOTE_USER::
 
     from MoinMoin.auth import GivenAuth
     auth = [GivenAuth(autocreate=True, coding='utf-8')]
 
-Using this has some pros and cons:
+Using this method has some pros and cons::
 
 * you can use lots of authentication extensions available for your web server
-* but the only information moin will get (via REMOTE_USER) is the authenticated
+* but the only information moin will get via REMOTE_USER is the authenticated
   user's name, nothing else. So, e.g. for LDAP/AD, you won't get additional
-  stuff stored in the LDAP directory.
-* all the stuff you won't get (but you need) will need to be manually stored
-  and updated in the user's profile (e.g. the user's email address, etc.)
+  content stored in the LDAP directory.
+* everything you won't get, but which you need, will need to be manually stored
+  and updated in the user's profile, e.g. the user's email address, etc.
 
-Please note that you must give the correct coding (character set) so that moin
+Please note that you must give the correct character set so that moin
 can decode the username to unicode, if necessary. For environment variables
 like REMOTE_USER, the coding might depend on your operating system.
 
@@ -451,7 +443,7 @@
 
 LDAPAuth with single LDAP server
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-This example shows how to use it with a single LDAP/AD server::
+This example shows how to use LDAPAuth with a single LDAP/AD server::
 
     from MoinMoin.auth.ldap_login import LDAPAuth
     ldap_common_arguments = dict(
@@ -516,10 +508,10 @@
 
 LDAPAuth with two LDAP servers
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-This example shows how to use it with a two LDAP/AD servers (like e.g. a primary
-and backup domain controller)::
+This example shows how to use LDAPAuth with a two LDAP/AD servers, such as in a setup
+with a primary controller and backup domain controller::
 
-    # ... same stuff as for single server (except the line with "auth =") ...
+    # ... same as for single server (except the line with "auth =") ...
     ldap_authenticator2 = LDAPAuth(
         server_uri='ldap://otherldap',  # ldap / active directory server URI for second server
         name='ldap2',
@@ -530,8 +522,8 @@
 
 AuthLog
 -------
-AuthLog is no real authenticator in the sense that it authenticates (logs in) or
-deauthenticates (logs out) users, it is just passively logging informations for
+AuthLog is not a real authenticator in the sense that it authenticates (logs in) or
+deauthenticates (logs out) users. It is passively logging informations for
 authentication debugging::
 
     from MoinMoin.auth import MoinAuth
@@ -545,14 +537,14 @@
  2011-02-05 16:35:06,294 INFO MoinMoin.auth.log:22 logout: user_obj=<MoinMoin.user.User at 0x92b5d4c name:u'ThomasWaldmann' valid:False> kw={}
  2011-02-05 16:35:06,328 INFO MoinMoin.auth.log:22 session: user_obj=None kw={}
 
-Note: there are sensitive informations like usernames and passwords in this
-log output. Make sure you only use this for testing and delete the logs when
+**Note:** there is sensitive information like usernames and passwords in this
+log output. Make sure you only use this for testing only and delete the logs when
 done.
 
 SMBMount
 --------
 SMBMount is no real authenticator in the sense that it authenticates (logs in)
-or deauthenticates (logs out) users. It just catches the username and password
+or deauthenticates (logs out) users. It instead catches the username and password
 and uses them to mount a SMB share as this user.
 
 SMBMount is only useful for very special applications, e.g. in combination
@@ -588,36 +580,35 @@
 =====================
 Credentials
 -----------
-Some of the authentication methods described above will transmit credentials
-(like usernames and password) in unencrypted form:
+Some of the authentication methods described above will transmit credentials,
+like usernames and password, in unencrypted form:
 
 * MoinAuth: when the login form contents are transmitted to moin, they contain
-  username and password in cleartext.
+  username and password in clear text.
 * HTTPAuthMoin: your browser will transfer username and password in a encoded
-  (but NOT encrypted) form with EVERY request (it uses http basic auth).
-* GivenAuth: please check the potential security issues of the authentication
-  method used by your web server. For http basic auth please see HTTPAuthMoin.
+  (but NOT encrypted) form with EVERY request; it uses http basic auth.
+* GivenAuth: check the potential security issues of the authentication
+  method used by your web server; for http basic auth please see HTTPAuthMoin.
 * OpenID: please check yourself.
 
 Contents
 --------
-http transmits everything in cleartext (not encrypted).
+http transmits everything in clear text and is therefore not encrypted.
 
 Encryption
 ----------
-Transmitting unencrypted credentials or contents is a serious issue in many
+Transmitting unencrypted credentials or contents can cause serious issues in many
 scenarios.
 
-We recommend you make sure connections are encrypted, like with https or VPN
+We recommend you make sure the connections are encrypted, like with https or VPN
 or an ssh tunnel.
 
 For public wikis with very low security / privacy needs, it might not be needed
-to encrypt their content transmissions, but there is still an issue for the
+to encrypt the content transmissions, but there is still an issue for the
 credential transmissions.
 
 When using unencrypted connections, wiki users are advised to make sure they
-use unique credentials (== not reusing passwords that are also used for other
-stuff).
+use unique credentials and not reuse passwords that are used for other purposes.
 
 
 Password security
@@ -625,14 +616,13 @@
 Password strength
 -----------------
 As you might know, many users are bad at choosing reasonable passwords and some
-are tempted to use passwords like 123456 everywhere.
+are tempted to use easily crackable passwords.
 
-To help the users choose reasonable passwords, moin has a simple builtin
-password checker that does some sanity checks (the checker is enabled by
-default), so users don't choose too short or too easy passwords.
+To help users choose reasonable passwords, moin has a simple builtin
+password checker that is enabled by default and does some sanity checks, 
+so users don't choose easily crackable passwords.
 
-If you don't like this and your site has rather low security requirements,
-feel free to DISABLE the checker by::
+If your site has rather low security requirements, you can disable the checker by::
 
     password_checker = None # no password checking
 
@@ -641,8 +631,8 @@
 
 Password storage
 ----------------
-Moin never stores passwords in cleartext, but always as cryptographic hash
-with random salt (currently ssha256 is the default).
+Moin never stores passwords in clear text, but always as cryptographic hash
+with a random salt. Currently ssha256 is the default.
 
 
 Authorization
@@ -651,33 +641,32 @@
 a given action.
 
 Please note that wikis usually make much use of so-called *soft security*,
-which means that they are rather open and give freedom to users, while
-providing means to revert damage in case it happens.
+which means that they are rather open and give freedom to users, while at the same time
+providing the means to revert any damage that may have been caused.
 
 *Hard security* means that one would lock items, etc. so that no damage can possibly be done.
 
 Moin's default configuration tries to give a sane compromise of both soft
-and hard security. Depending on the situation the wiki
-admin/owner/community has to deal with, however, you may need different settings.
-
-So just keep in mind:
+and hard security. However, you may need different settings depending on the situation that the wiki
+admin, wiki owner or wiki community will have to deal with.
 
-* if your wiki is rather open, you might make it easy to contribute (e.g. a
+So keep in mind::
+
+* if your wiki is rather open, you might make it easy to contribute, e.g. a
   user who is not a regular user of your wiki could fix some typos he has just
-  found). However, a hostile user (or bot) might also put some spam into your wiki
-  (you'd be able to revert the spam later).
-* if your wiki is rather closed (e.g. you require every user to first apply for an
-  account and to log in before being able to do changes), you'll rarely get
+  found. However, a hostile user or bot might also put some spam into your wiki
+  with the ability to be able to revoke the spam later.
+* if your wiki is rather closed, e.g. you require every user to first apply for an
+  account and to log in before being able to do changes, you will rarely get
   contributions from casual users and maybe also less from members of your
-  community. But, it's likely you won't get spam either.
+  community. But, getting spam is then less likely.
  
 
 ACL for functions
 -----------------
 This ACL controls access to some specific functions / views of moin::
 
-    # we just show the default value of acl_rights_functions for information,
-    # you usually do not have to change it:
+    # the default value of acl_rights_functions for information, you usually do not have to change it:
     #acl_rights_functions = ['superuser', 'notextcha', ]
     acl_functions = u'+YourName:superuser TrustedEditorGroup:notextcha'
 
@@ -691,12 +680,11 @@
 
 ACLs for contents
 -----------------
-These ACLs control access to contents stored in the wiki - they are configured
+These ACLs control access to contents stored in the wiki, they are configured
 per storage backend (see storage backend docs) and optionally in the metadata of wiki
 items::
 
-    # we just show the default value of acl_rights_contents for information,
-    # you usually do not have to change it:
+    # the default value of acl_rights_contents for information, you usually do not have to change it:
     #acl_rights_contents = ['read', 'write', 'create', 'destroy', 'admin', ]
     ... backend configuration ...
     ... before=u'YourName:read,write,create,destroy,admin',
@@ -714,35 +702,35 @@
    "before" -> "item acl from metadata (if specified)" -> "after";
    "before" -> "default (otherwise)"                   -> "after";
 
-How to use before/default/after:
+How to use before/default/after::
 
-* `before` is usually used to force stuff (e.g. if you want to give some
-  wiki admin all permissions no matter what)
-* `default` is the behavior if nothing special has been specified (no ACL in
-  item metadata)
-* `after` is rarely used. When it is, it's used to "not forget something unless otherwise specified".
+* `before` is usually used to force something, for example if you want to give some
+  wiki admin all permissions indiscriminately
+* `default` is the behavior if nothing special has been specified, ie no ACL in the
+  item's metadata
+* `after` is rarely used and when it is, it is used to "not forget something unless otherwise specified".
 
 When configuring content ACLs, you can choose between standard (flat) ACL
 processing and hierarchic ACL processing. Hierarchic processing means that
-subitems inherit ACLs from their parent items if they don't have an ACL.
+subitems inherit ACLs from their parent items if they don't have an ACL themselves.
 
 Note that while hierarchic ACLs are rather convenient sometimes, they make the
-system more complex. You have to be very careful with potential permissions
-changes happening due to changes in the hierarchy, like when you create,
+system more complex. You have to be very careful with permission
+changes happening as a result of changes in the hierarchy, such as when you create,
 rename or delete items.
 
-Supported capabilities (rights):
+Supported capabilities (rights)::
 
 * read - read content
 * write - write (edit, modify) content
 * create - create new items
-* destroy - completely destroy revisions or items (give this only to *fully-trusted* users)
-* admin - change (create, remove) ACLs for the item (give this only to *fully-trusted* users)
+* destroy - completely destroy revisions or items; to be given only to *fully-trusted* users
+* admin - change (create, remove) ACLs for the item; to be given only to *fully-trusted* users
 
 ACLs - special groups
 ---------------------
 In addition to the groups provided by the group backend(s), there are some
-special group names available within ACLs:
+special group names available within ACLs::
 
 * All - a virtual group containing every user
 * Known - a virtual group containing every logged-in user
@@ -757,7 +745,7 @@
 
 An entry is a colon-separated set of two values::
 
-* the left side is a comma-separated list of user and/or group names and
+* the left side is a comma-separated list of user and/or group names
 * the right side is a comma-separated list of rights / capabilities for those users/groups.
 
 An ACL is processed from left to right, where the first left-side match counts.
@@ -766,7 +754,7 @@
 
     u"SuperMan:read,write,create,destroy,admin All:read,write"
 
-If "SuperMan" is currently logged in and moin processes this ACL, it'll find
+If "SuperMan" is currently logged in and moin processes this ACL, it will find
 a name match in the first entry. If moin wants to know whether he may destroy,
 the answer will be "yes", as destroy is one of the capabilities/rights listed
 on the right side of this entry.
@@ -779,12 +767,12 @@
 destroy is not listed on the right side of the "All" entry. If moin wants to know
 whether he may write, the answer will be "yes".
 
-Notes:
+Notes::
 
 * As a consequence of the left-to-right and first-match-counts processing,
   you must order ACL entries so that the more specific ones (like for
   "SuperMan") are left of the less specific ones.
-  Usually, you want this order:
+  Usually, you want this order::
 
   1) usernames
   2) special groups
@@ -806,7 +794,7 @@
 
 If you use one of the two, MoinMoin will search for both a username and permission, and a match will have to match
 both the name of user (left-side) *and* the permission MoinMoin is searching for (right-side), otherwise
-it will just continue with the next entry.
+it will continue with the next entry.
 
 '+' indicates that MoinMoin should give the permission(s) specified on the right side.
 
@@ -817,20 +805,20 @@
     u"+SuperMan:create,destroy,admin -Idiot:write All:read,write"
 
 If "SuperMan" is currently logged in and moin wants to know whether he may
-destroy, it'll find a match in the first entry (name matches *and* permission
-in question matches). As the prefix is '+', the answer is "yes".
+destroy, it'll find a match in the first entry, because the name matches *and* permission
+in question matches. As the prefix is '+', the answer is "yes".
 If moin wants to know whether he may write, the first entry will not match
 on both sides, so moin will proceed and look at the second entry. It doesn't
-match, so it'll look at the third entry. Of course "SuperMan" is a member of
+match, so it will look at the third entry. Of course "SuperMan" is a member of
 group "All", so we have a match here. As "write" is listed on the right side,
 the answer will be "yes".
 
 If "Idiot" is currently logged in and moin wants to know whether he may write,
-it'll find no match in the first entry, but the second entry will match. As
-the prefix is '-', the answer will be "no" (and it will not even proceed and
-look at the third entry).
+it will find no match in the first entry, but the second entry will match. As
+the prefix is '-', the answer will be "no" and it will not even proceed and
+look at the third entry.
 
-Notes:
+Notes::
 
 * you usually use these modifiers if most of the rights for a given user shall be specified
   later, but a special user or group should be treated slightly different for
@@ -842,9 +830,9 @@
 default ACL.
 
 This is useful, for example, if when you mostly want the default ACL, but
-with a slight modification - but you don't want to type in the default ACL
-all the time (and you also want to be able to change the default ACL without
-having to edit lots of items).
+with a slight modification, but you don't want to type in the default ACL
+all the time and you also want to be able to change the default ACL without
+having to edit lots of items.
 
 Example::
 
@@ -862,19 +850,19 @@
 A TextCHA is a pure text alternative to ''CAPTCHAs''. MoinMoin uses it to
 prevent wiki spamming and it has proven to be very effective.
 
-Features:
+Features::
 
 * when registering a user or saving an item, it can ask a random question
-* match the given answer against a regular expression
+* moin matches the given answer against a regular expression
 * questions and answers can be configured in the wiki config
-* multi language support: a user gets a textcha in his language or in
-  language_default or in English (depending on availability of questions and
-  answers for the language)
+* multi language support: a user gets a textcha in his language or in the
+  language_default or in English, depending on availability of questions and
+  answers for the language
 
 TextCha Configuration
 ~~~~~~~~~~~~~~~~~~~~~
 
-Tips for configuration:
+Tips for configuration::
 
 * have 1 word / 1 number answers
 * ask questions that normal users of your site are likely to be able to answer
@@ -883,8 +871,8 @@
 * do not ask overly obvious questions
 * do not share your questions with other sites / copy questions from other
   sites (or spammers might try to adapt to this) 
-* you should at least give textchas for 'en' (or for your language_default, if
-  that is not 'en') as this will be used as fallback if MoinMoin does not find
+* you should at least give textchas for 'en' or for your language_default, if
+  that is not 'en', as this will be used as fallback if MoinMoin does not find
   a textcha in the user's language
 
 In your wiki config, do something like this::
@@ -909,14 +897,14 @@
 
 Secrets
 =======
-Moin uses secrets (just use a long random string; *not* a reuse of any of your
-passwords) to encrypt or cryptographically sign some stuff like:
+Moin uses secrets to encrypt or cryptographically sign something like::
 
 * textchas
 * tickets
 
+Secrets are long random strings and *not* a reuse of any of your passwords.
 Don't use the strings shown below, they are NOT secret as they are part of the
-moin documentation - make up your own secrets::
+moin documentation. Make up your own secrets::
 
     secrets = {
         'security/textcha': 'kjenrfiefbeiaosx5ianxouanamYrnfeorf',
@@ -930,9 +918,9 @@
 Groups and Dicts
 ================
 Moin can get group and dictionary information from some supported backends
-(like the wiki configuration or wiki items).
+like the wiki configuration or wiki items.
 
-A group is just a list of unicode names. It can be used for any application:
+A group is a list of unicode names. It can be used for any application:
 one application is defining user groups for usage in ACLs.
 
 A dict is a mapping of unicode keys to unicode values. It can be used for any
@@ -1006,7 +994,7 @@
 =======
 MoinMoin supports storage backends as different ways of storing wiki items.
 
-Setup of storage is rather complex and layered, involving:
+Setup of storage is rather complex and layered, involving::
 
 * a router middleware that dispatches parts of the namespace to the respective
   backend
@@ -1014,22 +1002,22 @@
   authorized to access
 * Indexing mixin that indexes some data automatically on commit, so items can
   be selected / retrieved faster.
-* storage backends that really store wiki items somewhere
+* storage backends that store wiki items
 
 create_simple_mapping
 ---------------------
-This is a helper function to make storage setup easier - it helps you:
+This is a helper function to make storage setup easier. It helps you to::
 
 * create a simple setup that uses 3 storage backends internally for these
   parts of the namespace:
 
   - content
   - userprofiles
-* to configure ACLs protecting these parts of the namespace
-* to setup a router middleware that dispatches to these parts of the namespace
-* to setup a indexing mixin that maintains an index
+* configure ACLs protecting these parts of the namespace
+* setup a router middleware that dispatches to these parts of the namespace
+* setup a indexing mixin that maintains an index
 
-Call it like::
+Call it as follows::
 
     from MoinMoin.storage import create_simple_mapping
 
@@ -1044,20 +1032,20 @@
                               after=..., ),
     )
 
-The `uri` depends on the kind of storage backend and stores you want to use
-(see below). Usually it is a URL-like string in the form of::
+The `uri` depends on the kind of storage backend and stores you want to use, 
+see below. Usually it is a URL-like string in the form of::
 
     stores:fs:/srv/mywiki/%(nsname)s/%(kind)s
     
 `stores` is the name of the backend, followed by a colon, followed by a store
 specification. `fs` is the name of the store, followed by a specification
-that makes sense for the fs (filesystem) store (i.e. a path with placeholders).
+that makes sense for the fs (filesystem) store, i.e. a path with placeholders.
 
 `%(nsname)s` placeholder will be replaced 'content' or 'userprofiles' for
 the respective backend. `%(kind)s` will be replaced by 'meta' or 'data'
 later.
 
-In this case, the mapping created will look like this:
+In this case, the mapping created will look like this::
 
 +----------------+-----------------------------+
 | Namespace part | Filesystem path for storage |
@@ -1073,25 +1061,25 @@
 
 protecting middleware
 ---------------------
-Features:
+Features::
 
 * protects access to lower storage layers by ACLs (Access Control Lists)
 * makes sure there won't be ACL security issues, even if upper layers have bugs
-* if you use create_simple_mapping, you just give the ACL parameters. The
+* if you use create_simple_mapping, you just give the ACL parameters; the
   middleware will be set up automatically by moin.
 
 routing middleware
 ------------------
-Features:
+Features::
 
 * dispatches storage access to different backends depending on the item name
-* in POSIX terms, it's something like fstab/mount
+* in POSIX terms, it is something like fstab/mount
 * if you use create_simple_mapping, the router middleware will be set up
   automatically by moin.
 
 indexing middleware
 -------------------
-Features:
+Features::
 
 * maintains an index for important metadata values
 * speeds up looking up / selecting items
@@ -1100,12 +1088,11 @@
 
 stores backend
 --------------
-This is a backend that ties together 2 stores (one for meta, one for data) to
-form a backend.
+This is a backend that ties together 2 stores to form a backend: one for meta, one for data
 
 fs store
 --------
-Features:
+Features::
 
 * stores into the filesystem
 * store metadata and data into separate files/directories
@@ -1128,18 +1115,18 @@
 
 sqla store
 ----------
-Features:
+Features::
 
 * stores data into an (SQL) database / table
-* can either use 1 database per store or 1 table per store (you need to
-  give different table names then)
+* can either use 1 database per store or 1 table per store and you need to
+  give different table names then
 * uses slqalchemy (without the ORM) for database abstraction
-* supports multiple types of databases. For example:
+* supports multiple types of databases, for example::
  
   - sqlite (default, comes built-into Python)
   - postgresql
   - mysql
-  - and others (see sqlalchemy docs).
+  - and others, see sqlalchemy docs.
 
 `uri` for `create_simple_mapping` looks like e.g.::
 
@@ -1159,14 +1146,14 @@
 
 sqlite store
 ------------
-Features:
+Features::
 
-* directly talks to sqlite, not using sqlalchemy
+* directly talks to sqlite, without using sqlalchemy
 * stores data into an sqlite database, which is a single file
-* can either use 1 database per store or 1 table per store (you need to
-  give different table names then)
-* can optionally compress/decompress the data using zlib (default compression
-  level is 0, which means to not compress)
+* can either use 1 database per store or 1 table per store and you need to
+  give different table names then
+* can optionally compress/decompress the data using zlib: default compression
+  level is 0, which means "do not compress"
  
 `uri` for `create_simple_mapping` looks like e.g.::
 
@@ -1184,7 +1171,7 @@
 
 kc store
 --------
-Features:
+Features::
 
 * uses a Kyoto Cabinet file for storage
 * very fast
@@ -1204,7 +1191,7 @@
 
 kt store
 --------
-Features:
+Features::
 
 * uses a Kyoto Tycoon server for storage
 * fast
@@ -1217,12 +1204,11 @@
 
 memory store
 --------------
-Features:
+Features::
 
 * keeps everything in RAM
-* definitely not for production use
+* if your system or the moin process crashes, all data is lost, so definitely not for production use
 * mostly intended for testing
-* if your system or the moin process crashes, you'll lose everything
 * single process only
 
 .. todo:
@@ -1232,7 +1218,7 @@
 
 fileserver backend
 ------------------
-Features:
+Features::
 
 * exposes a part of the filesystem as read-only wiki items
 
@@ -1249,7 +1235,7 @@
 
 Sending E-Mail
 --------------
-Moin can optionally send E-Mail. Possible uses:
+Moin can optionally send E-Mail. Possible uses::
 
 * send out item change notifications.
 * enable users to reset forgotten passwords
@@ -1291,7 +1277,7 @@
 Framework Configuration
 =======================
 
-Some stuff you may want to configure for Flask and its extensions (see
+Things you may want to configure for Flask and its extensions (see
 their docs for details)::
 
  # for Flask
@@ -1313,13 +1299,13 @@
 =====================
 
 By default, logging is configured to emit output on `stderr`. This will work
-well for the built-in server (it will just show up on the console) or for Apache2 and similar
+well for the built-in server (it will show up on the console) or for Apache2 and similar
 (logging will be put into error.log).
 
 Logging is very configurable and flexible due to the use of the `logging`
 module of the Python standard library.
 
-The configuration file format is described there:
+The configuration file format is described there::
 
 http://www.python.org/doc/current/library/logging.html#configuring-logging
 
@@ -1328,7 +1314,7 @@
 `docs/examples/config/logging/` directory.
 
 Logging configuration needs to be done very early, usually it will be done
-from your adaptor script (e.g. moin.wsgi)::
+from your adaptor script, e.g. moin.wsgi::
 
     from MoinMoin import log
     log.load_config('wiki/config/logging/logfile')
@@ -1336,6 +1322,6 @@
 You have to fix that path to use a logging configuration matching your
 needs.
 
-Please note that the logging configuration has to be a separate file (don't
-try this in your wiki configuration file)!
+Please note that the logging configuration has to be a separate file, so don't
+try this in your wiki configuration file!
 
--- a/docs/admin/index.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/admin/index.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -5,21 +5,21 @@
 General
 =======
 MoinMoin relies strongly on indexes that accelerate access to item metadata and
-data, and make it possible to have simple backends, because the index layer
+data, and makes it possible to have simple backends, because the index layer
 is doing all the hard and complex work.
 
 Indexes are used internally for many operations like item lookup, history,
-iterating over items, search (also for interactive searches), etc.
+iterating over items, search, interactive search, etc.
 
 MoinMoin won't be able to start with damaged, inaccessible or non-existing indexes.
-As a result, you'll need to configure and initialize indexing correctly first.
+As a result, you will need to configure and initialize indexing correctly first.
 
 moin will automatically update the index when items are created, updated, deleted,
-destroyed, or renamed (via the storage api of moin, indexing layer or above).
+destroyed, or renamed via the storage api of moin, indexing layer or above.
 
 Configuration
 =============
-Your wiki config needs ``index_dir`` to point to a writable directory - a fast,
+Your wiki config needs ``index_dir`` to point to a writable directory. A fast,
 local filesystem is preferred.
 Use something like::
 
@@ -46,10 +46,8 @@
 
 **Note:** the moin WSGI application needs an index to successfully start up.
 As the moin index-* script commands are also based on the moin WSGI application,
-this can lead to a chicken and the egg problem.
-
-To solve this, the moin command has a ``-i`` (``--index-create``) option that
-will trigger index creation on startup.
+this can lead to a chicken and egg problem. To solve this, the moin command has 
+a ``-i`` (``--index-create``) option that will trigger index creation on startup.
 
 Additionally, if the storage is also non-existent yet, one might also need
 ``-s`` (``--storage-create``) to create an empty storage on startup.
@@ -62,12 +60,12 @@
 * For big wikis, this can take rather long; consider using --tmp.
 * index-build does NOT clear the index at the beginning.
 * index-build does not check the current contents of the index. Therefore you must not run
-  index-build multiple times for the same data / same wiki.
+  index-build multiple times for the same data or the same wiki.
 
 moin index-update
 -----------------
 Compare an index to the current storage contents and update the index as
-needed (add, remove, update stuff) to reflect the current storage contents.
+needed (add, remove, update) to reflect the current storage contents.
 
 **Note:** You can use this after building at the tmp location to get
 the changes that happened to the wiki while building the index as well. You can run
@@ -102,15 +100,15 @@
     moin index-create --storage-create --index-create
     moin index-create -s -i  # same, but shorter
 
-Storage and index are now initialized (both empty).
+Storage and index are now initialized and both empty.
 
-If you add data to your wiki, the index will get updated on the fly.
+If you add data to your wiki, the index will get updated automatically.
 
 
 If your wiki has data and is shut down
 --------------------------------------
-If index needs a rebuild for some reason (e.g. index lost, index damaged,
-incompatible upgrade, etc.), use::
+If index needs a rebuild for some reason, e.g. index lost, index damaged,
+incompatible upgrade, etc., use::
 
     moin index-create -i
     moin index-build  # can take a while...
@@ -123,10 +121,10 @@
      moin index-create -i --tmp
      moin index-build --tmp  # can take a while...
      moin index-update --tmp  # should be quicker, make sure we have 99.x%
-     # better shut down the wiki now (or at least make sure it is not changed)
-     moin index-update --tmp  # make sure we have indexed ALL content - should be even quicker.
+     # better shut down the wiki now or at least make sure it is not changed
+     moin index-update --tmp  # make sure we have indexed all content, should be even quicker.
      moin index-move  # instantaneously
-     # start the wiki again (or allow changes now again)
+     # start the wiki again or allow changes now again
 
 **Note:** Indexing puts load onto your server, so if you like to do regular
 index rebuilds, schedule them at some time when your server is not too busy.
@@ -136,13 +134,11 @@
 =================================
 If you run a wiki farm (multiple related wikis), you may share the index
 between the wikis, so users will be able to search in one wiki
-and also see results from the others.
+and also see results from the other wikis.
 
-Before you start, you must prepare your wiki configs.
-
-For example, imagine a company that uses 2 "farm" wikis: ``Sales``, ``Engineering``
-
-Their respective wiki configs would look like:
+Before you start, you must prepare your wiki configs. For example, for a company 
+that uses two farm wikis, such as ``Sales`` and ``Engineering``, Their respective 
+wiki configs could look like:
 
 ``Sales``::
 
@@ -157,11 +153,11 @@
 Now do the initial index building::
 
      moin index-create -i  # create an empty index
-     # now ADD stuff from all your wikis:
+     # now add the indexes from both other wikis:
      moin index-build  # with Sales wiki configuration
      moin index-build  # with Engineering wiki configuration
 
-Now you should have a shared index for all these wikis.
+Now you should have a shared index for all wikis.
 
 **Note:** Do not build indexes for multiple wikis in parallel. This is not
 supported.
--- a/docs/admin/install.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/admin/install.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -6,16 +6,16 @@
 ===========
 For moin2, there is currently no packaged download available, so you have to get
 it from the repository.
-You can use one of two repository URLs (there is little difference between them),
-and either use Mercurial to keep a constantly updated copy of the code or download an archive of the files in tar.gz format:
+You can use one of two repository URLs and either use Mercurial to keep a 
+constantly updated copy of the code or download an archive of the files in tar.gz format:
 
-Using Mercurial to clone one of our repos::
+Using Mercurial to clone one of the repositories::
 
  hg clone http://hg.moinmo.in/moin/2.0 moin-2.0
  OR
  hg clone http://bitbucket.org/thomaswaldmann/moin-2.0 moin-2.0
 
-Now make sure your work dir is using the default branch::
+Now make sure your work directory is using the default branch::
 
  hg up -C default
 
@@ -30,16 +30,16 @@
 -----------------
 Using your standard Python install or a virtualenv directory
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Please make sure you have `virtualenv` installed (it includes `pip`).
+Please make sure you have `virtualenv` installed, it includes `pip`.
 
 If you just want to run moin in-place in your mercurial working directory
 with your normal system installation of Python, run the following command
-from your mercurial moin2 working directory (you should not run this as an
-administrator/root user; use your standard user account)::
+from your mercurial moin2 working directory. You should not run this as an
+administrator or root user; use your standard user account::
 
- ./quickinstall  # for Linux (or other posix OS's)
+ ./quickinstall  # for Linux or other POSIX OSes
  # or
- quickinstall.bat  # for windows
+ quickinstall.bat  # for Windows
 
 This will use virtualenv to create a directory `env/` within the current directory,
 create a virtual environment for MoinMoin and then install moin2 including all dependencies into that directory.
@@ -53,12 +53,12 @@
 Further, the quickinstall script will create a `moin` script for your
 platform which you can use for starting the built-in server or invoke moin script commands.
 
-After you activated the virtual environment, the built-in server script (named `moin`) will be in the standard PATH,
-so you can just run the command `moin` verbatim on the command line.
+After you activated the virtual environment, the built-in server script, which is named 
+`moin`, will be in the standard PATH, so you can just run the command `moin` on the command line.
 
-Note: in this special mode, it won’t copy the MoinMoin code to the env/ directory,
-it will run everything from your work dir, so you can modify code and directly try it out
-(you only need to do this installation procedure once).
+**Note:** in this special mode, it won't copy the MoinMoin code to the env/ directory,
+it will run everything from your work dir, so you can modify code and directly try it out.
+You only need to do this installation procedure once.
 
 Using a different Python or a different virtualenv directory
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -85,16 +85,16 @@
  env\Scripts\activate.bat  # for windows
 
 As you have activated the virtual env now, the moin command should be in your
-path now, so you can just invoke it using "moin".
+path now, so you can invoke it using "moin".
 
 Letting moin find the wiki configuration
 ----------------------------------------
 
 moin needs to find the wiki configuration. If you want it to run in the most
-simple way (without giving parameters to the moin command), it is easiest if
-you are in the same directory as the configuration files (e.g. wikiconfig.py).
+simple way without giving parameters to the moin command, it is easiest if
+you are in the same directory as the configuration files, e.g. wikiconfig.py.
 
-If you are working from a repository workdir, this is just the top level
+If you are working from a repository workdir, this is the top level
 directory and there is already a ready-to-use wikiconfig.py.
 
 In case you want to just give the configuration file location, make sure you
@@ -108,11 +108,11 @@
 
 Initializing index and/or storage
 ---------------------------------
-If you have an existing storage AND a valid index (for this storage’s content, and for this moin version),
+If you have an existing storage AND a valid index (for this storage’s content and for this moin version),
 you can skip this section.
 
-If you start from scratch (no storage created yet, and no index created yet),
-you need to create an (empty) storage and an (empty) index::
+If you start from scratch, ie no storage and no index created yet,
+you need to create an empty storage and an empty index::
 
  # create storage and index:
  moin index-create -s -i
@@ -135,14 +135,14 @@
 
 Installing PIL
 ~~~~~~~~~~~~~~
-For some image processing functions that MoinMoin uses (like resizing, rotating),
-you need PIL (Python Imaging Library).
+For some image processing functions that MoinMoin uses like resizing and rotating,
+you need PIL, which is the Python Imaging Library.
 
 Windows users who want to install PIL should skip the remainder of this section and read
 Troubleshooting -- PIL Installation Under Windows below.
 
-If you install PIL with pip, pip will try to find a jpeg support library and associated development
-headers on your system and if you do not have that, there will be no jpeg support in PIL.
+If you install PIL with pip, then pip will try to find a jpeg support library and associated development
+headers on your system and if you do not have them, there will be no jpeg support in PIL.
 So, if you want jpeg support, make sure you have the jpeg libs/headers::
 
  # install jpeg library and development headers:
@@ -151,7 +151,7 @@
 
 Now activate your virtual environment and install PIL into it::
 
- pip install pil # for linux (or other posix OSes)
+ pip install pil # for Linux or other POSIX OSes
 
 Troubleshooting
 ---------------
@@ -161,7 +161,7 @@
 Now and then, PyPi might be down or unreachable.
 
 There are mirrors b.pypi.python.org, c.pypi.python.org, d.pypi.python.org
-you can use in such cases, you just need to tell pip to do so::
+you can use in such cases. You just need to tell pip to do so::
 
  # put this into ~/.pip/pip.conf
  [global]
@@ -178,7 +178,7 @@
 ~~~~~~~~~~~~~~~~~~~~~~
 If you have a poor or limited network connection, you may run into trouble with the commands issued by
 the quickinstall script.
-You may see tracebacks from pip, timeout errors, etc. (see the output of the quickinstall script).
+You may see tracebacks from pip, timeout errors, etc. See the output of the quickinstall script.
 
 If this is the case, try it manually::
 
@@ -188,11 +188,11 @@
  # confirm the problems by running:
  pip install -e .
 
-Now install each package into your virtual env manually:
+Now install each package into your virtual env manually::
 
 * Find the required packages by looking at "install_requires" within `setup.py`.
 * Download each required package from http://pypi.python.org/
-* Install each of them individually by::
+* Install each of them individually::
 
     pip install package.tar
 
@@ -205,8 +205,8 @@
 PIL Installation Under Windows
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 PIL version 1.1.7 does not install correctly via "pip install pil" on Windows.
-Some users have had success using "pip install pillow" (a fork of PIL fixing
-a packaging issue).  Other users have resorted to installing PIL 1.1.6 in the
+Some users have had success using "pip install pillow", a fork of PIL fixing
+a packaging issue. Other users have resorted to installing PIL 1.1.6 in the
 main Python directory using the Windows installers available at
 http://www.pythonware.com/products/pil/
 
--- a/docs/admin/requirements.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/admin/requirements.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -26,6 +26,6 @@
 
 For dependency information, please see setup.py.
 
-If you use easy_install or pip (or our ``quickinstall`` script),
+If you use easy_install or pip or our ``quickinstall`` script, then
 dependencies are usually automatically dealt with.
 
--- a/docs/admin/serve.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/admin/serve.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -4,20 +4,20 @@
 
 Built-in Web Server (easy)
 ==========================
-Moin comes with a simple built-in web server (powered by Werkzeug), which
+Moin comes with a simple built-in web server powered by Werkzeug, which
 is suitable for development, debugging, and personal and small group wikis.
 
 It is *not* made for serving bigger loads, but it is easy to use.
 
 Please note that by default the built-in server uses port 8080. As this is
 above port 1024, root (Administrator) privileges are not required and we strongly
-recommend that you use a normal (unprivileged) user account instead. If you
-are running a desktop wiki or doing moin development, just use your normal
+recommend that you use a normal, unprivileged user account instead. If you
+are running a desktop wiki or doing moin development, then use your normal
 login user.
 
 Running the built-in server
 ---------------------------
-Then you can run the moin built-in server by::
+Run the moin built-in server as follows::
 
  # easiest for debugging (single-process, single-threaded server):
  moin
@@ -42,8 +42,8 @@
 
 External Web Server (advanced)
 ==============================
-We won't go into details about this, because every web server software is
-different and has its own documentation (please read it). Also, in general,
+We won't go into details about using moin under an external web server, because every web server software is
+different and has its own documentation, so please read the documentation that comes with it. Also, in general,
 server administration requires advanced experience with the operating system,
 permissions management, dealing with security, the server software, etc.
 
@@ -53,11 +53,11 @@
  from MoinMoin.app import create_app
  application = create_app('/path/to/config/wikiconfig.py')
 
-MoinMoin is a Flask application (Flask is a micro framework for WSGI apps),
-so we recommend you just read Flask's good deployment documentation.
+MoinMoin is a Flask application, which is a micro framework for WSGI applications,
+so we recommend you read Flask's good deployment documentation.
 
-Make sure you use `create_app()` as shown above to create the
-application (you can't just import the application from MoinMoin).
+Make sure you use `create_app()` as shown above to create the application, 
+because you can't import the application from MoinMoin.
 
 Continue reading here: http://flask.pocoo.org/docs/deploying/
 
@@ -69,5 +69,5 @@
 
 When the test app starts doing something other than Server Error 500, please
 proceed with the MoinMoin app and its configuration.
-Otherwise, read your web server error log files.
+Otherwise, read your web server error log files to troubleshoot the issue from there.
 
--- a/docs/admin/upgrade.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/admin/upgrade.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -8,7 +8,7 @@
    moin 2.0 is *not* just a +0.1 step from 1.9 (like 1.8 -> 1.9), but the
    change of the major version number is indicating *major and incompatible changes*.
 
-   So please consider it to be a different and incompatible piece of software that tries
+   So please consider it to be different and incompatible software that tries
    to be compatible in some areas:
 
    * Server and wiki engine Configuration: expect to review/rewrite it
@@ -19,10 +19,9 @@
 
 From moin < 1.9
 ===============
-As MoinMoin 1.9.x has been out there for quite a while, we only describe how
-to upgrade from moin 1.9.x to moin2. If you still run an older moin
-version than 1.9, please first upgrade to moin 1.9.x. You may want to run 1.9.x for a
-while, so you can be sure everything is working as expected.
+If you run an older moin version than 1.9, please first upgrade to moin 1.9.x
+before upgrading to moin2. 
+You may want to run 1.9.x for a while to be sure everything is working as expected.
 
 Note: Both moin 1.9.x and moin2 are WSGI applications.
 Upgrading to 1.9 first also makes sense concerning the WSGI / server side.
@@ -33,14 +32,14 @@
 Backup
 ------
 Have a backup of everything, so you can go back in case it doesn't do what
-you expect. If you have a 2nd machine, it is a good idea to try it there
-first (and not directly modify your production machine).
+you expect. If you have a testing machine, it is a good idea to try it there
+first and not directly modify your production machine.
 
 
 Install moin2
 -------------
-Install and roughly configure moin2, make it work, and start configuring it from
-the moin2 sample config (do *not* just use your 1.9 wikiconfig).
+Install and configure moin2, make it work, and start configuring it from
+the moin2 sample config. Do *not* just use your 1.9 wikiconfig.
 
 
 Adjusting the moin2 configuration
@@ -65,9 +64,9 @@
 ---------------------------
 It is a good idea to clean up your 1.9 data first, before trying to import
 it into moin2. In doing so you can avoid quite some
-warnings that the importer would otherwise produce.
+warnings that the moin2 importer would produce.
 
-You do this with moin *1.9* (!), using these commands::
+You do this with moin *1.9*, using these commands::
 
   moin ... maint cleanpage
   moin ... maint cleancache
@@ -78,27 +77,27 @@
 
 Importing your moin 1.9 data
 ----------------------------
-It is assumed that you have no moin2 storage and no index created yet.
-Thus, we include -s and -i options to create the storage and an empty index.
+Assuming you have no moin2 storage and no index created yet, include the 
+-s and -i options to create the storage and an index.
 
 The import19 argument to the `moin` script will then read your 1.9 data_dir (pages, attachments and users),
-convert the data as needed, and write it to your moin2 storage (and also
-build the index)::
+convert the data as needed, and write it to your moin2 storage and also
+build the index::
 
   moin import19 -s -i --data_dir /your/moin/1.9/data 1>import1.log 2>import2.log
 
-If you use the command as given, it will write all output into 2 log files.
+If you use the command as given, it will write all output into two log files.
 Please review them to find out whether the importer had critical issues with your
 data.
 
 
 Testing
 -------
-Just start moin now, as it should have your data available.
+Start moin now, as it should have your data available.
 
-Try "Index" and "History" views to see what's there.
+Try "Index" and "History" views to see what is included.
 
-Check whether your data is complete and working OK.
+Check whether your data is complete and working fine.
 
 If you find issues with data migration from moin 1.9 to 2, please check the
 moin2 issue tracker.
@@ -106,7 +105,6 @@
 
 Keep your backups
 -----------------
-Make sure you keep all backups of your moin 1.9 installation (code, config,
-data), just in case you are not happy with moin2 and need to go back for
-some reason.
+Make sure you keep all backups of your moin 1.9 installation, such as code, config,
+data, just in case you are not happy with moin2 and need to revert to the old version.
 
--- a/docs/conf.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/conf.py	Wed Jul 04 21:53:24 2012 +0400
@@ -18,6 +18,7 @@
 # documentation root, use os.path.abspath to make it absolute, like shown here.
 #sys.path.insert(0, os.path.abspath('..'))
 
+
 # -- General configuration -----------------------------------------------------
 
 # If your documentation needs a minimal Sphinx version, state it here.
@@ -224,6 +225,7 @@
     ('index', 'moinmoin', u'MoinMoin Documentation', [u'The MoinMoin developers'], 1),
 ]
 
+
 # -- Options for Texinfo output ------------------------------------------------
 
 # Grouping the document tree into Texinfo files. List of tuples
--- a/docs/devel/development.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/devel/development.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -4,66 +4,65 @@
 
 Project Organisation
 ====================
-We mainly use IRC and the wiki for communication, documentation and
-planning.
+We mainly use IRC and the wiki for communication, documentation and planning.
 
-IRC channels (on chat.freenode.net):
+IRC channels on chat.freenode.net::
 
 * #moin-dev (core development topics)
 * #moin (user support, extensions)
 
-Wikis:
+Wikis::
 
 * http://moinmo.in/
 
-Documentation:
+Documentation::
 
 * http://readthedocs.org/docs/moin-20/en/latest/
 
-Issue tracker:
+Issue tracker::
 
 * http://bitbucket.org/thomaswaldmann/moin-2.0/issues
 
-Code Repositories:
+Code Repositories::
 
-* http://hg.moinmo.in/moin/2.0 (main repository)
-* http://bitbucket.org/thomaswaldmann/moin-2.0 (bb mirror for your
-  convenience, simplifying forking and contributing)
+* http://hg.moinmo.in/moin/2.0 - main repository
+* http://bitbucket.org/thomaswaldmann/moin-2.0 - bitbucket mirror for your
+  convenience, simplifying forking and contributing
 
-We use Mercurial DVCS (hg) for distributed version control.
+We use Mercurial DVCS for distributed version control.
 
-If you are not using Mercurial, you can of course also just send us patches.
+If you are not using Mercurial, you can still submit patches.
 In that case, open an issue in the issue tracker and attach the patch there.
 
-Code review:
+Code review::
 
 Please use http://codereview.appspot.com/ for getting feedback on moin-related
-code (especially if you want to contribute or publish that code).
+code, especially if you want to contribute or publish that code.
 
-If you are using a local mercurial repository/workdir you can very easily
-upload your uncommitted workdir state to codereview (using their "upload.py").
+If you are using a local mercurial repository/workdir, you can very easily
+upload your uncommitted workdir state to codereview using their "upload.py".
 
-Then just ask on the IRC channel for review (give the codereview URL).
+Then just ask on the IRC channel for review and provide the codereview URL.
 
 MoinMoin architecture
 =====================
-moin2 is a WSGI application and uses:
+moin2 is a WSGI application and uses::
 
 * flask as framework
 
-  - flask-script for commandline scripts
+  - flask-script for command line scripts
   - flask-babel / babel / pytz for i18n/l10n
   - flask-themes for theme switching
   - flask-cache as cache storage abstraction
-* werkzeug for lowlevel web/http stuff, debugging, builtin server, etc.
-* jinja2 for templating (theme, user interface)
+* werkzeug for low level web/http page serving, debugging, builtin server, etc.
+* jinja2 for templating, such as the theme and user interface
 * flatland for form data processing
-* EmeraldTree for xml / tree processing
+* EmeraldTree for xml and tree processing
 * blinker for signalling
 * pygments for syntax highlighting
-* for stores: filesystem, sqlite3, sqlalchemy, kyoto cabinet/tycoon, ...
+* for stores: filesystem, sqlite3, sqlalchemy, kyoto cabinet/tycoon, memory
 * jquery javascript lib
-* CKeditor - GUI editor for (x)html
+* CKeditor, the GUI editor for (x)html
 * TWikiDraw, AnyWikiDraw, svgdraw drawing tools
 
 .. todo::
@@ -73,21 +72,20 @@
 
 How MoinMoin works
 ==================
-This is just a very high level overview about how moin works. If you would like
-to acquire a more in-depth understanding, try reading more docs and code.
+This is a very high level overview about how moin works. If you would like
+to acquire a more in-depth understanding, please read the other docs and code.
 
 WSGI application creation
 -------------------------
-First, the moin Flask application is created (see `MoinMoin.app.create_app`) -
-this will:
+First, the moin Flask application is created; see `MoinMoin.app.create_app`::
 
 * load the configuration (app.cfg)
 * register some modules that handle different parts of the functionality
 
-  - MoinMoin.apps.frontend - most stuff a normal user uses
-  - MoinMoin.apps.admin - some stuff for admins
-  - MoinMoin.apps.feed - feeds (e.g. atom)
-  - MoinMoin.apps.serve - serving some configurable static 3rd party stuff
+  - MoinMoin.apps.frontend - most of what a normal user uses
+  - MoinMoin.apps.admin - for admins
+  - MoinMoin.apps.feed - feeds, e.g. atom
+  - MoinMoin.apps.serve - serving some configurable static third party code
 * register before/after request handlers
 * initialize the cache (app.cache)
 * initialize index and storage (app.storage)
@@ -99,66 +97,66 @@
 
 Request processing
 ------------------
-Let's look at how it shows a wiki item:
+Let's look at how it shows a wiki item::
 
 * the Flask app receives a GET request for /WikiItem
 * Flask's routing rules determine that this request should be served by
   `MoinMoin.apps.frontend.show_item`.
-* Flask calls the before request handler of this module, which:
+* Flask calls the before request handler of this module, which::
 
-  - sets up the user as flaskg.user (anon user or logged in user)
+  - sets up the user as flaskg.user - an anonymous user or logged in user
   - initializes dicts/groups as flaskg.dicts, flaskg.groups
-  - initializes jinja2 environment (templating)
+  - initializes jinja2 environment - templating
 * Flask then calls the handler function `MoinMoin.apps.frontend.show_item`,
-  which
+  which::
 
   - creates an in-memory Item
 
     + by fetching the item of name "WikiItem" from storage
-    + it looks at the mimetype of this item (stored in metadata)
-    + it creates an appropriately typed Item instance (depending on the mimetype)
+    + it looks at the contenttype of this item, which is stored in the metadata
+    + it creates an appropriately typed Item instance, depending on the contenttype
   - calls Item._render_data() to determine what the rendered item looks like
     as HTML
-  - renders the `show_item.html` template (and gives it the rendered item html)
+  - renders the `show_item.html` template and returns the rendered item html
   - returns the result to Flask
 * Flask calls the after request handler which does some cleanup
 * Flask returns an appropriate response to the server
 
 Storage
 -------
-Moin supports different stores (like storing directly into files /
-directories, using key/value stores, using an SQL database, etc. - see
-`MoinMoin.storage.stores`). A store is extremly simple: just store a value
+Moin supports different stores, like storing directly into files /
+directories, using key/value stores, using an SQL database etc, see
+`MoinMoin.storage.stores`. A store is extremely simple: store a value
 for a key and retrieve the value using the key + iteration over keys.
 
 A backend is one layer above. It deals with objects that have metadata and
-data (see `MoinMoin.storage.backends`) - still very simple stuff.
+data, see `MoinMoin.storage.backends`.
 
-Above that, there is miscellaneous stuff in `MoinMoin.storage.middleware` for:
+Above that, there is miscellaneous functionality in `MoinMoin.storage.middleware` for::
 
-* routing by name to some specific backend (like fstab / mount)
+* routing by name to some specific backend, like fstab / mount
 * indexing metadata and data + comfortable and fast index-based access,
   selection and search
-* protecting stuff by ACLs (access control lists)
+* protecting items by ACLs (Access Control Lists)
 
 DOM based transformations
 -------------------------
-But how does moin know what the HTML rendering of an item looks like?
+How does moin know what the HTML rendering of an item looks like?
 
-Each Item has some mimetype (stored in metadata) - the input mimetype.
-We also know what we want as output - the output mimetype.
+Each Item has some contenttype that is stored in the metadata, also called the input contenttype.
+We also know what we want as output, also called the output contenttype.
 
 Moin uses converters to transform the input data into the output data in
 multiple steps. It also has a registry that knows all converters and their supported
-input and output mimetypes.
+input and output mimetypes / contenttypes.
 
-For example, if the mimetype is `text/x-moin-wiki`, it will find that the input
-converter handling this is the one defined in `converter.moinwiki_in`. It then
-feeds the data of this item into this converter. The converter parses this
-input and creates an in-memory `dom tree` representation from it.
+For example, if the contenttype is `text/x-moin-wiki;charset=utf-8`, it will
+find that the input converter handling this is the one defined in
+`converter.moinwiki_in`. It then feeds the data of this item into this
+converter. The converter parses this input and creates an in-memory `dom tree`
+representation from it.
 
-This dom tree is then transformed through multiple dom-to-dom converters for
-e.g.:
+This dom tree is then transformed through multiple dom-to-dom converters for example::
 
 * link processing
 * include processing
@@ -166,7 +164,7 @@
 * macros
 
 Finally, the dom-tree will reach the output converter, which will transform it
-into the desired output format, e.g. `text/html`.
+into the desired output format, such as `text/html`.
 
 This is just one example of a supported transformation. There are quite a few 
 converters in `MoinMoin.converter` supporting different input formats,
@@ -175,27 +173,29 @@
 Templates and Themes
 --------------------
 Moin uses jinja2 as its templating engine and Flask-Themes as a flask extension to
-support multiple themes (each theme has static data like css and templates).
+support multiple themes, each theme has static data like css and templates.
 
 When rendering a template, the template is expanded within an environment of
-values it can use. In addition to this (general) environment, parameters can
+values it can use. In addition to this general environment, parameters can
 also be given directly to the render call.
 
 Testing
 =======
 
-We use py.test for automated testing (it is currently automatically installed
-into your virtualenv as a dependency).
+We use py.test for automated testing. It is currently automatically installed
+into your virtualenv as a dependency.
 
 Running the tests
 -----------------
 To run the tests, activate your virtual env and invoke py.test from the
 toplevel directory::
 
-    py.test  # runs all tests
-    py.test -rs  # runs all tests and outputs infos about skipped tests
-    py.test -k somekeyword  # just run the tests matching somekeyword
-    py.test sometests.py  # just run the tests contained in sometests.py
+    make test  # easiest way (all tests, pep8, skipped info)
+    py.test --pep8  # run all tests, including pep8 checks
+    py.test -rs  # run all tests and outputs information about skipped tests
+    py.test -k somekeyword  # run the tests matching somekeyword only
+    py.test --pep8 -k pep8  # runs pep8 checks only
+    py.test sometests.py  # run the tests contained in sometests.py
 
 Tests output
 ------------
@@ -207,19 +207,18 @@
     F test failed
     x test was expected to fail (xfail)
 
-If something went wrong, you'll also see some traceback and stdout/stderr.
+If something went wrong, you will also see some traceback and stdout/stderr.
 
 Writing tests
 -------------
-Writing tests with `py.test` is easy and has little overhead. You basically just
-use `assert` statements.
+Writing tests with `py.test` is easy and has little overhead. Just
+use the `assert` statements.
 
-For more information, please read http://pytest.org/ - but keep in
-mind that we currently still use **py.test 1.3.4**.
+For more information, please read: http://pytest.org/
 
 Documentation
 =============
-We use Sphinx (see http://sphinx.pocoo.org/) and reST markup for documenting
+Sphinx (http://sphinx.pocoo.org/) and reST markup are used for documenting
 moin. Documentation reST source code, example files and some other text files
 are located in the `docs/` directory in the source tree.
 
--- a/docs/devel/support.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/devel/support.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -3,7 +3,7 @@
 
 Free Support
 ------------
-You can get free support and informations there:
+You can get free support and information here:
 * on our chat channels, see http://moinmo.in/MoinMoinChat
 * on our wiki, see http://moinmo.in/ - please note that quite a lot of content
   there is about moin 1.x and does not apply to moin2. One page has a lot
@@ -24,7 +24,7 @@
 Commercial Support
 ------------------
 As MoinMoin 2.0 is not released yet, there is no support for production
-systems based on it (we do not recommend that and do not support that).
+systems based on it.
 
 If you want to talk about development topics, please contact the developers.
 
@@ -39,23 +39,23 @@
 
 Found a bug?
 ------------
-* File a bug report on the issue tracker (on bitbucket).
-* Even better: fix the bug, file a bug report and submit a patch (consider
-  adding a unit test)
+* File a bug report on the issue tracker on bitbucket.
+* Even better: fix the bug, file a bug report and submit a patch and consider
+  adding a unit test
 
 Have an idea?
 -------------
-* Discuss it on IRC and file a feature request (on bitbucket).
-* Even better: discuss + write some Python code implementing it.
+* Discuss it on IRC and file a feature request on bitbucket.
+* Even better: discuss and write some Python code implementing it.
 
 Born to code?
 -------------
-* Help to work on moin2 core, so it gets finished faster.
-* Help maintaining moin 1.9 until moin2 is ready.
+* Help to work on moin2 core, so it gets released sooner.
+* Help to maintain moin 1.9 until moin2 is ready.
 
 Loving UI / UX design?
 ----------------------
-* Help us making moin2 look and feel better!
+* Help us make moin2 look and feel better!
 
 Have good language or documentation skills?
 -------------------------------------------
--- a/docs/devel/translate.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/devel/translate.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -7,7 +7,7 @@
 
 To find out if someone has already started a translation of moin2 into your
 language; check the folder MoinMoin/translations in the source tree.
-If there is a folder with your language code (locale) [#]_, you can just
+If there is a folder with your language code (locale) [#]_, you can 
 start with the steps below. If not, please take a look at `If your
 language doesn't exist yet`_.
 
@@ -27,16 +27,16 @@
 3. Open the file ``MoinMoin/translations/<locale>/LC_MESSAGES/messages.po``
    and do your translation. A short explanation of this process follows:
    
-   * find an entry, with an empty or bad translated text (the text after
-     msgstr) and do your changes.
+   * Find an entry with an empty or bad translated text, the text after
+     msgstr, and apply your changes.
    
-   * **never** edit the 'msgid' string, just edit the 'msgstr' field
+   * **never** edit the 'msgid' string, and only edit the 'msgstr' field
    
-   * Variables like ``%(name)x`` (x can be any character) must be kept as
+   * Variables like ``%(name)x``, where x is any character, must be kept as
      they are. They must occur in the translated text.
    
    * For better readability you can divide a text-string over more than
-     one lines, by "surrounding" each line with double quotes (").
+     one line, by "surrounding" each line with double quotes (").
      It is a usual convention to have a maximal line-length of 80
      characters.
    
@@ -52,12 +52,10 @@
      translator.
      
      An important flag is "fuzzy". It shows that the msgstr string might
-     not be a correct translation (anymore). Only the translator can
+     not be a correct translation. Only the translator can
      judge if the translation requires further modification, or is
-     acceptable as is. Once satisfied with the translation, he/she then
+     acceptable as it is. Once satisfied with the translation, he/she then
      removes this fuzzy attribute.
-     
-     
 
 4. Save the messages.po file and execute::
 
@@ -66,8 +64,8 @@
 
 Guidelines for translators
 ``````````````````````````
-In languages where a separate polite form of address exists (like the
-German "Sie"/"Du") always use the polite form.
+In languages where a separate polite form of address exists, like the
+German "Sie"/"Du", always use the polite form.
 
    
 If your language doesn't exist yet
@@ -87,26 +85,26 @@
 
        python setup.py init_catalog -l <locale>
    
-2. Adjust the ``MoinMoin/translations/<locale>/LC_MESSAGES/messages.po`` .
+2. Adjust the ``MoinMoin/translations/<locale>/LC_MESSAGES/messages.po``.
 
    Follow the instructions in `First steps with a new *.po file`_ and
    then you can remove the fuzzy flag, which prevents the file from
    being compiled.
 
-3. Follow the steps above (`If your language already exists`_).
+3. Follow the steps above, see `If your language already exists`_.
 
 First steps with a new ``*.po`` file
 ````````````````````````````````````
 
-A newly created translation needs a few initial preparations.
+A newly created translation needs a few initial preparations::
 
 * replace "``PROJECT``" with "``MoinMoin 2``"
 
 * replace "``FIRST AUTHOR <EMAIL@ADDRESS>``" with the appropriate information
-  about you
+  about yourself
 
 * replace "``PROJECT VERSION``" in the head msgstr with
-  "``MoinMoin 2.0``" (or newer if neccessary)
+  "``MoinMoin 2.0``" or newer if neccessary
   
 * change the value of "``Last-Translator``" to your data
 
@@ -124,28 +122,28 @@
 
 If the translatable string contains a variable plural, that means
 the string contains an object which you don't know the exact quantity
-of at the time of writing the code, then you will have to use
+of, then you will have to use
 ``ngettext()``. Note that this is not only needed for the decision
 between one and more objects, because other languages have other
-(and more difficult) plurals than English. The usage is
+and more difficult plurals than English. The usage is
 ``ngettext(singular, plural, num, **variables)``. ``**variables``
-enables you to use the newstyle form just as explained above.
+enables you to use the newstyle form as explained above.
 
 For example:
 ``ngettext("%(number)d file removed from %(directory)s", "%(number)d files removed from %(directory)s", num=n, number=n, directory=directory)``
 
-``n`` has to appear twice because the first gives ngettext information
+``n`` has to appear twice because the first gives ngettext() information
 about the exact number and the second is the variable for the format
 string replacement.
 
-If you made changes to any gettext string, please update the .pot file
+If you made changes to any gettext() string, please update the .pot file
 using::
 
     python setup.py extract_messages
 
-Because this sometimes creates large diffs, just because of a slight
+Because this sometimes creates large diffs, just because of a
 change in line numbers, you can of course use this command sparingly.
-Another option (for better readability) is to do a separate commit
+Another option for better readability is to do a separate commit
 for this.
 
 
--- a/docs/intro/features.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/intro/features.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -1,20 +1,19 @@
 ========
 Features
 ========
-We recommend trying out moin rather than reading feature lists.
-But in case you still need one, here it is:
 
 Operating System Support
 ========================
-Moin is implemented in Python, a platform-independant language.
-It works on Linux, Mac OS X, Windows (among other operating systems).
+Moin is implemented in Python, a platform-independent language.
+It works on Linux, Mac OS X, Windows, FreeBSD and other OSes that support
+Python.
 
 That said, Linux is the preferred and most tested deployment platform and
 will likely have fewer issues than, for example, Windows.
 
 Servers
 =======
-* Builtin Python server (from werkzeug) - easy to use, just start it.
+* Builtin Python server from werkzeug, which is easy to use.
 * Any server that talks WSGI to moin:
 
   - Apache2 with mod_wsgi
@@ -31,19 +30,19 @@
 
 Authentication
 ==============
-* Builtin (username / password login form of moin, MoinAuth)
-* Builtin HTTP Basic Auth (browser login form, HTTPAuthMoin)
-* OpenID (relying party, OpenIDAuth)
+* Builtin - username / password login form of moin, MoinAuth
+* Builtin HTTP Basic Auth - browser login form, HTTPAuthMoin
+* OpenID - relying party, OpenIDAuth
 * Auth against LDAP / Active Directory (LDAPAuth)
-* Any authentication your web server supports (via GivenAuth)
+* Any authentication your web server supports via GivenAuth
 
 Authorization
 =============
 * Content Access Control Lists (ACLs)
 
-  - global (using a mapping, so you can apply ACLs on parts of the namespace)
-  - local (per wiki item)
-  - give rights like:
+  - global, using a mapping, so you can apply ACLs on parts of the namespace
+  - local, per wiki item
+  - give rights, such as::
 
     + create, destroy
     + read, write, rename
@@ -67,14 +66,14 @@
 =======
 Item Types
 ----------
-* we store data of any type (text, images, audio, binary)
+* we store data of any type, such as text, images, audio, binary
 * we separately store any metadata
 * everything is revisioned
 
 Storage Backend Types
 ---------------------
 * file system
-* sql database (sqlite3 or everything supported by SQLalchemy)
+* sql database, such as sqlite3 or everything supported by SQLalchemy
 * Kyoto Tycoon / Kyoto Cabinet
 * you can easily add your own backend with little code
 
@@ -90,7 +89,7 @@
 * fast indexed search, fast internal operations
 * flexible and powerful search queries
 * search current and historical contents
-* using a shared index, find stuff in any farm wiki
+* using a shared index, find content in any farm wiki
 
 User Interface
 ==============
@@ -110,7 +109,7 @@
 * Local History for one item ("History")
 * Diffs between any revision
 
-  + text item diffs (rendered nicely with html)
+  + text item diffs, rendered nicely with html
   + image diffs
   + binary "diff" (same or not same)
 * Tags / Tag Cloud
@@ -138,13 +137,13 @@
 
 Notification
 ------------
-* by email (smtp or sendmail)
+* by email: smtp or sendmail
 
 Translation / Localization
 --------------------------
-* currently English and German translations only (no others will be added until
-  the code and texts are more stable)
-* any localization (provided by babel / pytz)
+* currently English and German translations only; no others will be added until
+  the code and texts for moin2 are more stable
+* any localization, provided by babel / pytz
 
 Logging
 =======
--- a/docs/intro/general.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/intro/general.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -5,7 +5,7 @@
 About MoinMoin
 --------------
 MoinMoin is a wiki engine written in Python. It is Free and Open Source
-Software under GNU GPL v2+ (for details please read the :ref:`license`).
+Software under GNU GPL v2+. For details please read the :ref:`license`.
 
 Project homepage: http://moinmo.in/
 
@@ -36,18 +36,18 @@
 
 What makes MoinMoin special?
 ----------------------------
-Moin tries to be a **great wiki engine** (good, powerful, extendable and still
-easy-to-use). We don't try to be everything, but we don't try to be
+Moin tries to be a **great wiki engine**, which encompasses: powerful, extendable and
+easy-to-use. We don't try to be everything, but we don't try to be
 minimalistic either.
 
 There are lots of wiki engines out there, making it hard to pick one.
 However, choosing wisely is important because you may have to live with 
-your choice for a long time (switching wiki engines is not easy).
+your choice for a long time because switching wiki engines is not easy.
 
-We won't list all of moin's features right here, because comparing feature lists
+We won't list all of moin's features, because comparing feature lists
 is just not enough. Some features are best left unimplemented, 
 even if they sound great at first. In moin, you will find most
-important features in most major wiki engines - but still, you and your wiki
+important features like in most major wiki engines. But still, you and your wiki
 users might feel quite a different overall experience just because of a bunch
 of small, superficial differences. Of course the quality of some features'
 implementations can vary greatly. Thus, you have to
@@ -58,21 +58,11 @@
 increased their experience with Python and wiki technology over the years.
 With **moin 2.0**, there has been a rather **revolutionary cleanup / rewrite** 
 of how moin works based on that experience. This promises to make it easier,
-cleaner, better, more consistent, more powerful, more flexible, and more
+cleaner, more consistent, more powerful, more flexible and more
 modular.
 
-Moin is **written in Python** - an easy to read, high-level, object-oriented,
-dynamic, well-designed, and platform-independent programming language. It's 
-fun to write clean code with Python!
-
-Even if you are but a mere wiki admin or user, you indirectly
-take advantage of this. Believe it or not, software developers are humans,
-too; if they use a crap programming language that is hard to read, badly
-designed, and requires them to write big amounts of code for even trivial
-things, then it is hard for them to create and maintain a great piece of 
-software.
-
-You even could learn a bit of Python and extend moin as you like!
+Moin is **written in Python**, an easy to read, high-level, object-oriented,
+dynamic, well-designed and platform-independent programming language.
 
 Moin is **Free Software** (that implies that it is **Open Source**) and,
 because we use Python, you may even *like* to read and modify moin's code.
@@ -80,8 +70,7 @@
 
 Who is using MoinMoin?
 ----------------------
-This just shows some of the better-known users of MoinMoin and is by no 
-means a complete list.
+This shows some of the better-known users of MoinMoin::
 
 Web Sites
 ~~~~~~~~~~~~~~
--- a/docs/intro/glossary.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/intro/glossary.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -28,7 +28,7 @@
       revision.
 
    data
-      Just the raw data, no more, no less (can be some text, an image, a pdf).
+      Just the raw data, no more, no less; can be some text, an image, a pdf.
 
    metadata
       Additional information related to or about some data. For example, if
@@ -41,16 +41,16 @@
    session
       As the protocol (http) used by a web browser is stateless, a means
       to keep state is needed. This is usually done by using a cookie stored
-      within the user's browser. It is used e.g. to stay logged-in into your
-      user account or store the trail of items you visited (for easier
-      navigation).
+      within the user's browser. It is used for example to stay logged-in into your
+      user account or store the trail of items you visited and for easier
+      navigation.
 
    wiki engine
       Software used to run a wiki site.
 
    wiki farm
       Running multiple wikis together on one server. Often, there is some
-      shared, common configuration used (inherited) by all wikis, so each
+      shared, common configuration inherited by all wikis, so each
       individual wiki's configuration becomes rather small.
 
    wiki instance
@@ -66,9 +66,9 @@
       A web site implemented using a wiki engine.
 
    WSGI
-      Web Server Gateway Interface. It is a specification about how web servers
-      (like e.g. Apache with mod_wsgi) communicate with web applications (like
-      e.g. MoinMoin). It is a Python standard, described in detail in PEP 333.
+      Web Server Gateway Interface. It is a specification about how web servers,
+      like e.g. Apache with mod_wsgi, communicate with web applications, like
+      MoinMoin. It is a Python standard, described in detail in PEP 333.
 
    emeraldtree
       An XML / tree processing library used by moin.
--- a/docs/intro/license.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/intro/license.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -7,7 +7,7 @@
 For a FAQ about the GPL and a copy of the misc. GPL license versions,
 please see there: http://www.gnu.org/licenses/gpl.html
 
-This is the GNU GPL version 2 (from file docs/licenses/COPYING):
+This is the GNU GPL version 2. From file docs/licenses/COPYING:
 
 .. literalinclude:: ../licenses/COPYING
 
--- a/docs/man/moin.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/man/moin.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -1,7 +1,7 @@
 :orphan:
 
-moin commandline interface
-==========================
+moin command line interface
+===========================
 
 Synopsis
 --------
@@ -12,10 +12,10 @@
 Description
 -----------
 
-:program:`moin` is the commandline interface to miscellaneous moin-related tools.
+:program:`moin` is the command line interface to miscellaneous moin-related tools.
 
-If you just invoke :program:`moin` (without any arguments), it will start the
-builtin server and you'll have moin running! This is just a shortcut for
+If you invoke :program:`moin` without any arguments, it will start the
+builtin server and you'll have moin running! This is a shortcut for
 invoking :program:`moin moin`.
 
 :program:`moin help` will give a list of available subcommands.
@@ -28,7 +28,7 @@
 
 .. todo::
 
-   Describe moin commandline options.
+   Describe moin command line options.
 
 See also
 --------
--- a/docs/user/accounts.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/user/accounts.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -79,11 +79,10 @@
 Change Password
 ---------------
 
-Password changes are recommended if you believe that the password you are using has been put into
-the hands of an untrusted third party.
+Password changes are recommended if you believe that the password you are using has been compromised.
 
 Current Password
- Enter the password which you currently use to log into the wiki. This prevents passersby from
+ Enter the password which you currently use to log into the wiki. This prevents passers-by from
  changing the password of a logged in account. This is a required field.
 
 New Password
--- a/docs/user/markups.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/user/markups.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -17,8 +17,12 @@
 .. _Docbook: http://www.docbook.org/ 
 .. _MediaWiki: http://www.mediawiki.org/wiki/Help:Formatting
 
-In Moin2, you specify the item's markup language when you create the document. Its markup language can also be changed at any time by modifying the item's ``mimetype`` metadata. Currently Moin2 supports `MoinWiki`_, `WikiCreole`_, `reStructuredText`_, `Docbook`_ and `MediaWiki`_ markups.
+In Moin2, you specify the item's markup language when you create the document. 
+Its markup language can also be changed at any time by modifying the item's ``contenttype`` metadata. 
+Currently Moin2 supports `MoinWiki`_, `WikiCreole`_, `reStructuredText`_, `Docbook`_ and `MediaWiki`_ markups.
 
-**MOINTODO**: Currently the use of ``{{{#!syntax content}}}`` parsers crashes moin. This should be looked into.
+**MOINTODO**: Currently the use of ``{{{#!syntax content}}}`` parsers crashes moin. 
+This should be looked into.
 
-**MOINTODO**: The creation of items/editing of an item's metadata is not yet documented. This is beyond the scope of this index page and should be looked into.
+**MOINTODO**: The creation of items/editing of an item's metadata is not yet documented. 
+This is beyond the scope of this index page and should be looked into.
--- a/docs/user/rest.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/user/rest.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -2,15 +2,15 @@
 ReST (ReStructured Text) Markup
 ===============================
 
-The report gives reST syntax documentation. The structure and order has been matched with the other markup rst files namely creolewiki.rst and mediawiki.rst at http://hg.moinmo.in/moin/2.0-dev/file/42d8cde592fb/docs/user
-
-Features currently not working with moin's Wiki parser are marked with **RSTTODO**.
+Features currently not working with moin's ReST parser are marked with **RSTTODO**.
 
 Headings
 ========
 
-Rather than imposing a fixed number and order of section title adornment styles, the order enforced will be the order as encountered.
-The first style encountered will be an outermost title (like HTML H1), the second style will be a subtitle, the third will be a subsubtitle, and so on.
+Rather than imposing a fixed number and order of section title adornment styles, 
+the order enforced will be the order as encountered.
+The first style encountered will be an outermost title (like HTML H1), the second style will be a subtitle, 
+the third will be a subsubtitle, and so on.
 
 **Markup**: ::
 
@@ -161,7 +161,8 @@
     -- Sherlock Holmes
 
 **Notes**
- - A block quote may end with an attribution: a text block beginning with "--", "---", or a true em-dash, flush left within the block quote.
+ - A block quote may end with an attribution: a text block beginning with "--", "---", 
+   or a true em-dash, flush left within the block quote.
  - **RSTTODO** the attribution does not work in moin2.
 
 Lists
@@ -319,7 +320,7 @@
  | C                              |
  +--------------------------------+
  
-**Note** **RSTTODO** C does not extend fully upto the end of D.
+**Note** **RSTTODO** C does not extend fully up to the end of D.
 
 Admonitions
 ===========
@@ -368,7 +369,8 @@
 Literals Blocks
 ===============
 
-Literal blocks are used to show test as-it-is. i.e no markup processing is done within a literal block. A minimum (1) indentation is required for the text block to be recognized as a literal block.
+Literal blocks are used to show text as-it-is. i.e no markup processing is done within a literal block. 
+A minimum (1) indentation is required for the text block to be recognized as a literal block.
 
 **Markup**: ::
 
--- a/docs/user/search.rst	Wed Jul 04 21:51:39 2012 +0400
+++ b/docs/user/search.rst	Wed Jul 04 21:53:24 2012 +0400
@@ -6,23 +6,20 @@
 =======================
 
 Usually there is a simple but rather short search query input field offered by
-the theme - by submiting a query it will search in item names and
-content (but only in the current stuff, not in non-current revisions) and display
+the theme. By submiting a query it will search in item names and
+content, but only in the current contents, not in non-current revisions, and display
 the search results to you.
 
-On the search results view you will get a bigger search query input field
-(e.g. for refining your query) and you may also choose to additionally search
-in non-current item revisions (selecting that will search in all
-revisions).
+On the search results view you will get a bigger search query input field, 
+for example for refining your query, and you may also choose to additionally search
+in non-current item revisions. Selecting that will search in all revisions.
 
 Simple search queries
 =====================
 Just enter one or more words into the query input field and hit ``Enter``.
 
 If your query consists of multiple words, it will only find documents containing ALL those
-words ("AND" is the default).
-
-You can use AND (default), OR, NOT to refine your search.
+words. You can use AND, OR, NOT to refine your search. "AND" is the default.
 
 Examples
 --------
@@ -70,7 +67,7 @@
 
   w*i
 
-You can also use it for poor man's language independant word stemming.
+You can also use it for poor man's language independent word stemming.
 
 Matches on clean, cleaner, cleanest, cleaning, ...::
 
@@ -162,27 +159,27 @@
 
   acl:Joe:+read
 
-Limiting search to a specific wiki (in a wiki farm's shared index)::
+Limiting search to a specific wiki, for example in a wiki farm's shared index::
 
   wikiname:SomeWiki
 
 Notes
 =====
-moin uses indexed search - keep in mind that this has some special properties:
+moin uses indexed search. Keep in mind that this has some special properties:
 
  * By using an index, the search is rather usually fast 
  * Because it is only using an index, it can only find what was put there
  * If you use wildcards or regexes, it will still use the index, but in a different, slower way
 
-E.g.:
+For example::
 
  * "foobar" is put into the index somehow
  * you search for "ooba" - you will not find it, because only "foobar" was put into the index
- * solution: search for "foobar" - fast and will find it
- * solution: search for "*ooba*" or r".*ooba.*" - slow, but will find it
+ * solution: search for "foobar": fast and will find it
+ * solution: search for "*ooba*" or r".*ooba.*": slow, but will find it
 
-More infos
-==========
+More information
+================
 
 See the `Whoosh query language docs <http://packages.python.org/Whoosh/querylang.html>`_.
 
--- a/quickinstall.bat	Wed Jul 04 21:51:39 2012 +0400
+++ b/quickinstall.bat	Wed Jul 04 21:53:24 2012 +0400
@@ -17,4 +17,3 @@
 
 echo Compiling translations (not required if wiki is English only) ...
 python setup.py compile_catalog --statistics
-
--- a/setup.cfg	Wed Jul 04 21:51:39 2012 +0400
+++ b/setup.cfg	Wed Jul 04 21:53:24 2012 +0400
@@ -42,3 +42,16 @@
 [pytest]
 norecursedirs = .hg _build tmp* env* dlc wiki
 minversion = 2.0
+pep8ignore =
+ *.py E121 E122 E123 E124 E125 E126 E127 E128  # continuation line indentation
+ *.py E225  # missing whitespace around operator
+ *.py E261  # less than 2 blanks before inline comment
+ *.py E301 E302  # separate toplevel definitions with 2 empty lines, method defs inside class by 1 empty line
+ *.py E401  # imports on separate lines
+ *.py E501  # maximum line length (default 79 chars)
+ upload.py ALL  # 3rd party (and not in the repo): rietveld upload tool
+ wikiconfig_*.py ALL  # local stuff, not in the repo
+ docs/conf.py ALL  # sphinx stuff, automatically generated, don't check this
+ MoinMoin/util/md5crypt.py ALL  # 3rd party stuff, don't check this
+ MoinMoin/util/_tests/test_paramparser.py E241 # whitespace around comma (we have some "tabular" formatting there)
+
--- a/setup.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/setup.py	Wed Jul 04 21:53:24 2012 +0400
@@ -72,7 +72,7 @@
                  },
     include_package_data=True,
     zip_safe=False,
-    dependency_links = [
+    dependency_links=[
         #'https://github.com/mitsuhiko/werkzeug/tarball/master#egg=Werkzeug-0.7dev',
         'https://bitbucket.org/thomaswaldmann/whoosh/get/2.4x.tar.gz#egg=Whoosh-2.4.99dev',
         # fixed flask-themes, 0.1.3 does not work for flask 0.8.x, thus we use a faked 0.1.3.1:
@@ -93,7 +93,7 @@
         'pygments>=1.4', # src code / text file highlighting
         'Werkzeug>=0.8.1', # wsgi toolkit
         'pytest>=2.1', # pytest is needed by unit tests
-        'pep8', # pep8 style checker is needed by unit tests
+        'pytest-pep8', # coding style checker
         'whoosh>=2.4.0', # needed for indexed search
         'sphinx>=1.1', # needed to build the docs
         'pdfminer', # pdf -> text/plain conversion
@@ -108,7 +108,7 @@
         'XStatic-multiDownload>=20110717.1',
     ],
     # optional features and their list of requirements
-    extras_require = {
+    extras_require={
         #'featurename': ["req1", "req2", ],
         'pil': ["PIL"], # used by image get for scaling/rotating/etc.
                         # PIL is a binary dependency and some features of it
@@ -118,12 +118,12 @@
         'openid': ["python-openid>=2.2.4"], # used by openid rp auth
         'sqla': ["sqlalchemy>=0.7.1"], # used by sqla store
     },
-    entry_points = dict(
-        console_scripts = ['moin = MoinMoin.script:main'],
+    entry_points=dict(
+        console_scripts=['moin = MoinMoin.script:main'],
     ),
 
     # stuff for babel:
-    message_extractors = {
+    message_extractors={
         '': [
             ('MoinMoin/templates/**.html', 'jinja2', None),
             ('MoinMoin/apps/**/templates/**.html', 'jinja2', None),
@@ -137,4 +137,3 @@
 
 if __name__ == '__main__':
     setup(**setup_args)
-
--- a/wikiconfig.py	Wed Jul 04 21:51:39 2012 +0400
+++ b/wikiconfig.py	Wed Jul 04 21:53:24 2012 +0400
@@ -57,7 +57,7 @@
 
     # setup static files' serving:
     serve_files = dict(
-        docs = os.path.join(wikiconfig_dir, 'docs', '_build', 'html'),  # html docs made by sphinx
+        docs=os.path.join(wikiconfig_dir, 'docs', '_build', 'html'),  # html docs made by sphinx
     )
     # see https://bitbucket.org/thomaswaldmann/xstatic for infos about xstatic:
     from xstatic.main import XStatic
@@ -101,4 +101,3 @@
 #
 #MOINCFG = LocalConfig
 #DEBUG = True
-