Using the diff3 algorithm in the patch code was a bad idea. Diff3 isn't designed for this. It works nicely if all hunks apply cleanly, but not in the general case where hunks might not match at all. So remove use of svn_wc_merge4() in favour of a simple svn_io_copy_file() of the the patched result into the working copy.
Using the diff3 algorithm in the patch code was a bad idea.
Diff3 isn't designed for this. It works nicely if all hunks apply cleanly,
but not in the general case where hunks might not match at all.
So remove use of svn_wc_merge4() in favour of a simple svn_io_copy_file()
of the the patched result into the working copy.

* subversion/libsvn_client/patch.c
  (patch_target_t): Remove ORIGINAL, ORIGINAL_RAW, and ORIGINAL_PATH members.
   We don't need the "original" stream anymore.
  (init_patch_target): Don't open the original stream anymore.
  (copy_lines_to_target): Don't write to the original stream anymore.
  (apply_one_hunk): Don't copy hunk text to the original stream anymore.
   Adjust a comment.
  (apply_one_patch): Stop using svn_wc_merge4() to apply modifications to
   the patch target. Just copy the patched temporary file on top of the target
   instead. Adjust some comments.


git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@880577 13f79535-47bb-0310-9956-ffa450edef68

YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion