Subversion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Functions
Copy paths in the working copy and repository.

Data Structures

struct  svn_client_copy_source_t
 A structure which describes the source of a copy operation–its path, revision, and peg revision. More...
 

Typedefs

typedef struct
svn_client_copy_source_t 
svn_client_copy_source_t
 A structure which describes the source of a copy operation–its path, revision, and peg revision. More...
 

Functions

svn_error_tsvn_client_copy7 (const apr_array_header_t *sources, const char *dst_path, svn_boolean_t copy_as_child, svn_boolean_t make_parents, svn_boolean_t ignore_externals, svn_boolean_t metadata_only, svn_boolean_t pin_externals, const apr_hash_t *externals_to_pin, const apr_hash_t *revprop_table, svn_commit_callback2_t commit_callback, void *commit_baton, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Copy each source in sources to dst_path. More...
 
svn_error_tsvn_client_copy6 (const apr_array_header_t *sources, const char *dst_path, svn_boolean_t copy_as_child, svn_boolean_t make_parents, svn_boolean_t ignore_externals, 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_copy7(), but doesn't support meta_data_only and cannot pin externals. More...
 
svn_error_tsvn_client_copy5 (svn_commit_info_t **commit_info_p, const apr_array_header_t *sources, const char *dst_path, svn_boolean_t copy_as_child, svn_boolean_t make_parents, svn_boolean_t ignore_externals, const apr_hash_t *revprop_table, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Similar to svn_client_copy6(), but returns the commit info in *commit_info_p rather than through a callback function. More...
 
svn_error_tsvn_client_copy4 (svn_commit_info_t **commit_info_p, const apr_array_header_t *sources, const char *dst_path, svn_boolean_t copy_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_copy5(), with ignore_externals set to FALSE. More...
 
svn_error_tsvn_client_copy3 (svn_commit_info_t **commit_info_p, const char *src_path, const svn_opt_revision_t *src_revision, const char *dst_path, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Similar to svn_client_copy4(), with only one src_path, copy_as_child set to FALSE, revprop_table passed as NULL, and make_parents set to FALSE. More...
 
svn_error_tsvn_client_copy2 (svn_commit_info_t **commit_info_p, const char *src_path, const svn_opt_revision_t *src_revision, const char *dst_path, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Similar to svn_client_copy3(), with the difference that if dst_path already exists and is a directory, copy the item into that directory, keeping its name (the last component of src_path). More...
 
svn_error_tsvn_client_copy (svn_client_commit_info_t **commit_info_p, const char *src_path, const svn_opt_revision_t *src_revision, const char *dst_path, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Similar to svn_client_copy2(), but uses svn_client_commit_info_t for commit_info_p. More...
 

Detailed Description

Typedef Documentation

A structure which describes the source of a copy operation–its path, revision, and peg revision.

Since
New in 1.5.

Function Documentation

svn_error_t* svn_client_copy ( svn_client_commit_info_t **  commit_info_p,
const char *  src_path,
const svn_opt_revision_t src_revision,
const char *  dst_path,
svn_client_ctx_t ctx,
apr_pool_t *  pool 
)

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

Deprecated:
Provided for backward compatibility with the 1.2 API.
svn_error_t* svn_client_copy2 ( svn_commit_info_t **  commit_info_p,
const char *  src_path,
const svn_opt_revision_t src_revision,
const char *  dst_path,
svn_client_ctx_t ctx,
apr_pool_t *  pool 
)

Similar to svn_client_copy3(), with the difference that if dst_path already exists and is a directory, copy 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.
svn_error_t* svn_client_copy3 ( svn_commit_info_t **  commit_info_p,
const char *  src_path,
const svn_opt_revision_t src_revision,
const char *  dst_path,
svn_client_ctx_t ctx,
apr_pool_t *  pool 
)

Similar to svn_client_copy4(), with only one src_path, copy_as_child set to FALSE, revprop_table passed as NULL, and make_parents set to FALSE.

Also, use src_revision as both the operational and peg revision.

Since
New in 1.4.
Deprecated:
Provided for backward compatibility with the 1.4 API.
svn_error_t* svn_client_copy4 ( svn_commit_info_t **  commit_info_p,
const apr_array_header_t *  sources,
const char *  dst_path,
svn_boolean_t  copy_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_copy5(), with ignore_externals set to FALSE.

Since
New in 1.5.
Deprecated:
Provided for backward compatibility with the 1.5 API.
svn_error_t* svn_client_copy5 ( svn_commit_info_t **  commit_info_p,
const apr_array_header_t *  sources,
const char *  dst_path,
svn_boolean_t  copy_as_child,
svn_boolean_t  make_parents,
svn_boolean_t  ignore_externals,
const apr_hash_t *  revprop_table,
svn_client_ctx_t ctx,
apr_pool_t *  pool 
)

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

Since
New in 1.6.
Deprecated:
Provided for backward compatibility with the 1.6 API.
svn_error_t* svn_client_copy6 ( const apr_array_header_t *  sources,
const char *  dst_path,
svn_boolean_t  copy_as_child,
svn_boolean_t  make_parents,
svn_boolean_t  ignore_externals,
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_copy7(), but doesn't support meta_data_only and cannot pin externals.

Since
New in 1.7.
Deprecated:
Provided for backward compatibility with the 1.8 API.
svn_error_t* svn_client_copy7 ( const apr_array_header_t *  sources,
const char *  dst_path,
svn_boolean_t  copy_as_child,
svn_boolean_t  make_parents,
svn_boolean_t  ignore_externals,
svn_boolean_t  metadata_only,
svn_boolean_t  pin_externals,
const apr_hash_t *  externals_to_pin,
const apr_hash_t *  revprop_table,
svn_commit_callback2_t  commit_callback,
void *  commit_baton,
svn_client_ctx_t ctx,
apr_pool_t *  pool 
)

Copy each source in sources to dst_path.

If multiple sources are given, dst_path must be a directory, and sources will be copied as children of dst_path.

sources is an array of svn_client_copy_source_t * elements, either all referring to local WC items or all referring to versioned items in the repository.

If sources has only one item, attempt to copy it to dst_path. If copy_as_child is TRUE and dst_path already exists, attempt to copy the item as a child of dst_path. If copy_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 sources has multiple items, and copy_as_child is TRUE, all sources are copied as children of dst_path. If any child of dst_path already exists with the same name any item in sources, 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 sources has multiple items, and copy_as_child is FALSE, fail with SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.

If dst_path is a URL, use the authentication baton in ctx and ctx->log_msg_func3/ctx->log_msg_baton3 to immediately attempt to commit the copy action in the repository.

If dst_path is not a URL, then this is just a variant of svn_client_add(), where the sources are scheduled for addition as copies. No changes will happen to the repository until a commit occurs. This scheduling can be removed with svn_client_revert2().

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

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

If metadata_only is TRUE and copying a file in a working copy, everything in the metadata is updated as if the node is moved, but the actual disk copy 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 pin_externals is set, pin URLs in copied externals definitions to their current revision unless they were already pinned to a particular revision. A pinned external uses a URL which points at a fixed revision, rather than the HEAD revision. Externals in the copy destination are pinned to either a working copy base revision or the HEAD revision of a repository (as of the time the copy operation is performed), depending on the type of the copy source:

   copy source: working copy (WC)       REPOS
  ------------+------------------------+---------------------------+
   copy    WC | external's WC BASE rev | external's repos HEAD rev |
   dest:      |------------------------+---------------------------+
        REPOS | external's WC BASE rev | external's repos HEAD rev |
  ------------+------------------------+---------------------------+

If the copy source is a working copy, then all externals must be checked out, be at a single-revision, contain no local modifications, and contain no switched subtrees. Else, SVN_ERR_WC_PATH_UNEXPECTED_STATUS is returned.

If non-NULL, externals_to_pin restricts pinning to a subset of externals. It is a hash table keyed by either a local absolute path or a URL at which an svn:externals property is set. The hash table contains apr_array_header_t* elements as returned by svn_wc_parse_externals_description3(). These arrays contain elements of type svn_wc_external_item2_t*, each of which corresponds to a single line of an svn:externals definition. Externals corresponding to these items will be pinned, other externals will not be pinned. If externals_to_pin is NULL then all externals are pinned. If pin_externals is FALSE then externals_to_pin is ignored.

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, invoke it with ctx->notify_baton2 for each item added at the new location, passing the new, relative path of the added item.

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.9.