Christian Zangl


Found
r1399174

r1399174 | stsp | 2012-10-17 10:54:32 +0000 (Wed, 17 Oct 2012)

Fix a diff parser bug where hunks are ignored if a context line is followed
by a "\ No newline at end of file." message.

Reported by: Christian Zangl

* subversion/libsvn_diff/parse-diff.c
  (parse_next_hunk): Don't exit parsing loop early upon seeing a
   "\ No newline at end of file" message after a hunk context line.
   We must treat this situation the same as when an original or modified
   line precedes the "\ No newline at end of file" message.

* subversion/tests/cmdline/patch_tests.py
  (patch_target_no_eol_at_eof): Extend this test to cover the case where a
   "\ No newline at end of file" message appears after a context line.
   This bug slipped through because we only tested the cases where an
   original or modified line precedes "\ No newline at end of file".