📄 svn_client.h
字号:
* @a ctx->notify_baton2 as the checkout progresses. * * If @a recurse is true, check out recursively. Otherwise, check out * just the directory represented by @a URL and its immediate * non-directory children, but none of its child directories (if any). * * If @a URL refers to a file rather than a directory, return the * error SVN_ERR_UNSUPPORTED_FEATURE. If @a URL does not exist, * return the error SVN_ERR_RA_ILLEGAL_URL. * * Use @a pool for any temporary allocation. * * @since New in 1.2. */svn_error_t *svn_client_checkout2(svn_revnum_t *result_rev, const char *URL, const char *path, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, svn_boolean_t recurse, svn_boolean_t ignore_externals, svn_client_ctx_t *ctx, apr_pool_t *pool);/** * Similar to svn_client_checkout2(), but with the @a peg_revision * parameter always set to @c svn_opt_revision_unspecified and * ignore_externals always set to @c FALSE. * * @deprecated Provided for backward compatibility with the 1.1 API. */svn_error_t *svn_client_checkout(svn_revnum_t *result_rev, const char *URL, const char *path, const svn_opt_revision_t *revision, svn_boolean_t recurse, svn_client_ctx_t *ctx, apr_pool_t *pool);/** * Update working trees @a paths to @a revision, authenticating with the * authentication baton cached in @a ctx. @a paths is an array of const * char * paths to be updated. Unversioned paths that are direct children * of a versioned path will cause an update that attempts to add that path, * other unversioned paths are skipped. If @a result_revs is not * @c NULL an array of svn_revnum_t will be returned with each element set * to the revision to which @a revision was resolved. * * @a revision must be of kind @c svn_opt_revision_number, * @c svn_opt_revision_head, or @c svn_opt_revision_date. If @a * revision does not meet these requirements, return the error * @c SVN_ERR_CLIENT_BAD_REVISION. * * The paths in @a paths can be from multiple working copies from multiple * repositories, but even if they all come from the same repository there * is no guarantee that revision represented by @c svn_opt_revision_head * will remain the same as each path is updated. * * If @a ignore_externals is set, don't process externals definitions * as part of this operation. * * If @a recurse is true, update directories recursively; otherwise, * update just their immediate entries, but not their child * directories (if any). * * If @a ctx->notify_func2 is non-null, invoke @a ctx->notify_func2 with * @a ctx->notify_baton2 for each item handled by the update, and also for * files restored from text-base. If @a ctx->cancel_func is non-null, invoke * it passing @a ctx->cancel_baton at various places during the update. * * Use @a pool for any temporary allocation. * * @since New in 1.2. */svn_error_t *svn_client_update2(apr_array_header_t **result_revs, const apr_array_header_t *paths, const svn_opt_revision_t *revision, svn_boolean_t recurse, svn_boolean_t ignore_externals, svn_client_ctx_t *ctx, apr_pool_t *pool);/** * Similar to svn_client_update2() except that it accepts only a single * target in @a path, returns a single revision if @a result_rev is * not NULL, and ignore_externals is always set to @c FALSE. * * @deprecated Provided for backward compatibility with the 1.1 API. */svn_error_t *svn_client_update(svn_revnum_t *result_rev, const char *path, const svn_opt_revision_t *revision, svn_boolean_t recurse, svn_client_ctx_t *ctx, apr_pool_t *pool);/** Switch working tree @a path to @a url at @a revision, * authenticating with the authentication baton cached in @a ctx. If * @a result_rev is not @c NULL, set @a *result_rev to the value of * the revision to which the working copy was actually switched. * * Summary of purpose: this is normally used to switch a working * directory over to another line of development, such as a branch or * a tag. Switching an existing working directory is more efficient * than checking out @a url from scratch. * * @a revision must be of kind @c svn_opt_revision_number, * @c svn_opt_revision_head, or @c svn_opt_revision_date; otherwise, * return @c SVN_ERR_CLIENT_BAD_REVISION. * * If @a recurse is true, and @a path is a directory, switch it * recursively; otherwise, switch just @a path and its immediate * entries, but not its child directories (if any). * * If @a ctx->notify_func2 is non-null, invoke it with @a ctx->notify_baton2 * on paths affected by the switch. Also invoke it for files may be restored * from the text-base because they were removed from the working copy. * * Use @a pool for any temporary allocation. */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);/** * Schedule a working copy @a path for addition to the repository. * * @a path's parent must be under revision control already, but @a * path is not. If @a recursive is set, then assuming @a path is a * directory, all of its contents will be scheduled for addition as * well. * * If @a force is not set and @a path is already under version * control, return the error @c SVN_ERR_ENTRY_EXISTS. If @a force is * set, do not error on already-versioned items. When used on a * directory in conjunction with the @a recursive flag, this has the * effect of scheduling for addition unversioned files and directories * scattered deep within a versioned tree. * * 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 files or directories that match * ignore patterns. * * 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_revert(). * * @since New in 1.3. */svn_error_t *svn_client_add3(const char *path, svn_boolean_t recursive, svn_boolean_t force, svn_boolean_t no_ignore, svn_client_ctx_t *ctx, apr_pool_t *pool);/** * Similar to svn_client_add3(), but with the @a no_ignore parameter * always set to @c FALSE. * * @deprecated Provided for backward compatibility with the 1.2 API. */svn_error_t *svn_client_add2(const char *path, svn_boolean_t recursive, svn_boolean_t force, svn_client_ctx_t *ctx, apr_pool_t *pool);/** * Similar to svn_client_add2(), but with the @a force parameter * always set to @c FALSE. * * @deprecated Provided for backward compatibility with the 1.0 API. */svn_error_t *svn_client_add(const char *path, svn_boolean_t recursive, svn_client_ctx_t *ctx, apr_pool_t *pool);/** Create a directory, either in a repository or a working copy. * * If @a paths contains URLs, use the authentication baton in @a ctx * and @a message to immediately attempt to commit the creation of the * directories in @a paths in the repository. If the commit succeeds, * allocate (in @a pool) and populate @a *commit_info_p. * * Else, create the directories on disk, and attempt to schedule them * for addition (using svn_client_add(), whose docstring you should * read). * * @a ctx->log_msg_func/@a ctx->log_msg_baton 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, when the directory has been created * (successfully) in the working copy, call @a ctx->notify_func2 with * @a ctx->notify_baton2 and the path of the new directory. Note that this is * only called for items added to the working copy. * * @since New in 1.3. */svn_error_t *svn_client_mkdir2(svn_commit_info_t **commit_info_p, const apr_array_header_t *paths, svn_client_ctx_t *ctx, apr_pool_t *pool);/** Same as svn_client_mkdir2(), but takes the @c svn_client_commit_info_t * for @a commit_info_p. * * @deprecated Provided for backward compatibility with the 1.2 API. */svn_error_t *svn_client_mkdir(svn_client_commit_info_t **commit_info_p, const apr_array_header_t *paths, svn_client_ctx_t *ctx, apr_pool_t *pool); /** Delete items from a repository or working copy. * * If the paths in @a paths are URLs, use the authentication baton in * @a ctx and @a ctx->log_msg_func/@a ctx->log_msg_baton to * immediately attempt to commit a deletion of the URLs from the * repository. If the commit succeeds, allocate (in @a pool) and * populate @a *commit_info_p. Every path must belong to the same * repository. * * Else, schedule the working copy paths in @a paths for removal from * the repository. Each path's parent must be under revision control. * This is just a *scheduling* operation. No changes will happen to * the repository until a commit occurs. This scheduling can be * removed with svn_client_revert(). If a path is a file it is * immediately removed from the working copy. If the path is a * directory it will remain in the working copy but all the files, and * all unversioned items, it contains will be removed. If @a force is * not set then this operation will fail if any path contains locally * modified and/or unversioned items. If @a force is set such items * will be deleted. * * @a ctx->log_msg_func/@a ctx->log_msg_baton 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, then for each item deleted, call * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted * item. * * @since New in 1.3. */svn_error_t *svn_client_delete2(svn_commit_info_t **commit_info_p, const apr_array_header_t *paths, svn_boolean_t force, svn_client_ctx_t *ctx, apr_pool_t *pool);/** Similar to svn_client_delete2(), but takes @c svn_client_commit_info_t * for @a commit_info_p. * * @deprecated Provided for backward compatibility with the 1.2 API. */svn_error_t *svn_client_delete(svn_client_commit_info_t **commit_info_p, const apr_array_header_t *paths, svn_boolean_t force, svn_client_ctx_t *ctx, apr_pool_t *pool);/** Import file or directory @a path into repository directory @a url at * head, authenticating with the authentication baton cached in @a ctx, * and using @a ctx->log_msg_func/@a ctx->log_msg_baton to get a log message * for the (implied) commit. Set @a *commit_info_p to the results of the * commit, allocated in @a pool. If some components of @a url do not exist * then create parent directories as necessary. * * If @a path is a directory, the contents of that directory are * imported directly into the directory identified by @a url. Note that the * directory @a path itself is not imported -- that is, the basename of * @a path is not part of the import. * * If @a path is a file, then the dirname of @a url is the directory * receiving the import. The basename of @a url is the filename in the * repository. In this case if @a url already exists, return error. * * If @a ctx->notify_func2 is non-null, then call @a ctx->notify_func2 with * @a ctx->notify_baton2 as the import progresses, with any of the following * actions: @c svn_wc_notify_commit_added, * @c svn_wc_notify_commit_postfix_txdelta. * * Use @a pool for any temporary allocation. * * @a ctx->log_msg_func/@a ctx->log_msg_baton are a callback/baton combo that * this function can use to query for a commit log message when one is needed. * * Use @a nonrecursive to indicate that imported directories should not * recurse into any subdirectories they may have. * * If @a no_ignore is FALSE, don't add files or directories that match * ignore patterns. * * ### kff todo: This import is similar to cvs import, in that it does * not change the source tree into a working copy. However, this * behavior confuses most people, and I think eventually svn _should_ * turn the tree into a working copy, or at least should offer the * option. However, doing so is a bit involved, and we don't need it * right now. * * @since New in 1.3. */svn_error_t *svn_client_import2(svn_commit_info_t **commit_info_p, const char *path, const char *url, svn_boolean_t nonrecursive, svn_boolean_t no_ignore, svn_client_ctx_t *ctx, apr_pool_t *pool);/** * Similar to svn_client_import2(), but with the @a no_ignore parameter * always set to @c FALSE and using @c svn_client_commit_info_t for * @a commit_info_p. *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -