• 
      

    Fix display of new files deleted in a parent diff.

    Review Request #14996 — Created April 2, 2026 and submitted

    Information

    Review Board
    release-7.1.x

    Reviewers

    While debugging another issue, I discovered that if a diff contains a
    "new file" but has a parent diff that previously deleted that file, it
    would show in two-column mode with the left-hand side totally empty.

    This traced back to an old fix done way back in 2012, back when we only
    had a source_revision field which was overloaded between both the diff
    and parent diff. That was fixed in 3.0.19, but the is_new_file
    calculation still completely turned it off if we had a parent diff
    present at all.

    I've changed this so that if we have a modern parent_source_revision,
    we allow ourselves to trust the newfile flag.

    • Verified that this situation now correctly appeared as a new file in
      the diff viewer.
    • Ran unit tests.
    Summary ID
    Fix display of new files deleted in a parent diff.
    While debugging another issue, I discovered that if a diff contains a "new file" but has a parent diff that previously deleted that file, it would show in two-column mode with the left-hand side totally empty. This traced back to an old fix done way back in 2012, back when we only had a `source_revision` field which was overloaded between both the diff and parent diff. That was fixed in 3.0.19, but the `is_new_file` calculation still completely turned it off if we had a parent diff present at all. I've changed this so that if we have a modern `parent_source_revision`, we allow ourselves to trust the `newfile` flag. Testing Done: - Verified that this situation now correctly appeared as a new file in the diff viewer. - Ran unit tests.
    mkqsrvvyruwwsonnmxkzyurrwywmrwwr
    chipx86
    1. Ship It!
    2. 
        
    maubin
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-7.1.x (d355127)