changeset 1271:bb2f70fc9734

Have been thinking about a solution for the remaining sync cases, put the thoughts into a docstring."
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Mon, 14 Aug 2006 22:06:53 +0200
parents db1811c83ccc
children e85ad6a95ae5
files MoinMoin/action/SyncPages.py docs/CHANGES.aschremmer
diffstat 2 files changed, 29 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/SyncPages.py	Sun Aug 13 23:40:51 2006 +0200
+++ b/MoinMoin/action/SyncPages.py	Mon Aug 14 22:06:53 2006 +0200
@@ -131,7 +131,30 @@
         return self.page.send_page(self.request, msg=msg)
     
     def sync(self, params, local, remote):
-        """ This method does the syncronisation work. """
+        """ This method does the syncronisation work.
+            Currently, it handles the case where the pages exist on both sides.
+            Now there are a few other cases left that have to be implemented:
+                Wiki A    | Wiki B   | Remark
+                ----------+----------+------------------------------
+                exists    | deleted  | In this case, we do a normal merge if there
+                          |          | are no tags. If there were changes in
+                          |          | Wiki A, there is a merge with a conflict.
+                          |          | Otherwise (no changes past last merge),
+                          |          | the page is deleted in Wiki A.
+                ----------+----------+-------------------------------
+                exists    | non-     | Now the wiki knows that the page was renamed.
+                with tags | existant | 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
+                          |          | is done normally.
+                ----------+----------+-------------------------------
+                exists    | any case | Do a sync without considering tags
+                with tags | with non | to ensure data integrity.
+                          | matching |
+                          | tags     |
+                ----------+----------+-------------------------------
+        """
         _ = self.request.getText
         direction = params["direction"]
 
--- a/docs/CHANGES.aschremmer	Sun Aug 13 23:40:51 2006 +0200
+++ b/docs/CHANGES.aschremmer	Mon Aug 14 22:06:53 2006 +0200
@@ -7,9 +7,10 @@
       (currently done in Pickle files)
 
   ToDo:
-    * Implement all syncronisation cases (all directions, all 3 page sets).
+    * Tags should store the page name to recognise renaming scenarios.
+    * Implement all syncronisation cases (all 3 page sets).
     * Test with prefixes
-    * Reduce round-trip times by caching queries and using MultiCall objects.
+    * Reduce round-trip times by caching queries and using MultiCall objects (coroutines?)
     * Attach the status information to the job page.
     * Show tags in an action=info view?
     * Implement a cross-site authentication system, i.e. mainly an
@@ -38,7 +39,7 @@
     * InterWiki page editable in the wiki, modification detection based on mtimes
     * SyncPages action
     * XMLRPC functions may return Fault instances
-    * diff3 algorithm extenteded, a new mode should reduce the conflicts
+    * diff3 algorithm extended, a new mode should reduce the conflicts
 
   Bugfixes (only stuff that is buggy in moin/1.6 main branch):
     * Conflict resolution fixes. (merged into main)
@@ -102,6 +103,7 @@
          conflicts. Fixed hard to track down bugs in SyncPages. Store full IWIDs and match by
          either of both components when searching for tags. Ignore underlay pages. Filter the remote page list by
          the prefix and the pageList on the remote side. Finished the direction==DOWN mode.
+         Started designing the solutions for the other sync cases.
 
 2006-07-18: the requested daily entry is missing here, see http://moinmoin.wikiwikiweb.de/GoogleSoc2006/BetterProgress
 2006-07-19: the requested daily entry is missing here, see http://moinmoin.wikiwikiweb.de/GoogleSoc2006/BetterProgress