Loading...
Searching...
No Matches
Move paths in the working copy or repository.
Client working copy management

## Functions

svn_error_t * | svn_client_move7 (const apr_array_header_t *src_paths, const char *dst_path, svn_boolean_t move_as_child, svn_boolean_t make_parents, svn_boolean_t allow_mixed_revisions, svn_boolean_t metadata_only, const apr_hash_t *revprop_table, svn_commit_callback2_t commit_callback, void *commit_baton, svn_client_ctx_t *ctx, apr_pool_t *pool)
| Move src_paths to dst_path.
svn_error_t * | svn_client_move6 (const apr_array_header_t *src_paths, const char *dst_path, svn_boolean_t move_as_child, svn_boolean_t make_parents, const apr_hash_t *revprop_table, svn_commit_callback2_t commit_callback, void *commit_baton, svn_client_ctx_t *ctx, apr_pool_t *pool)
| Similar to svn_client_move7(), but with allow_mixed_revisions always set to `TRUE` and metadata_only always to `FALSE`.
svn_error_t * | svn_client_move5 (svn_commit_info_t **commit_info_p, const apr_array_header_t *src_paths, const char *dst_path, svn_boolean_t force, svn_boolean_t move_as_child, svn_boolean_t make_parents, const apr_hash_t *revprop_table, svn_client_ctx_t *ctx, apr_pool_t *pool)
| Similar to svn_client_move6(), but returns the commit info in *commit_info_p rather than through a callback function.
svn_error_t * | svn_client_move4 (svn_commit_info_t **commit_info_p, const char *src_path, const char *dst_path, svn_boolean_t force, svn_client_ctx_t *ctx, apr_pool_t *pool)
| Similar to svn_client_move5(), with only one src_path, move_as_child set to `FALSE`, revprop_table passed as NULL, and make_parents set to `FALSE`.
svn_error_t * | svn_client_move3 (svn_commit_info_t **commit_info_p, const char *src_path, const char *dst_path, svn_boolean_t force, svn_client_ctx_t *ctx, apr_pool_t *pool)
| Similar to svn_client_move4(), with the difference that if dst_path already exists and is a directory, move the item into that directory, keeping its name (the last component of src_path).
svn_error_t * | svn_client_move2 (svn_client_commit_info_t **commit_info_p, const char *src_path, const char *dst_path, svn_boolean_t force, svn_client_ctx_t *ctx, apr_pool_t *pool)
| Similar to svn_client_move3(), but uses svn_client_commit_info_t for commit_info_p.
svn_error_t * | svn_client_move (svn_client_commit_info_t **commit_info_p, const char *src_path, const svn_opt_revision_t *src_revision, const char *dst_path, svn_boolean_t force, svn_client_ctx_t *ctx, apr_pool_t *pool)
| Similar to svn_client_move2(), but an extra argument src_revision must be passed.

## Detailed Description

## Function Documentation

## svn_client_move()

svn_error_t * svn_client_move | ( | svn_client_commit_info_t ** | commit_info_p,
|  | const char * | src_path,
|  | const svn_opt_revision_t * | src_revision,
|  | const char * | dst_path,
|  | svn_boolean_t | force,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | pool )

Similar to svn_client_move2(), but an extra argument src_revision must be passed.

This has no effect, but must be of kind svn_opt_revision_unspecified or svn_opt_revision_head, otherwise error SVN_ERR_UNSUPPORTED_FEATURE is returned.

Deprecated
  Provided for backward compatibility with the 1.1 API.

## svn_client_move2()

svn_error_t * svn_client_move2 | ( | svn_client_commit_info_t ** | commit_info_p,
|  | const char * | src_path,
|  | const char * | dst_path,
|  | svn_boolean_t | force,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | pool )

Similar to svn_client_move3(), but uses svn_client_commit_info_t for commit_info_p.

Deprecated
  Provided for backward compatibility with the 1.2 API.

Since
  New in 1.2.

References SVN_DEPRECATED.

## svn_client_move3()

svn_error_t * svn_client_move3 | ( | svn_commit_info_t ** | commit_info_p,
|  | const char * | src_path,
|  | const char * | dst_path,
|  | svn_boolean_t | force,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | pool )

Similar to svn_client_move4(), with the difference that if dst_path already exists and is a directory, move the item into that directory, keeping its name (the last component of src_path).

Since
  New in 1.3.

Deprecated
  Provided for backward compatibility with the 1.3 API.

References SVN_DEPRECATED.

## svn_client_move4()

svn_error_t * svn_client_move4 | ( | svn_commit_info_t ** | commit_info_p,
|  | const char * | src_path,
|  | const char * | dst_path,
|  | svn_boolean_t | force,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | pool )

Similar to svn_client_move5(), with only one src_path, move_as_child set to `FALSE`, revprop_table passed as NULL, and make_parents set to `FALSE`.

Note: The behaviour of force changed in 1.5 (r860885 and r861421), when the 'move' semantics were improved to just move the source including any modified and/or unversioned items in it. Before that, force controlled what happened to such items, but now force is ignored.

Since
  New in 1.4.

