Apply a patch to the working copy
[Client working copy management]


Functions

svn_error_tsvn_client_patch (const char *abs_patch_path, const char *local_abspath, svn_boolean_t dry_run, int strip_count, svn_boolean_t reverse, const apr_array_header_t *include_patterns, const apr_array_header_t *exclude_patterns, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Apply a unidiff patch that's located at absolute path abs_patch_path to the working copy at local_abspath.

Function Documentation

svn_error_t* svn_client_patch const char *  abs_patch_path,
const char *  local_abspath,
svn_boolean_t  dry_run,
int  strip_count,
svn_boolean_t  reverse,
const apr_array_header_t *  include_patterns,
const apr_array_header_t *  exclude_patterns,
svn_client_ctx_t ctx,
apr_pool_t *  pool
 

Apply a unidiff patch that's located at absolute path abs_patch_path to the working copy at local_abspath.

If dry_run is TRUE, the patching process is carried out, and full notification feedback is provided, but the working copy is not modified.

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 reverse is TRUE, apply patches in reverse, deleting lines the patch would add and adding lines the patch would delete. This is useful when applying a unidiff which was created with the original and modified files swapped due to human error.

Excluding patch targets from the patching process is possible by passing include_patterns and/or exclude_patterns arrays containing elements of type const char *. If include_patterns is not NULL, patch targets not matching any glob pattern in include_patterns will not be patched. If exclude_patterns is not NULL, patch targets matching any glob pattern in exclude_patterns will not be patched The match is performed on the target path as parsed from the patch file, after canonicalization. If both include_patterns and exclude_patterns are specified, the include_patterns are applied first, i.e. the exclude_patterns are applied to all targets which matched one of the include_patterns.

If ctx->notify_func2 is non-NULL, invoke ctx->notify_func2 with ctx->notify_baton2 as patching progresses.

If ctx->cancel_func is non-NULL, invoke it passing ctx->cancel_baton at various places during the operation.

Since:
New in 1.7.


Generated on Fri Mar 19 04:06:05 2010 for Subversion by  doxygen 1.3.9.1