• 
      

    Attach parent diffs with renamed and modified files

    Review Request #7178 — Created April 7, 2015 and submitted

    Information

    Review Board
    release-2.0.x
    423060d...

    Reviewers

    Previously, if a review request was uploaded with a parent diff it was
    possible that parent diffs would not be attached to FileDiffs in the
    case where the parent diff for a file was the result of a rename and a
    modify. This would result in the underlying SCM not being able to
    locate the parent revision and generate the original file for the
    diffviewer.

    Now instead of attaching parent diffs to FileDiffs based on the
    original file names in the parent diff, we consider the destination
    file names. This results in parent diffs being correctly attached when
    they contain a renamed and modified file.

    Ran unit tests.

    Uploaded a review request with a parent diff that had a modified and
    renamed file. The diff was visible in the diffviewer when uploaded
    with this patch applied; it was not visible when it was uploaded
    without the patch applied.

    reviewbot
    1. Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/diffviewer/managers.py
      
      
      
      Tool: Pyflakes
      Processed Files:
          reviewboard/diffviewer/managers.py
      
      
    2. 
        
    david
    1. Nice cleanup!

    2. 
        
    brennie
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (8c15f47)