On Mon, 2010-09-13, s...@apache.org wrote: > * subversion/libsvn_diff/parse-diff.c > (svn_diff_parse_next_patch): When generating a reverse diff, do not swap > the old and new filenames of the patch. The old filename in a unidiff > is often useless (e.g. it contains a ".orig" extension), but the new > filename should always be valid.
Sounds odd. I don't doubt this change is correct, but I'm sure the reasoning for it shouldn't have anything to do with what kind of filenames you think people might use :-) - Julian > * subversion/tests/cmdline/patch_tests.py > (patch_reverse): Swap filenames in test patch, so it is more realistic. > > Modified: > subversion/trunk/subversion/libsvn_diff/parse-diff.c > subversion/trunk/subversion/tests/cmdline/patch_tests.py > > Modified: subversion/trunk/subversion/libsvn_diff/parse-diff.c > URL: > http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/parse-diff.c?rev=996581&r1=996580&r2=996581&view=diff > ============================================================================== > --- subversion/trunk/subversion/libsvn_diff/parse-diff.c (original) > +++ subversion/trunk/subversion/libsvn_diff/parse-diff.c Mon Sep 13 15:45:24 > 2010 > @@ -1242,13 +1242,6 @@ svn_diff_parse_next_patch(svn_patch_t ** > } while (! eof); > > (*patch)->reverse = reverse; > - if (reverse) > - { > - const char *temp; > - temp = (*patch)->old_filename; > - (*patch)->old_filename = (*patch)->new_filename; > - (*patch)->new_filename = temp; > - } > > if ((*patch)->old_filename == NULL || (*patch)->new_filename == NULL) > { > > Modified: subversion/trunk/subversion/tests/cmdline/patch_tests.py > URL: > http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/patch_tests.py?rev=996581&r1=996580&r2=996581&view=diff > ============================================================================== > --- subversion/trunk/subversion/tests/cmdline/patch_tests.py (original) > +++ subversion/trunk/subversion/tests/cmdline/patch_tests.py Mon Sep 13 > 15:45:24 2010 > @@ -1476,8 +1476,8 @@ def patch_reverse(sbox): > "@@ -1 +0,0 @@\n", > "-new\n", > "\n", > - "--- A/mu 2009-06-24 15:23:55.000000000 +0100\n", > - "+++ A/mu.orig 2009-06-24 15:21:23.000000000 +0100\n", > + "--- A/mu.orig\t2009-06-24 15:23:55.000000000 +0100\n", > + "+++ A/mu\t2009-06-24 15:21:23.000000000 +0100\n", > "@@ -6,9 +6,6 @@\n", > " through a computer ballot system drawn from over 100,000 company\n", > " and 50,000,000 individual email addresses from all over the world.\n", > >