Add X-ReviewBoard-Diff-For header in E-Mails
Review Request #7509 — Created July 9, 2015 and submitted
E-Mails sent by Review Board now add a
X-ReviewBoard-Diff-For
header
for each file that was modified in the diff. In the case of a moved or
copied file, both the source and destination file names are added.
Otherwise only the relevant file names (source in the case of deleted
and destination in the case of new) are added.To facilitate this change, our
SpiffyEmailMessage
class has been
overhauled to handle message headers. Django expects the headers to be
a plaindict
, but since we are repeating headers we now use a
MultiValueDict
. All E-Mail unit tests have been updated to look for
headers in the correct location and new unit tests have been added to
test theX-ReviewBoard-Diff-For
header.
Unit tests pass.
Published a review request with multiple files modified. Saw multiple
X-ReviewBoard-Diff-For
headers in the resulting E-Mail mesage.
-
Tool: Pyflakes Processed Files: reviewboard/notifications/email.py reviewboard/notifications/tests.py Tool: PEP8 Style Checker Processed Files: reviewboard/notifications/email.py reviewboard/notifications/tests.py