Subversion 1.6.16
Functions

Switch a working copy to another location.

Client working copy management

Functions

svn_error_tsvn_client_switch2 (svn_revnum_t *result_rev, const char *path, const char *url, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, svn_depth_t depth, svn_boolean_t depth_is_sticky, svn_boolean_t ignore_externals, svn_boolean_t allow_unver_obstructions, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Switch working tree path to url@peg_revision at revision, authenticating with the authentication baton cached in ctx.
svn_error_tsvn_client_switch (svn_revnum_t *result_rev, const char *path, const char *url, const svn_opt_revision_t *revision, svn_boolean_t recurse, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Similar to svn_client_switch2() but with allow_unver_obstructions, ignore_externals, and depth_is_sticky always set to FALSE, and depth set according to recurse: if recurse is TRUE, set depth to svn_depth_infinity, if recurse is FALSE, set depth to svn_depth_files.

Function Documentation

svn_error_t* svn_client_switch ( svn_revnum_t result_rev,
const char *  path,
const char *  url,
const svn_opt_revision_t revision,
svn_boolean_t  recurse,
svn_client_ctx_t ctx,
apr_pool_t *  pool 
)

Similar to svn_client_switch2() but with allow_unver_obstructions, ignore_externals, and depth_is_sticky always set to FALSE, and depth set according to recurse: if recurse is TRUE, set depth to svn_depth_infinity, if recurse is FALSE, set depth to svn_depth_files.

Deprecated:
Provided for backward compatibility with the 1.4 API.
svn_error_t* svn_client_switch2 ( svn_revnum_t result_rev,
const char *  path,
const char *  url,
const svn_opt_revision_t peg_revision,
const svn_opt_revision_t revision,
svn_depth_t  depth,
svn_boolean_t  depth_is_sticky,
svn_boolean_t  ignore_externals,
svn_boolean_t  allow_unver_obstructions,
svn_client_ctx_t ctx,
apr_pool_t *  pool 
)

Switch working tree path to url@peg_revision at revision, authenticating with the authentication baton cached in ctx.

If result_rev is not NULL, set *result_rev to the value of the revision to which the working copy was actually switched.

Summary of purpose: this is normally used to switch a working directory over to another line of development, such as a branch or a tag. Switching an existing working directory is more efficient than checking out url from scratch.

revision must be of kind svn_opt_revision_number, svn_opt_revision_head, or svn_opt_revision_date; otherwise, return SVN_ERR_CLIENT_BAD_REVISION.

If depth is svn_depth_infinity, switch fully recursively. Else if it is svn_depth_immediates, switch path and its file children (if any), and switch subdirectories but do not update them. Else if svn_depth_files, switch just file children, ignoring subdirectories completely. Else if svn_depth_empty, switch just path and touch nothing underneath it.

If depth_is_sticky is set and depth is not svn_depth_unknown, then in addition to switching PATH, also set its sticky ambient depth value to depth.

If ignore_externals is set, don't process externals definitions as part of this operation.

If allow_unver_obstructions is TRUE then the switch tolerates existing unversioned items that obstruct added paths. Only obstructions of the same type (file or dir) as the added item are tolerated. The text of obstructing files is left as-is, effectively treating it as a user modification after the switch. Working properties of obstructing items are set equal to the base properties. If allow_unver_obstructions is FALSE then the switch will abort if there are any unversioned obstructing items.

If ctx->notify_func2 is non-NULL, invoke it with ctx->notify_baton2 on paths affected by the switch. Also invoke it for files may be restored from the text-base because they were removed from the working copy.

Use pool for any temporary allocation.

Since:
New in 1.5.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines