Commits

Joongi Kim  committed ef27b89

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

  • Participants
  • Parent commits 44564c3

Comments (0)

Files changed (2)

File tracext/changesetnotifier/api.py

     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):
         self.data.update({
             '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

-The following changeset has been added:
+Message:
+$commit_message
+
+The changeset diff between $old_rev and $new_rev:
 
 $diff_body