You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2012/10/31 04:59:52 UTC
svn commit: r1403965 - in /subversion/branches/1.7.x: ./ STATUS
subversion/libsvn_diff/parse-diff.c subversion/tests/cmdline/patch_tests.py
Author: svn-role
Date: Wed Oct 31 03:59:51 2012
New Revision: 1403965
URL: http://svn.apache.org/viewvc?rev=1403965&view=rev
Log:
Reintegrate the 1.7.x-r1399174 branch:
* r1399174
Fix a diff parser bug that prevents some patch files from being applied.
Justification:
Prevents users from applying certain patches with 'svn patch', see
http://svn.haxx.se/users/archive-2012-10/0081.shtml
Branch:
^/subversion/branches/1.7.x-r1399174
Votes:
+1: stsp, steveking, rhuijben
Modified:
subversion/branches/1.7.x/ (props changed)
subversion/branches/1.7.x/STATUS
subversion/branches/1.7.x/subversion/libsvn_diff/parse-diff.c
subversion/branches/1.7.x/subversion/tests/cmdline/patch_tests.py
Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1399174
Merged /subversion/branches/1.7.x-r1399174:r1399176-1403964
Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1403965&r1=1403964&r2=1403965&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Wed Oct 31 03:59:51 2012
@@ -96,16 +96,6 @@ Veto-blocked changes:
Approved changes:
=================
- * r1399174
- Fix a diff parser bug that prevents some patch files from being applied.
- Justification:
- Prevents users from applying certain patches with 'svn patch', see
- http://svn.haxx.se/users/archive-2012-10/0081.shtml
- Branch:
- ^/subversion/branches/1.7.x-r1399174
- Votes:
- +1: stsp, steveking, rhuijben
-
* r1403583
In ra_serf, treat marshaled errors with 0 error codes the same as
errors with no provided error code.
Modified: subversion/branches/1.7.x/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_diff/parse-diff.c?rev=1403965&r1=1403964&r2=1403965&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_diff/parse-diff.c Wed Oct 31 03:59:51 2012
@@ -688,7 +688,6 @@ parse_next_hunk(svn_diff_hunk_t **hunk,
original_end = hunk_text_end;
if (modified_end == 0)
modified_end = hunk_text_end;
- break;
}
SVN_ERR(svn_io_file_seek(apr_file, APR_SET, &pos, iterpool));
Modified: subversion/branches/1.7.x/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/tests/cmdline/patch_tests.py?rev=1403965&r1=1403964&r2=1403965&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/1.7.x/subversion/tests/cmdline/patch_tests.py Wed Oct 31 03:59:51 2012
@@ -3866,24 +3866,57 @@ def patch_target_no_eol_at_eof(sbox):
patch_file_path = make_patch_path(sbox)
iota_path = os.path.join(wc_dir, 'iota')
+ mu_path = sbox.ospath('A/mu')
iota_contents = [
"This is the file iota."
]
+ mu_contents = [
+ "context\n",
+ "context\n",
+ "context\n",
+ "context\n",
+ "This is the file mu.\n",
+ "context\n",
+ "context\n",
+ "context\n",
+ "context", # no newline at end of file
+ ]
+
svntest.main.file_write(iota_path, ''.join(iota_contents))
+ svntest.main.file_write(mu_path, ''.join(mu_contents))
expected_output = svntest.wc.State(wc_dir, {
'iota' : Item(verb='Sending'),
+ 'A/mu' : Item(verb='Sending'),
})
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.tweak('iota', wc_rev=2)
+ expected_status.tweak('A/mu', wc_rev=2)
svntest.actions.run_and_verify_commit(wc_dir, expected_output,
expected_status, None, wc_dir)
unidiff_patch = [
- "--- iota\t(revision 1)\n",
+ "Index: A/mu\n",
+ "===================================================================\n",
+ "--- A/mu\t(revision 2)\n",
+ "+++ A/mu\t(working copy)\n",
+ "@@ -2,8 +2,8 @@ context\n",
+ " context\n",
+ " context\n",
+ " context\n",
+ "-This is the file mu.\n",
+ "+It is really the file mu.\n",
+ " context\n",
+ " context\n",
+ " context\n",
+ " context\n",
+ "\\ No newline at end of file\n",
+ "Index: iota\n",
+ "===================================================================\n",
+ "--- iota\t(revision 2)\n",
"+++ iota\t(working copy)\n",
- "@@ -1,7 +1,7 @@\n",
- "-This is the file iota.\n"
+ "@@ -1 +1 @@\n",
+ "-This is the file iota.\n",
"\\ No newline at end of file\n",
"+It is really the file 'iota'.\n",
"\\ No newline at end of file\n",
@@ -3894,15 +3927,29 @@ def patch_target_no_eol_at_eof(sbox):
iota_contents = [
"It is really the file 'iota'."
]
+ mu_contents = [
+ "context\n",
+ "context\n",
+ "context\n",
+ "context\n",
+ "It is really the file mu.\n",
+ "context\n",
+ "context\n",
+ "context\n",
+ "context", # no newline at end of file
+ ]
expected_output = [
+ 'U %s\n' % os.path.join(wc_dir, 'A/mu'),
'U %s\n' % os.path.join(wc_dir, 'iota'),
]
expected_disk = svntest.main.greek_state.copy()
expected_disk.tweak('iota', contents=''.join(iota_contents))
+ expected_disk.tweak('A/mu', contents=''.join(mu_contents))
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.tweak('iota', status='M ', wc_rev=2)
+ expected_status.tweak('A/mu', status='M ', wc_rev=2)
expected_skip = wc.State('', { })