Subversion
Functions
Switch a working copy to another location.

Functions

svn_error_tsvn_client_switch3 (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_boolean_t ignore_ancestry, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Switch an existing working copy directory to a different repository location. More...
 
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)
 Similar to svn_client_switch3() but with ignore_ancestry always set to TRUE. More...
 
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. More...
 

Detailed Description

Function Documentation

◆ svn_client_switch()

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_client_switch2()

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 
)

Similar to svn_client_switch3() but with ignore_ancestry always set to TRUE.

Since
New in 1.5.
Deprecated:
Provided for backward compatibility with the 1.4 API.

◆ svn_client_switch3()

svn_error_t* svn_client_switch3 ( 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_boolean_t  ignore_ancestry,
svn_client_ctx_t ctx,
apr_pool_t *  pool 
)

Switch an existing working copy directory to a different repository location.

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

Parameters
[out]result_revIf non-NULL, the value of the revision to which the working copy was actually switched.
[in]pathThe directory to be switched. This need not be the root of a working copy.
[in]urlThe repository URL to switch to.
[in]peg_revisionThe peg revision.
[in]revisionThe operative revision.
[in]depthThe depth of the operation. If svn_depth_infinity, switch fully recursively. Else if 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.
[in]depth_is_stickyIf TRUE, and depth is not svn_depth_unknown, then in addition to switching path, also set its sticky ambient depth value to depth.
[in]ignore_externalsIf TRUE, don't process externals definitions as part of this operation.
[in]allow_unver_obstructionsIf TRUE, then tolerate existing unversioned items that obstruct incoming 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 checkout. Working properties of obstructing items are set equal to the base properties.
If FALSE, then abort if there are any unversioned obstructing items.
[in]ignore_ancestryIf FALSE, then verify that the file or directory at path shares some common version control ancestry with the switch URL location (represented by the combination of url, peg_revision, and revision), and returning SVN_ERR_CLIENT_UNRELATED_RESOURCES if they do not. If TRUE, no such sanity checks are performed.
[in]ctxThe standard client context, used for authentication and notification. The notifier is invoked for paths affected by the switch, and also for files which may be restored from the pristine store after being previously removed from the working copy.
[in]poolUsed for any temporary allocation.
Returns
A pointer to an svn_error_t of the type (this list is not exhaustive):
SVN_ERR_CLIENT_BAD_REVISION if revision is not one of svn_opt_revision_number, svn_opt_revision_head, or svn_opt_revision_date.
If no error occurred, return SVN_NO_ERROR.
Since
New in 1.7.
See also
svn_depth_t
svn_client_ctx_t
Revisions and Peg Revisions for a discussion of operative and peg revisions.