Add X-ReviewBoard-Diff-For header in E-Mails

Review Request #7509 — Created July 9, 2015 and submitted

Information

Review Board
release-2.0.x
9c3ed1b...

Reviewers

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 plain dict, 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 the X-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.

Description From Last Updated

Swap these.

chipx86chipx86

redefinition of unused 'test_review_request_email_with_moved_file' from line 608

reviewbotreviewbot

Col: 13 E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

Col: 1 W391 blank line at end of file

reviewbotreviewbot
reviewbot
  1. 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
    
    
  2. reviewboard/notifications/tests.py (Diff revision 1)
     
     
    Show all issues
     redefinition of unused 'test_review_request_email_with_moved_file' from line 608
    
  3. reviewboard/notifications/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 13
     E123 closing bracket does not match indentation of opening bracket's line
    
  4. reviewboard/notifications/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 1
     W391 blank line at end of file
    
  5. 
      
brennie
reviewbot
  1. 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
    
    
  2. 
      
chipx86
  1. Wow, awesome job. You just plowed through that.

    Other than Review Bot's complaints, I only have one issue, which is trivial.

  2. reviewboard/notifications/email.py (Diff revision 1)
     
     
     
    Show all issues

    Swap these.

  3. 
      
brennie
reviewbot
  1. 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
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
  1. Ship It!
  2. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (7cf3e24)
Loading...