changeset 1140:3155f908de85

Refactored conflict markers.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Mon, 07 Aug 2006 21:51:34 +0200
parents 213b244cdf4f
children 0390d7857d87
files MoinMoin/PageEditor.py
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/PageEditor.py	Mon Aug 07 21:50:29 2006 +0200
+++ b/MoinMoin/PageEditor.py	Mon Aug 07 21:51:34 2006 +0200
@@ -18,6 +18,12 @@
 from MoinMoin.mail import sendmail
 
 
+# used for merging
+conflict_markers = ("\n---- /!\ '''Edit conflict - other version:''' ----\n",
+                    "\n---- /!\ '''Edit conflict - your version:''' ----\n",
+                    "\n---- /!\ '''End of edit conflict''' ----\n")
+
+
 #############################################################################
 ### Javascript code for editor page
 #############################################################################
@@ -101,10 +107,7 @@
         
         # And try to merge all into one with edit conflict separators
         verynewtext = diff3.text_merge(original_text, saved_text, savetext,
-                                       allow_conflicts,
-                                       "\n---- /!\ '''Edit conflict - other version:''' ----\n",
-                                       "\n---- /!\ '''Edit conflict - your version:''' ----\n",
-                                       "\n---- /!\ '''End of edit conflict''' ----\n")
+                                       allow_conflicts, *conflict_markers)
         if verynewtext:
             self.set_raw_body(verynewtext)
             return True