diff MoinMoin/action/diff.py @ 1019:6488692b1eb8

have all diff implementations at one place
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 24 Jul 2006 01:43:02 +0200
parents f5b796658f93
children ecece5db5288
line wrap: on
line diff
--- a/MoinMoin/action/diff.py	Mon Jul 24 00:19:55 2006 +0200
+++ b/MoinMoin/action/diff.py	Mon Jul 24 01:43:02 2006 +0200
@@ -7,6 +7,7 @@
     @license: GNU GPL, see COPYING for details.
 """
 
+from MoinMoin import wikiutil
 from MoinMoin.logfile import editlog
 from MoinMoin.Page import Page
 
@@ -126,11 +127,12 @@
     request.write('</p>')
 
     if request.user.show_fancy_diff:
-        from MoinMoin.util.diff import diff
-        request.write(diff(request, oldpage.get_raw_body(), newpage.get_raw_body()))
+        from MoinMoin.util import diff_html
+        request.write(diff_html.diff(request, oldpage.get_raw_body(), newpage.get_raw_body()))
         newpage.send_page(request, count_hit=0, content_only=1, content_id="content-below-diff")
     else:
-        lines = wikiutil.linediff(oldpage.getlines(), newpage.getlines())
+        from MoinMoin.util import diff_text
+        lines = diff_text.diff(oldpage.getlines(), newpage.getlines())
         if not lines:
             msg = _("No differences found!")
             if edit_count > 1: