📄 svn_client.h
字号:
/** revision of textbase */ svn_revnum_t revision; /** copyfrom-url or NULL if not a copied item */ const char *copyfrom_url; /** copyfrom-rev, valid when copyfrom_url != NULL */ svn_revnum_t copyfrom_rev; /** state flags */ apr_byte_t state_flags; /** An array of `svn_prop_t *' changes to wc properties. If adding * to this array, allocate the svn_prop_t and its contents in * wcprop_changes->pool, so that it has the same lifetime as this * svn_client_commit_item_t. * * See http://subversion.tigris.org/issues/show_bug.cgi?id=806 for * what would happen if the post-commit process didn't group these * changes together with all other changes to the item :-). */ apr_array_header_t *wcprop_changes;} svn_client_commit_item2_t;/** * Return a duplicate of @a item, allocated in @a pool. No part of the new * structure will be shared with @a item. * * @since New in 1.3. */svn_client_commit_item2_t *svn_client_commit_item2_dup(const svn_client_commit_item2_t *item, apr_pool_t *pool);/** The commit candidate structure. * * @deprecated Provided for backward compatibility with the 1.2 API. */typedef struct svn_client_commit_item_t{ /** absolute working-copy path of item */ const char *path; /** node kind (dir, file) */ svn_node_kind_t kind; /** commit URL for this item */ const char *url; /** revision (copyfrom-rev if _IS_COPY) */ svn_revnum_t revision; /** copyfrom-url */ const char *copyfrom_url; /** state flags */ apr_byte_t state_flags; /** An array of `svn_prop_t *' changes to wc properties. If adding * to this array, allocate the svn_prop_t and its contents in * wcprop_changes->pool, so that it has the same lifetime as this * svn_client_commit_item_t. * * See http://subversion.tigris.org/issues/show_bug.cgi?id=806 for * what would happen if the post-commit process didn't group these * changes together with all other changes to the item :-). */ apr_array_header_t *wcprop_changes;} svn_client_commit_item_t;/** Callback type used by commit-y operations to get a commit log message * from the caller. * * Set @a *log_msg to the log message for the commit, allocated in @a * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file * to the path of any temporary file which might be holding that log * message, or @c NULL if no such file exists (though, if @a *log_msg is * @c NULL, this value is undefined). The log message MUST be a UTF8 * string with LF line separators. * * @a commit_items is a read-only array of @c svn_client_commit_item2_t * structures, which may be fully or only partially filled-in, * depending on the type of commit operation. * * @a baton is provided along with the callback for use by the handler. * * All allocations should be performed in @a pool. * * @since New in 1.3. */typedef svn_error_t *(*svn_client_get_commit_log2_t) (const char **log_msg, const char **tmp_file, const apr_array_header_t *commit_items, void *baton, apr_pool_t *pool);/** Callback type used by commit-y operations to get a commit log message * from the caller. * * Set @a *log_msg to the log message for the commit, allocated in @a * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file * to the path of any temporary file which might be holding that log * message, or @c NULL if no such file exists (though, if @a *log_msg is * @c NULL, this value is undefined). The log message MUST be a UTF8 * string with LF line separators. * * @a commit_items is a read-only array of @c svn_client_commit_item_t * structures, which may be fully or only partially filled-in, * depending on the type of commit operation. * * @a baton is provided along with the callback for use by the handler. * * All allocations should be performed in @a pool. * * @deprecated Provided for backward compatibility with the 1.2 API. */typedef svn_error_t *(*svn_client_get_commit_log_t) (const char **log_msg, const char **tmp_file, apr_array_header_t *commit_items, void *baton, apr_pool_t *pool);/** Callback type used by svn_client_blame() to notify the caller * that line @a line_no of the blamed file was last changed in * @a revision by @a author on @a date, and that the contents were * @a line. * * All allocations should be performed in @a pool. * * @note If there is no blame information for this line, @a revision will be * invalid and @a author and @a date will be NULL. * * @note New in 1.4 is that the line is defined to contain only the line * content (and no [partial] EOLs; which was undefined in older versions). * Using this callback with svn_client_blame() or svn_client_blame2() * will still give you the old behaviour. */typedef svn_error_t *(*svn_client_blame_receiver_t) (void *baton, apr_int64_t line_no, svn_revnum_t revision, const char *author, const char *date, const char *line, apr_pool_t *pool);/** The difference type in an svn_diff_summarize_t structure. * * @since New in 1.4. */typedef enum svn_client_diff_summarize_kind_t{ /** An item with no text modifications */ svn_client_diff_summarize_kind_normal, /** An added item */ svn_client_diff_summarize_kind_added, /** An item with text modifications */ svn_client_diff_summarize_kind_modified, /** A deleted item */ svn_client_diff_summarize_kind_deleted} svn_client_diff_summarize_kind_t;/** A struct that describes the diff of an item. Passed to * @c svn_diff_summarize_func_t. * * @note Fields may be added to the end of this structure in future * versions. Therefore, users shouldn't allocate structures of this * type, to preserve binary compatibility. * * @since New in 1.4. */typedef struct svn_client_diff_summarize_t{ /** Path relative to the target. */ const char *path; /** Change kind */ svn_client_diff_summarize_kind_t summarize_kind; /** Properties changed? */ svn_boolean_t prop_changed; /** File or dir */ svn_node_kind_t node_kind;} svn_client_diff_summarize_t; /** * Return a duplicate of @a diff, allocated in @a pool. No part of the new * structure will be shared with @a diff. * * @since New in 1.4. */svn_client_diff_summarize_t *svn_client_diff_summarize_dup(const svn_client_diff_summarize_t *diff, apr_pool_t *pool);/** A callback used in svn_client_diff_summarize() and * svn_client_diff_summarize_peg() for reporting a @a diff summary. * * All allocations should be performed in @a pool. * * @a baton is a closure object; it should be provided by the implementation, * and passed by the caller. * * @since New in 1.4. */typedef svn_error_t *(*svn_client_diff_summarize_func_t) (const svn_client_diff_summarize_t *diff, void *baton, apr_pool_t *pool); /** A client context structure, which holds client specific callbacks, * batons, serves as a cache for configuration options, and other various * and sundry things. In order to avoid backwards compatibility problems * clients should use svn_client_create_context() to allocate and * intialize this structure instead of doing so themselves. */typedef struct svn_client_ctx_t{ /** main authentication baton. */ svn_auth_baton_t *auth_baton; /** notification callback function. * This will be called by notify_func2() by default. * @deprecated Provided for backward compatibility with the 1.1 API. */ svn_wc_notify_func_t notify_func; /** notification callback baton for notify_func() * @deprecated Provided for backward compatibility with the 1.1 API. */ void *notify_baton; /** Log message callback function. NULL means that Subversion * should try not attempt to fetch a log message. * @deprecated Provided for backward compatibility with the 1.2 API. */ svn_client_get_commit_log_t log_msg_func; /** log message callback baton * @deprecated Provided for backward compatibility with the 1.2 API. */ void *log_msg_baton; /** a hash mapping of <tt>const char *</tt> configuration file names to * @c svn_config_t *'s. For example, the '~/.subversion/config' file's * contents should have the key "config". May be left unset (or set to * NULL) to use the built-in default settings and not use any configuration. */ apr_hash_t *config; /** a callback to be used to see if the client wishes to cancel the running * operation. */ svn_cancel_func_t cancel_func; /** a baton to pass to the cancellation callback. */ void *cancel_baton; /** notification function, defaulting to a function that forwards * to notify_func(). * @since New in 1.2. */ svn_wc_notify_func2_t notify_func2; /** notification baton for notify_func2(). * @since New in 1.2. */ void *notify_baton2; /** Log message callback function. NULL means that Subversion * should try log_msg_func. * @since New in 1.3. */ svn_client_get_commit_log2_t log_msg_func2; /** callback baton for log_msg_func2 * @since New in 1.3. */ void *log_msg_baton2; /** Notification callback for network progress information. * May be NULL if not used. * @since New in 1.3. */ svn_ra_progress_notify_func_t progress_func; /** Callback baton for progress_func. * @since New in 1.3. */ void *progress_baton;} svn_client_ctx_t;/** * @name Authentication information file names * * Names of files that contain authentication information. * * These filenames are decided by libsvn_client, since this library * implements all the auth-protocols; libsvn_wc does nothing but * blindly store and retrieve these files from protected areas. * @{ */#define SVN_CLIENT_AUTH_USERNAME "username"#define SVN_CLIENT_AUTH_PASSWORD "password"/** @} *//** Initialize a client context. * Set @a *ctx to a client context object, allocated in @a pool, that * represents a particular instance of an svn client. * * In order to avoid backwards compatibility problems, clients must * use this function to intialize and allocate the * @c svn_client_ctx_t structure rather than doing so themselves, as * the size of this structure may change in the future. * * The current implementation never returns error, but callers should * still check for error, for compatibility with future versions. */ svn_error_t *svn_client_create_context(svn_client_ctx_t **ctx, apr_pool_t *pool);/** * Checkout a working copy of @a URL at @a revision, looked up at @a * peg_revision, using @a path as the root directory of the newly * checked out working copy, and 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 actually * checked out from the repository. * * If @a peg_revision->kind is @c svn_opt_revision_unspecified, then it * defaults to @c svn_opt_revision_head. * * @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. * * If @a ignore_externals is set, don't process externals definitions * as part of this operation. * * If @a ctx->notify_func2 is non-null, invoke @a ctx->notify_func2 with
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -