changeset 3375:50fe2fa62f30

macro.RecentChanges: shows revert and rename action with comment
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 20 Mar 2008 22:18:39 +0100
parents 043689a3b04c
children 0215dd9fa6ee
files MoinMoin/macro/RecentChanges.py
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/RecentChanges.py	Thu Mar 20 22:03:19 2008 +0100
+++ b/MoinMoin/macro/RecentChanges.py	Thu Mar 20 22:18:39 2008 +0100
@@ -39,12 +39,11 @@
         elif action == 'ATTDRW':
             comment = _("Drawing '%(filename)s' saved.") % {
                 'filename': filename}
-    elif not comment:
-        if '/REVERT' in action:
-            rev = int(line.extra)
-            comment = _("Revert to revision %(rev)d.") % {'rev': rev}
-        elif '/RENAME' in action:
-            comment = _("Renamed from '%(oldpagename)s'.") % {'oldpagename': line.extra}
+    elif '/REVERT' in action:
+        rev = int(line.extra)
+        comment = (_("Revert to revision %(rev)d.") % {'rev': rev}) + " " + comment
+    elif '/RENAME' in action:
+        comment = (_("Renamed from '%(oldpagename)s'.") % {'oldpagename': line.extra}) + " " + comment
 
     return wikiutil.make_breakable(comment, _MAX_COMMENT_LENGTH)