diff MoinMoin/action/SyncPages.py @ 1407:e1419b1f9679

Fixed parameter checking code, now it evens gives you a warning instead of a traceback, fixed two minor typos (thanks to birkenfeld!), introduced prepare_multicall support in order to get authentication working and actually added the RPC-Aggregator.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Wed, 23 Aug 2006 21:49:35 +0200
parents e6bf86b4a735
children 107ca03adb3c
line wrap: on
line diff
--- a/MoinMoin/action/SyncPages.py	Wed Aug 23 21:20:48 2006 +0200
+++ b/MoinMoin/action/SyncPages.py	Wed Aug 23 21:49:35 2006 +0200
@@ -146,19 +146,19 @@
                 raise ActionStatus(_("The ''remoteWiki'' is unknown."))
         except ActionStatus, e:
             msg = u'<p class="error">%s</p>\n' % (e.args[0], )
-
-        try:
+        else:
             try:
-                self.sync(params, local, remote)
-            except Exception, e:
-                self.log_status(self.ERROR, _("A severe error occured:"), raw_suffix=repr(e))
-                raise
-            else:
-                msg = u"%s" % (_("Syncronisation finished. Look below for the status messages."), )
-        finally:
-            # XXX aquire readlock on self.page
-            self.page.saveText(self.page.get_raw_body() + "\n\n" + self.generate_log_table(), 0)
-            # XXX release readlock on self.page
+                try:
+                    self.sync(params, local, remote)
+                except Exception, e:
+                    self.log_status(self.ERROR, _("A severe error occured:"), raw_suffix=repr(e))
+                    raise
+                else:
+                    msg = u"%s" % (_("Syncronisation finished. Look below for the status messages."), )
+            finally:
+                # XXX aquire readlock on self.page
+                self.page.saveText(self.page.get_raw_body() + "\n\n" + self.generate_log_table(), 0)
+                # XXX release readlock on self.page
 
         self.page.send_page(self.request, msg=msg)
 
@@ -170,7 +170,7 @@
                 Wiki A    | Wiki B   | Remark
                 ----------+----------+------------------------------
                 exists    | non-     | Now the wiki knows that the page was renamed.
-                with tags | existant | There should be an RPC method that asks
+                with tags | existing | There should be an RPC method that asks
                           |          | for the new name (which could be recorded
                           |          | on page rename). Then the page is
                           |          | renamed in Wiki A as well and the sync
@@ -399,7 +399,7 @@
 
                 # XXX release lock
 
-        rpc_aggregator.scheduler(remote.create_multicall_object, handle_page, m_pages, 8)
+        rpc_aggregator.scheduler(remote.create_multicall_object, handle_page, m_pages, 8, remote.prepare_multicall)
 
 
 def execute(pagename, request):