svn_client_copy7

Function svn_client_copy7 

Source
pub unsafe extern "C" fn svn_client_copy7(
    sources: *const apr_array_header_t,
    dst_path: *const c_char,
    copy_as_child: svn_boolean_t,
    make_parents: svn_boolean_t,
    ignore_externals: svn_boolean_t,
    metadata_only: svn_boolean_t,
    pin_externals: svn_boolean_t,
    externals_to_pin: *const apr_hash_t,
    revprop_table: *const apr_hash_t,
    commit_callback: svn_commit_callback2_t,
    commit_baton: *mut c_void,
    ctx: *mut svn_client_ctx_t,
    pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

Copy each source in @a sources to @a dst_path.

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

@a 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 @a sources has only one item, attempt to copy it to @a dst_path. If @a copy_as_child is TRUE and @a dst_path already exists, attempt to copy the item as a child of @a dst_path. If @a copy_as_child is FALSE and @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.

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

If @a sources has multiple items, and @a copy_as_child is FALSE, fail with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.

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

If @a dst_path is not a URL, then this is just a variant of svn_client_add(), where the @a 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 @a make_parents is TRUE, create any non-existent parent directories also. Otherwise the parent of @a dst_path must already exist.

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

If @a metadata_only is @c 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 @a 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, @a 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 @a externals_to_pin is @c NULL then all externals are pinned. If @a pin_externals is @c FALSE then @a externals_to_pin is ignored.

If non-NULL, @a 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.

@a ctx->log_msg_func3/@a 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 @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2 for each item added at the new location, passing the new, relative path of the added item.

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

@since New in 1.9.