changeset 1643:eddb24012ed2

Merge with a single sync change.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Sat, 28 Oct 2006 21:58:08 +0200
parents 39ca0331843f (current diff) 0101edf9d308 (diff)
children db2edbcf9783
files
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/SyncPages.py	Tue Oct 24 02:36:43 2006 +0200
+++ b/MoinMoin/action/SyncPages.py	Sat Oct 28 21:58:08 2006 +0200
@@ -440,14 +440,18 @@
                 new_local_rev = current_page.get_real_rev() # YYY direct access
 
                 def rollback_local_change(): # YYY direct local access
+                    comment = u"Wikisync rollback"
                     rev = new_local_rev - 1
                     revstr = '%08d' % rev
                     oldpg = Page(self.request, sp.local_name, rev=rev)
                     pg = PageEditor(self.request, sp.local_name)
-                    try:
-                        savemsg = pg.saveText(oldpg.get_raw_body(), 0, comment=u"Wikisync rollback", extra=revstr, action="SAVE/REVERT")
-                    except PageEditor.Unchanged:
-                        pass
+                    if not oldpg.exists():
+                        pg.deletePage(comment)
+                    else:
+                        try:
+                            savemsg = pg.saveText(oldpg.get_raw_body(), 0, comment=comment, extra=revstr, action="SAVE/REVERT")
+                        except PageEditor.Unchanged:
+                            pass
                     return sp.local_name
 
                 if local_change_done: