changeset 1260:5d555ec6b40a

Fixed a bug that was hard to track down in SyncPages (some hours spent :-/).
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Fri, 11 Aug 2006 22:28:14 +0200
parents a76ce7b95190
children ae9eb32b6899
files MoinMoin/action/SyncPages.py MoinMoin/xmlrpc/__init__.py docs/CHANGES.aschremmer
diffstat 3 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/SyncPages.py	Fri Aug 11 00:20:20 2006 +0200
+++ b/MoinMoin/action/SyncPages.py	Fri Aug 11 22:28:14 2006 +0200
@@ -475,6 +475,8 @@
             remote_full_iwid = packLine([remote.get_iwid(), remote.get_interwiki_name()])
 
             diff = textdiff(new_contents.encode("utf-8"), verynewtext.encode("utf-8"))
+            #print "Diff against %r" % new_contents.encode("utf-8")
+
             comment = u"Local Merge - %r" % (remote.get_interwiki_name() or remote.get_iwid())
 
             # XXX upgrade to write lock
@@ -487,7 +489,7 @@
                 assert False, "You stumbled on a problem with the current storage system - I cannot lock pages"
             new_local_rev = current_page.get_real_rev()
             try:
-                very_current_remote_rev = remote.merge_diff(rp.remote_name, compress(diff), new_local_rev, remote_rev, current_remote_rev, local_full_iwid)
+                very_current_remote_rev = remote.merge_diff(rp.remote_name, compress(diff), new_local_rev, current_remote_rev, current_remote_rev, local_full_iwid)
             except Exception, e:
                 raise # XXX rollback
             else:
--- a/MoinMoin/xmlrpc/__init__.py	Fri Aug 11 00:20:20 2006 +0200
+++ b/MoinMoin/xmlrpc/__init__.py	Fri Aug 11 22:28:14 2006 +0200
@@ -665,6 +665,7 @@
 
         # generate the new page revision by applying the diff
         newcontents = patch(basepage.get_raw_body_str(), decompress(str(diff)))
+        #print "Diff against %r" % basepage.get_raw_body_str()
 
         # write page
         try:
--- a/docs/CHANGES.aschremmer	Fri Aug 11 00:20:20 2006 +0200
+++ b/docs/CHANGES.aschremmer	Fri Aug 11 22:28:14 2006 +0200
@@ -94,7 +94,7 @@
          detection in SyncPages. Added logging support to SyncPages. Refactored conflict flag
          detection from the edit action into the PageEditor class. Enhanced XMLRPC server in Moin to allow
          XMLRPC functions to return Fault instances. Introduced a new diff3 mode that should reduce the
-         conflicts.
+         conflicts. Fixed hard to track down bugs in SyncPages.
 
 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