Fix how interdiffs with multiple renames determine their filenames.

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

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.
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/diffutils.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/diffviewer/tests.py
        reviewboard/diffviewer/diffutils.py
    
    
  2. 
      
brennie
  1. Ship It!
  2. 
      
david
  1. Ship It!
  2. 
      
AD
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (e1b232d)