diff options
Diffstat (limited to 'subversion/libsvn_client/patch.c')
-rw-r--r-- | subversion/libsvn_client/patch.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/subversion/libsvn_client/patch.c b/subversion/libsvn_client/patch.c index 1b2d86b1da94..549d20c11484 100644 --- a/subversion/libsvn_client/patch.c +++ b/subversion/libsvn_client/patch.c @@ -343,7 +343,9 @@ strip_path(const char **result, const char *path, int strip_count, components = svn_path_decompose(path, scratch_pool); if (strip_count > components->nelts) return svn_error_createf(SVN_ERR_CLIENT_PATCH_BAD_STRIP_COUNT, NULL, - _("Cannot strip %u components from '%s'"), + Q_("Cannot strip %u component from '%s'", + "Cannot strip %u components from '%s'", + strip_count), strip_count, svn_dirent_local_style(path, scratch_pool)); @@ -1018,6 +1020,7 @@ init_patch_target(patch_target_t **patch_target, target_content_t *content; svn_boolean_t has_text_changes = FALSE; svn_boolean_t follow_moves; + const char *tempdir_abspath; has_text_changes = ((patch->hunks && patch->hunks->nelts > 0) || patch->binary_patch); @@ -1223,8 +1226,10 @@ init_patch_target(patch_target_t **patch_target, } /* Open a temporary file to write the patched result to. */ + SVN_ERR(svn_wc__get_tmpdir(&tempdir_abspath, wc_ctx, + target->local_abspath, scratch_pool, scratch_pool)); SVN_ERR(svn_io_open_unique_file3(&target->patched_file, - &target->patched_path, NULL, + &target->patched_path, tempdir_abspath, remove_tempfiles ? svn_io_file_del_on_pool_cleanup : svn_io_file_del_none, @@ -1236,7 +1241,7 @@ init_patch_target(patch_target_t **patch_target, /* Open a temporary stream to write rejected hunks to. */ SVN_ERR(svn_stream_open_unique(&target->reject_stream, - &target->reject_path, NULL, + &target->reject_path, tempdir_abspath, remove_tempfiles ? svn_io_file_del_on_pool_cleanup : svn_io_file_del_none, @@ -2145,8 +2150,8 @@ reject_hunk(patch_target_t *target, target_content_t *content, if (prop_name) { /* ### Print 'Added', 'Deleted' or 'Modified' instead of 'Property'. */ - svn_stream_printf(target->reject_stream, - pool, "Property: %s" APR_EOL_STR, prop_name); + SVN_ERR(svn_stream_printf(target->reject_stream, + pool, "Property: %s" APR_EOL_STR, prop_name)); atat = prop_atat; } else |