changeset 1352:dfed953d5e9f

Added showtags action, minor changes in SyncPages.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Sun, 20 Aug 2006 17:27:56 +0200
parents aebf6f7ab57e
children 4a71075e6d39
files MoinMoin/action/SyncPages.py MoinMoin/action/showtags.py docs/CHANGES.aschremmer
diffstat 3 files changed, 29 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/SyncPages.py	Sun Aug 20 17:27:37 2006 +0200
+++ b/MoinMoin/action/SyncPages.py	Sun Aug 20 17:27:56 2006 +0200
@@ -61,7 +61,7 @@
         for line in self.status:
             macro_args = [line[1]] + list(line[2])
             table.append(table_line % {"smiley": line[0][1], "message":
-                macro_args and u"[[GetText2(|%s)]]" % (packLine(macro_args), ),
+                line[1] and (u"[[GetText2(|%s)]]" % (packLine(macro_args), )),
                 "raw_suffix": line[3]})
 
         return "\n".join(table)
@@ -141,7 +141,7 @@
         except ActionStatus, e:
             msg = u'<p class="error">%s</p>\n' % (e.args[0], )
         else:
-            msg = u"%s" % (_("Syncronisation finished."), )
+            msg = u"%s" % (_("Syncronisation finished. Look below for the status messages."), )
 
         self.page.saveText(self.page.get_raw_body() + "\n\n" + self.generate_log_table(), 0)
         # XXX release readlock on self.page
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/action/showtags.py	Sun Aug 20 17:27:56 2006 +0200
@@ -0,0 +1,23 @@
+# -*- coding: iso-8859-1 -*-
+"""
+    MoinMoin - "showtags" action
+
+    This action shows all sync tags related to a specific page.
+
+    @copyright: 2006 by MoinMoin:AlexanderSchremmer
+    @license: GNU GPL, see COPYING for details.
+"""
+
+from MoinMoin import config
+from MoinMoin.Page import Page
+from MoinMoin.wikisync import TagStore
+
+def execute(pagename, request):
+    mimetype = "text/plain"
+
+    request.emit_http_headers(["Content-Type: %s; charset=%s" % (mimetype, config.charset)])
+
+    page = Page(request, pagename)
+    tags = TagStore(page)
+    request.write(tags.dump())
+
--- a/docs/CHANGES.aschremmer	Sun Aug 20 17:27:37 2006 +0200
+++ b/docs/CHANGES.aschremmer	Sun Aug 20 17:27:56 2006 +0200
@@ -4,20 +4,18 @@
   Known main issues:
     * Do I need to tag delete operations?
     * How to handle renames?
-    * How will we store tags? (Metadata support would be handy)
+    * How should we store tags? (Metadata support would be handy)
       (currently done in Pickle files)
 
   ToDo:
+    * Implement rollback
     * Reduce round-trip times by caching queries and using MultiCall objects (coroutines?)
     * Check what needs to be documented on MoinMaster.
-
-    * Show tags in an action=info view?
-
     * Test with prefixes
     * Search for XXX
-
     * Implement a cross-site authentication system, i.e. mainly an
       identity storage. (does OpenID make sense?)
+
     * Maybe refactor YYY into MoinLocalWiki
     * Add page locking, i.e. use the one in the new storage layer.
     * Do older tags of one wiki site have to be stored as well? Why don't we
@@ -43,6 +41,7 @@
     * XMLRPC functions may return Fault instances
     * diff3 algorithm extended, a new mode should reduce the conflicts
     * GetText2 macro
+    * showtags action
 
   Bugfixes (only stuff that is buggy in moin/1.6 main branch):
     * Conflict resolution fixes. (merged into main)