Skip to main content

svn_client_add5

Function svn_client_add5 

Source
pub unsafe extern "C" fn svn_client_add5(
    path: *const c_char,
    depth: svn_depth_t,
    force: svn_boolean_t,
    no_ignore: svn_boolean_t,
    no_autoprops: svn_boolean_t,
    add_parents: svn_boolean_t,
    ctx: *mut svn_client_ctx_t,
    scratch_pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

Schedule a working copy @a path for addition to the repository.

If @a depth is #svn_depth_empty, add just @a path and nothing below it. If #svn_depth_files, add @a path and any file children of @a path. If #svn_depth_immediates, add @a path, any file children, and any immediate subdirectories (but nothing underneath those subdirectories). If #svn_depth_infinity, add @a path and everything under it fully recursively.

@a path’s parent must be under revision control already (unless @a add_parents is TRUE), but @a path is not.

If @a force is not set and @a path is already under version control, return the error #SVN_ERR_ENTRY_EXISTS. If @a force is set, do not error on already-versioned items. When used on a directory in conjunction with a @a depth value greater than #svn_depth_empty, this has the effect of scheduling for addition any unversioned files and directories scattered within even a versioned tree (up to @a depth).

If @a ctx->notify_func2 is non-NULL, then for each added item, call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the added item.

If @a no_ignore is FALSE, don’t add any file or directory (or recurse into any directory) that is unversioned and found by recursion (as opposed to being the explicit target @a path) and whose name matches the svn:ignore property on its parent directory or the global-ignores list in @a ctx->config. If @a no_ignore is TRUE, do include such files and directories. (Note that an svn:ignore property can influence this behaviour only when recursing into an already versioned directory with @a force.)

If @a no_autoprops is TRUE, don’t set any autoprops on added files. If @a no_autoprops is FALSE then all added files have autprops set as per the auto-props list in @a ctx->config and the value of any @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by the nearest parents of @a path which are already under version control.

If @a add_parents is TRUE, recurse up @a path’s directory and look for a versioned directory. If found, add all intermediate paths between it and @a path. If not found, return #SVN_ERR_CLIENT_NO_VERSIONED_PARENT.

@a scratch_pool is used for temporary allocations only.

@par Important: 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().

@since New in 1.8.