Fix broken parser for git diffs with binaries

Review Request #10854 — Created Jan. 24, 2020 and updated

misery
Review Board
release-4.0.x
4638
b0319bc...
reviewboard
The parser for git diffs (git and hg) did a mistake
if there are base64 binary data. It prepended the data
to a following file info instead of appending the
previous one.

Uploaded the unit test diff. Downloaded the patch with
"Download Diff" and saw that it was correct. Also it
could be applied by "rbt patch".
Saw correct FileDiff entries in database as well. Before
this patch the FileDiff data was mixed data of all files.

Added a unit test and saw that it passed.

misery
  1. 
      
  2. Broken in RB 3, too. Maybe it should be merged to release-3.0.x branch

  3. 
      
chipx86
  1. This looks good! Let me run some tests of my own (some of the parsing stuff is in flux internally), but I definitely want to get this fix in.

    Do you know if this was also broken on release-3.0.x? I'm assuming it was?

    1. yes, we use RB 3.0.15 here and it was broken.

    2. did you find time for your tests?

  2. 
      
misery
Review request changed

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
Loading...