Fix mangling of SVN diffs that contain lines that look like headers.

Review Request #8934 — Created May 9, 2017 and submitted

David Trowbridge

If a file has a removed line that looks vaguely like a file header (i.e. the
line is "-- XX (Y)"), the entry for the removed line in the diff would get
filtered out by our code that tries to mangle the diffs to make renames and
copies work properly.

This change makes the code that detects and mangles file headers much more
specific, looking at each chunk of 5 lines instead of lines one by one.

  • Created a reproduction case and verified that rbt diff and svn diff
    produced the same output.
  • Wrote a unit test and checked that the test failed before the change and
    succeeded afterward.
  • Ran entire test suite.
  • 0
  • 0
  • 1
  • 4
  • 5
Description From Last Updated
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.


Barret Rennie
  1. Ship It!
Christian Hammond
  2. rbtools/clients/ (Diff revision 1)

    I'd kinda rather keep the and at the end of the line, so we don't deal with errors every time we post anything (and to be consistent with the majority of our code).

David Trowbridge
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.7.x (8e28fae)