pub unsafe extern "C" fn svn_client_patch(
patch_abspath: *const c_char,
wc_dir_abspath: *const c_char,
dry_run: svn_boolean_t,
strip_count: c_int,
reverse: svn_boolean_t,
ignore_whitespace: svn_boolean_t,
remove_tempfiles: svn_boolean_t,
patch_func: svn_client_patch_func_t,
patch_baton: *mut c_void,
ctx: *mut svn_client_ctx_t,
scratch_pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description
Apply a unidiff patch that’s located at absolute path @a patch_abspath to the working copy directory at @a wc_dir_abspath.
This function makes a best-effort attempt at applying the patch. It might skip patch targets which cannot be patched (e.g. targets that are outside of the working copy). It will also reject hunks which cannot be applied to a target in case the hunk’s context does not match anywhere in the patch target.
If @a dry_run is TRUE, the patching process is carried out, and full notification feedback is provided, but the working copy is not modified.
@a strip_count specifies how many leading path components should be stripped from paths obtained from the patch. It is an error if a negative strip count is passed.
If @a reverse is @c TRUE, apply patches in reverse, deleting lines the patch would add and adding lines the patch would delete.
If @a ignore_whitespace is TRUE, allow patches to be applied if they only differ from the target by whitespace.
If @a remove_tempfiles is TRUE, lifetimes of temporary files created during patching will be managed internally. Otherwise, the caller should take ownership of these files, the names of which can be obtained by passing a @a patch_func callback.
If @a patch_func is non-NULL, invoke @a patch_func with @a patch_baton for each patch target processed.
If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with @a ctx->notify_baton2 as patching progresses.
If @a ctx->cancel_func is non-NULL, invoke it passing @a ctx->cancel_baton at various places during the operation.
Use @a scratch_pool for temporary allocations.
@since New in 1.7.