Fix parent diffs with moved files

Review Request #7440 — Created June 19, 2015 and submitted — Latest diff uploaded

Information

Review Board
release-2.0.x
f870adb...

Reviewers

Previously, if a parent diff contained a moved file without
modifications, it was possible that the associated FileDiff could end
up with incorrect source revisions and would not display correctly.
When a parent diff only contains a move, we no longer apply it because
it will not affect the content and the patch executable will exit
with an error (as it believe there is only garbage in the patch). This
has been fixed and diffs with moves in the parent diff display
correctly.

Unit tests have been added for two cases:

  • the case where the parent diff has both a modification and rename;
    and
  • the case where the parent diff has only a rename.

Ran unit tests. The new unit test that covers a parent diff with only
a rename failed without this patch applied.

    Loading...