Fixed the 'X-ReviewBoard-Diff-For' mail header to include modified files.
Review Request #9206 — Created Sept. 22, 2017 and submitted — Latest diff uploaded
The email generated after posting a review had an incomplete
'X-ReviewBoard-Diff-For' header. The header appeared for newly created files
and moved files but didn't appear for files that were only modified. The code
that was responsible for adding the header in question was ignoring modified
files. A check for modified files was added to the respective if statements and
a 'modified' attribute was added to the FileDiff class.
Posted reviews for a Tester Repository containing an edited file 'README.md'
and a created file 'FileA' to recreate the bug.Header generated from a posted review with both a created file and an edited
file:X-ReviewBoard-Diff-For: FileA
X-ReviewBoard-Diff-For
only appears for the created file, 'FileA'.After the fix, the same test was performed again with a created file 'FileA'
and an edited file 'README.md'.Header generated from a posted review with an edited file and a created file:
X-ReviewBoard-Diff-For: FileA X-ReviewBoard-Diff-For: README.md
X-ReviewBoard-Diff-For
appears for both 'FileA' and 'README.md'.Ran unit tests.