Deprecated
  Provided for backward compatibility with the 1.4 API.

References SVN_DEPRECATED.

## svn_client_move5()

svn_error_t * svn_client_move5 | ( | svn_commit_info_t ** | commit_info_p,
|  | const apr_array_header_t * | src_paths,
|  | const char * | dst_path,
|  | svn_boolean_t | force,
|  | svn_boolean_t | move_as_child,
|  | svn_boolean_t | make_parents,
|  | const apr_hash_t * | revprop_table,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | pool )

Similar to svn_client_move6(), but returns the commit info in *commit_info_p rather than through a callback function.

A WC-to-WC move will include any modified and/or unversioned children. force is ignored.

Since
  New in 1.5.

Deprecated
  Provided for backward compatibility with the 1.6 API.

References SVN_DEPRECATED.

## svn_client_move6()

svn_error_t * svn_client_move6 | ( | const apr_array_header_t * | src_paths,
|  | const char * | dst_path,
|  | svn_boolean_t | move_as_child,
|  | svn_boolean_t | make_parents,
|  | const apr_hash_t * | revprop_table,
|  | svn_commit_callback2_t | commit_callback,
|  | void * | commit_baton,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | pool )

Similar to svn_client_move7(), but with allow_mixed_revisions always set to `TRUE` and metadata_only always to `FALSE`.

Since
  New in 1.7.

Deprecated
  Provided for backward compatibility with the 1.7 API.

References SVN_DEPRECATED.

## svn_client_move7()

svn_error_t * svn_client_move7 | ( | const apr_array_header_t * | src_paths,
|  | const char * | dst_path,
|  | svn_boolean_t | move_as_child,
|  | svn_boolean_t | make_parents,
|  | svn_boolean_t | allow_mixed_revisions,
|  | svn_boolean_t | metadata_only,
|  | const apr_hash_t * | revprop_table,
|  | svn_commit_callback2_t | commit_callback,
|  | void * | commit_baton,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | pool )

Move src_paths to dst_path.

src_paths is an array of (const char *) paths – either all WC paths or all URLs – of versioned items. If multiple src_paths are given, dst_path must be a directory and src_paths will be moved as children of dst_path.

If src_paths are repository URLs:

- dst_path must also be a repository URL.
- The authentication baton in ctx and ctx->log_msg_func/ctx->log_msg_baton are used to commit the move.
- The move operation will be immediately committed.

If src_paths are working copy paths:

- dst_path must also be a working copy path.
- ctx->log_msg_func3 and ctx->log_msg_baton3 are ignored.
- This is a scheduling operation. No changes will happen to the repository until a commit occurs. This scheduling can be removed with svn_client_revert2(). If one of src_paths is a file it is removed from the working copy immediately. If one of src_path is a directory it will remain in the working copy but all the files, and unversioned items, it contains will be removed.

If src_paths has only one item, attempt to move it to dst_path. If move_as_child is TRUE and dst_path already exists, attempt to move the item as a child of dst_path. If move_as_child is FALSE and dst_path already exists, fail with SVN_ERR_ENTRY_EXISTS if dst_path is a working copy path and SVN_ERR_FS_ALREADY_EXISTS if dst_path is a URL.

If src_paths has multiple items, and move_as_child is TRUE, all src_paths are moved as children of dst_path. If any child of dst_path already exists with the same name any item in src_paths, fail with SVN_ERR_ENTRY_EXISTS if dst_path is a working copy path and SVN_ERR_FS_ALREADY_EXISTS if dst_path is a URL.

If src_paths has multiple items, and move_as_child is FALSE, fail with SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.

If make_parents is TRUE, create any non-existent parent directories also. Otherwise, the parent of dst_path must already exist.

If allow_mixed_revisions is `FALSE`, SVN_ERR_WC_MIXED_REVISIONS will be raised if the move source is a mixed-revision subtree. If allow_mixed_revisions is TRUE, a mixed-revision move source is allowed but the move will degrade to a copy and a delete without local move tracking. This parameter should be set to FALSE except where backwards compatibility to svn_client_move6() is required.

If metadata_only is `TRUE` and moving a file in a working copy, everything in the metadata is updated as if the node is moved, but the actual disk move operation is not performed. This feature is useful for clients that want to keep the working copy in sync while the actual working copy is updated by some other task.

If non-NULL, revprop_table is a hash table holding additional, custom revision properties (const char * names mapped to svn_string_t * values) to be set on the new revision in the event that this is a committing operation. This table cannot contain any standard Subversion properties.

ctx->log_msg_func3/ctx->log_msg_baton3 are a callback/baton combo that this function can use to query for a commit log message when one is needed.

If ctx->notify_func2 is non-NULL, then for each item moved, call ctx->notify_func2 with the ctx->notify_baton2 twice, once to indicate the deletion of the moved thing, and once to indicate the addition of the new location of the thing.

### Is this really true? What about svn_wc_notify_commit_replaced()?

If commit_callback is non-NULL, then for each successful commit, call commit_callback with commit_baton and a svn_commit_info_t for the commit.

Since
  New in 1.8.

References SVN_DEPRECATED.