changeset 5837:fb2a2ecd35c2

[bugfix] action/rss_rc.py: proper rev comparison and diff generation when diffs=1
author Eugene Syromyatnikov <evgsyr@gmail.com>
date Wed, 16 May 2012 03:01:56 +0400
parents 0265eec31d99
children 7dce09f5edd4
files MoinMoin/action/rss_rc.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/rss_rc.py	Fri Apr 27 22:06:44 2012 +0200
+++ b/MoinMoin/action/rss_rc.py	Wed May 16 03:01:56 2012 +0400
@@ -190,12 +190,14 @@
                 # searching for the matching pages doesn't really belong here
                 revisions = page.getRevList()
 
+                item_rev = int(item.rev)
+
                 rl = len(revisions)
                 for idx in range(rl):
                     rev = revisions[idx]
-                    if rev <= item.rev:
+                    if rev <= item_rev:
                         if idx + 1 < rl:
-                            lines = wikiutil.pagediff(request, item.pagename, revisions[idx+1], item.pagename, 0, ignorews=1)
+                            lines = wikiutil.pagediff(request, item.pagename, revisions[idx+1], item.pagename, item_rev, ignorews=1)
                             if len(lines) > 20:
                                 lines = lines[:20] + ['...\n']
                             lines = '\n'.join(lines)