r1426762 | rhuijben | 2012-12-29 07:46:56 -0600 (Sat, 29 Dec 2012) Make sure that the diff suffix scanning optimization works correctly on chunk boundaries. We accidentally skipped over the suffix start location when that was a linebreak. Slightly tweaked version of a Patch by: Hideki IWAMOTO <h-iwamoto{_AT-}kit.hi-ho.ne.jp> * subversion/libsvn_diff/diff_file.c (datasource_get_next_token): When at the end of a chunk, check if the next chunk should be ignored for the suffix filtering. Add comment where we actually jump to the next chunk. * subversion/tests/libsvn_diff/diff-diff3-test.c (test_identical_suffix): New test. (test_funcs): Add test.
r1426752 | rhuijben | 2012-12-29 06:25:49 -0600 (Sat, 29 Dec 2012) Fix a whitespace normalization issue in the diff code, identified by Hideki Iwamoto. This applies patch applies the same fix as applied by steveking in r876890 on the other whitespace normalization function invocation. If the normalized offset is set incorrectly, reading back tokens from older chunks for diff-matching when the hash value of two tokens is identical, is broken. This is a slightly reworked version of the Patch by: Hideki IWAMOTO <h-iwamoto{_AT-}kit.hi-ho.ne.jp> * subversion/libsvn_diff/diff_file.c (datasource_get_next_token): Set the normalized offset earlier to allow updating the offset later by each of the possibly two normalization passes. * subversion/tests/libsvn_diff/diff-diff3-test.c (test_wrap): Rename existing test to ... (test_norm_offset): ... and test the specific issue identified here. (test_funcs): Update reference and expect the test to pass now.