changeset 1112:b02f88f4428e

Fix diffraw view, fix text diffraw
author Sam Toyer <samATqxcvDOTnet>
date Thu, 01 Dec 2011 21:20:45 +1000
parents ec33b8e97292
children b172baf033db ebc4f8213e74
files MoinMoin/apps/frontend/views.py MoinMoin/items/__init__.py
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Thu Dec 01 00:22:46 2011 +0100
+++ b/MoinMoin/apps/frontend/views.py	Thu Dec 01 21:20:45 2011 +1000
@@ -1514,7 +1514,7 @@
 def _diff_raw(item, revid1, revid2):
     oldrev = item[revid1]
     newrev = item[revid2]
-    commonmt = _common_type(oldrev, newrev)
+    commonmt = _common_type(oldrev.meta[CONTENTTYPE], newrev.meta[CONTENTTYPE])
 
     try:
         item = Item.create(item.name, contenttype=commonmt, rev_id=newrev.revid)
--- a/MoinMoin/items/__init__.py	Thu Dec 01 00:22:46 2011 +0100
+++ b/MoinMoin/items/__init__.py	Thu Dec 01 21:20:45 2011 +1000
@@ -1130,6 +1130,8 @@
         difflines = diff_text.diff(oldlines, newlines)
         return '\n'.join(difflines)
 
+    _render_data_diff_raw = _render_data_diff
+
     def _render_data_highlight(self):
         from MoinMoin.converter import default_registry as reg
         data_text = self.data_storage_to_internal(self.data)