[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] For 'svn patch', fix bug when reading patches without index lines

From: Daniel Näslund <daniel_at_longitudo.com>
Date: Fri, 5 Mar 2010 20:38:22 +0100

Hi!

I have my own branch, and I was told that I could just commit there. But
it's _scary_. I'll ask for permission first.

[[[
Fix bug with 'svn patch' not recognizing diff headers when parsing
patches without the 'Index' line and the '======' line. The old code
just assumed that the first line after the hunk would not be a '-'. But
it can be so we must handle it.

* subversion/libsvn_diff/parse-diff.c
  (parse_next_hunk): Check that we have not read all the lines, that the
    hunk header said, the hunk should consist of. We need to check for
    both nr of modified and original lines since we can do a reverse
    parsing. That means treating '+' as '-' and the other way around.

* subversion/tests/cmdline/patch_tests.py
  (patch_no_index_line): New.
  (test_list): Add the new test.
]]]

Received on 2010-03-05 20:39:02 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.