Author: stsp
Date: Wed Oct 17 11:07:26 2012
New Revision: 1399178

URL: http://svn.apache.org/viewvc?rev=1399178&view=rev
Log:
On the 1.7.x-r1399174 branch, merge r1399174 from trunk.

Resolve a trivial conflict:

* subversion/tests/cmdline/patch_tests.py
  (patch_lacking_trailing_eol): Use os.path.join(wc_dir, 'foo') instead
    of sbox.ospath('foo').

Modified:
    subversion/branches/1.7.x-r1399174/   (props changed)
    subversion/branches/1.7.x-r1399174/subversion/libsvn_diff/parse-diff.c
    subversion/branches/1.7.x-r1399174/subversion/tests/cmdline/patch_tests.py

Propchange: subversion/branches/1.7.x-r1399174/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1399174

Modified: subversion/branches/1.7.x-r1399174/subversion/libsvn_diff/parse-diff.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1399174/subversion/libsvn_diff/parse-diff.c?rev=1399178&r1=1399177&r2=1399178&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1399174/subversion/libsvn_diff/parse-diff.c 
(original)
+++ subversion/branches/1.7.x-r1399174/subversion/libsvn_diff/parse-diff.c Wed 
Oct 17 11:07:26 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-r1399174/subversion/tests/cmdline/patch_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1399174/subversion/tests/cmdline/patch_tests.py?rev=1399178&r1=1399177&r2=1399178&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1399174/subversion/tests/cmdline/patch_tests.py 
(original)
+++ subversion/branches/1.7.x-r1399174/subversion/tests/cmdline/patch_tests.py 
Wed Oct 17 11:07:26 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('', { })
 


Reply via email to