Make 'svn patch' dump hunks which don't apply into a reject file, rather than silently ignoring them. We dump hunks to a file with the same name as the target, with the suffix ".svnpatch.rej" appended.
Make 'svn patch' dump hunks which don't apply into a reject file,
rather than silently ignoring them. We dump hunks to a file with
the same name as the target, with the suffix ".svnpatch.rej" appended.

Reject files which already exists are simply overwritten.
Targets which had hunks rejected are not flagged as conflicted yet,
but I'd like to add that later.

* subversion/libsvn_client/patch.c
  (patch_target_t): New members REJECT, REJECT_RAW, and REJECT_PATH.
   Rename CONFLICTED member to HAD_REJECTS.
  (init_patch_target): Initialise new members.
  (determine_hunk_line): Rather than falling back to the original offset
   if no suitable line offset can be determined for a hunk, return line
   zero, which does not exist since we're counting lines starting with 1.
  (reject_hunk): New helper.
  (apply_one_hunk): If no line can be found for a hunk, reject it rather
   than ignoring it.
  (maybe_send_patch_target_notification): Track rename in patch_target_t.
  (apply_one_patch): Close the reject stream when we're done applying hunks.
   Copy the reject file into the working copy if hunks were rejected.
   Tweak some comments.

jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion