Fixed bug where diffviewer/processors.py would filter out deletes in interdiffs

Review Request #9222 — Created Sept. 25, 2017 and updated

dkuecker
Review Board
release-2.5.x
4366
reviewboard

Diffviewer/processors.py determined if a chunk was valid by checking it against the orig (left) range. This was causing some deletes in interdiffs to be marked as filtered-equal when the diff showed up in the interfilediff and not the filediff.
- Changed processors.py to validate a chunk by checking it against the orig and new (left and right) ranges since deletes won't always show up on the left side.
- Corrected the expected new_opcodes in diffviewer/tests/test_processors.py FilterInterdiffObcodesTests to expect a 'delete' instead of 'filtered-equal' for the delete opcode.

  • Corrected the expected new_opcodes in diffviewer/tests/test_processors.py FilterInterdiffObcodesTests to expect a 'delete' instead of 'filtered-equal' for the delete opcode.
  • All tests pass.
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
Loading...