Fix how interdiffs with multiple renames determine their filenames.

Review Request #8063 — Created March 17, 2016 and submitted — Latest diff uploaded

Information

Review Board
master
da41725...

Reviewers

Previously, if File A (at orig) was renamed to File B (at revision 1),
and then if File B was subsequently renamed to File C (at revision 2),
then the diff viewer would correctly display the diff from orig to
revision 1 as A -> B and correctly display the diff from orig to
revision 2 as A -> C. However, the interdiff from revision 1 to
revision 2 would be incorrectly displayed as A -> B instead of the
expected B -> C.

This change addresses this issue by determining the depot_filename and
dest_filename of each diff_file based on whether or not its
corresponding interfilediff part exists.

  • Ran and passed the relevant reviewboard unit tests.
  • Added a unit test that covers this bug, which passes.
  • Manually verified that interdiff filenames displayed correctly, even
    with multiple renames.