1. Joongi Kim
  2. trac-changeset-notifier


Joongi Kim  committed ef27b89

more refined email with commit messages and old/new revision numbers

  • Participants
  • Parent commits 44564c3
  • Branches default

Comments (0)

Files changed (2)

File tracext/changesetnotifier/api.py

View file
  • Ignore whitespace
     def __init__(self, env):
         NotifyEmail.__init__(self, env)
-    def notify(self, resid, subject, diff):
+    def notify(self, resid, subject, msg, old_rev, new_rev, diff):
             'diff_body': diff,
+            'commit_message': msg,
+            'old_rev': old_rev,
+            'new_rev': new_rev,
         NotifyEmail.notify(self, resid, subject)
         reponame = repos.reponame if repos.reponame else '(default)'
         subject = self._format_subject('Changeset %s in repository %s' %
                                        (repos.display_rev(changeset.rev), reponame))
-        cn.notify(changeset.rev, subject, diff)
+        new_rev = repos.display_rev(changeset.rev)
+        old_rev = repos.display_rev(repos.previous_rev(changeset.rev))
+        cn.notify(changeset.rev, subject, changeset.message, old_rev, new_rev, diff)
     def changeset_modified(self, repos, changeset, old_changeset):
         if not self.notify:

File tracext/changesetnotifier/templates/changeset_notify_email.txt

View file
  • Ignore whitespace
-The following changeset has been added:
+The changeset diff between $old_rev and $new_rev: