📄 svn_wc.h
字号:
*/svn_error_t *svn_wc_get_ancestry(char **url, svn_revnum_t *rev, const char *path, svn_wc_adm_access_t *adm_access, apr_pool_t *pool);/** A callback vtable invoked by the generic entry-walker function. */typedef struct svn_wc_entry_callbacks_t{ /** An @a entry was found at @a path. */ svn_error_t *(*found_entry)(const char *path, const svn_wc_entry_t *entry, void *walk_baton, apr_pool_t *pool); /* ### add more callbacks as new callers need them. */} svn_wc_entry_callbacks_t;/** * A generic entry-walker. * * Do a recursive depth-first entry-walk beginning on @a path, which can * be a file or dir. Call callbacks in @a walk_callbacks, passing * @a walk_baton to each. Use @a pool for looping, recursion, and to * allocate all entries returned. @a adm_access must be an access baton * for @a path. * * If @a cancel_func is non-null, call it with @a cancel_baton to determine * if the client has cancelled the operation. * * Like our other entries interfaces, entries that are in a 'deleted' * or 'absent' state (and not scheduled for re-addition) are not * discovered, unless @a show_hidden is true. * * When a new directory is entered, @c SVN_WC_ENTRY_THIS_DIR will always * be returned first. * * @note Callers should be aware that each directory will be * returned *twice*: first as an entry within its parent, and * subsequently as the '.' entry within itself. The two calls can be * distinguished by looking for @c SVN_WC_ENTRY_THIS_DIR in the 'name' * field of the entry. * * @since New in 1.2. */svn_error_t *svn_wc_walk_entries2(const char *path, svn_wc_adm_access_t *adm_access, const svn_wc_entry_callbacks_t *walk_callbacks, void *walk_baton, svn_boolean_t show_hidden, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool);/** * Similar to svn_wc_walk_entries2(), but without cancellation support. * * @deprecated Provided for backward compatibility with the 1.0 API. */svn_error_t *svn_wc_walk_entries(const char *path, svn_wc_adm_access_t *adm_access, const svn_wc_entry_callbacks_t *walk_callbacks, void *walk_baton, svn_boolean_t show_hidden, apr_pool_t *pool);/** Mark missing @a path as 'deleted' in its @a parent's list of entries. * * Return @c SVN_ERR_WC_PATH_FOUND if @a path isn't actually missing. */svn_error_t *svn_wc_mark_missing_deleted(const char *path, svn_wc_adm_access_t *parent, apr_pool_t *pool); /** Ensure that an administrative area exists for @a path, so that @a * path is a working copy subdir based on @a url at @a revision, and * with repository UUID @a uuid and repository root URL @a repos. * @a uuid and @a repos may be @c NULL. If non-@c NULL, @a repos must be a * prefix of @a url. * * If the administrative area does not exist, then create it and * initialize it to an unlocked state. * * If the administrative area already exists then the given @a url * must match the URL in the administrative area and the given * @a revision must match the BASE of the working copy dir unless * the admin directory is scheduled for deletion or the * SVN_ERR_WC_OBSTRUCTED_UPDATE error will be returned. * * Do not ensure existence of @a path itself; if @a path does not * exist, return error. * * @since New in 1.3. */svn_error_t *svn_wc_ensure_adm2(const char *path, const char *uuid, const char *url, const char *repos, svn_revnum_t revision, apr_pool_t *pool);/** Similar to svn_wc_ensure_adm2(), but with @a repos set to @c NULL. * * @deprecated Provided for backwards compatibility with the 1.2 API. */svn_error_t *svn_wc_ensure_adm(const char *path, const char *uuid, const char *url, svn_revnum_t revision, apr_pool_t *pool);/** Set the repository root URL of @a path to @a repos, if possible. * * @a adm_access must contain @a path and be write-locked, if @a path * is versioned. Return no error if path is missing or unversioned. * Use @a pool for temporary allocations. * * @note In some circumstances, the repository root can't be set * without making the working copy corrupt. In such cases, this * function just returns no error, without modifying the @a path entry. * * @note This function exists to make it possible to try to set the repository * root in old working copies; new working copies normally get this set at * creation time. * * @since New in 1.3. */svn_error_t *svn_wc_maybe_set_repos_root(svn_wc_adm_access_t *adm_access, const char *path, const char *repos, apr_pool_t *pool);/** * @defgroup svn_wc_status working copy status. * @{ * * We have two functions for getting working copy status: one function * for getting the status of exactly one thing, and another for * getting the statuses of (potentially) multiple things. * * The WebDAV concept of "depth" may be useful in understanding the * motivation behind this. Suppose we're getting the status of * directory D. The three depth levels would mean * * depth 0: D itself (just the named directory) * depth 1: D and its immediate children (D + its entries) * depth Infinity: D and all its descendants (full recursion) * * To offer all three levels, we could have one unified function, * taking a `depth' parameter. Unfortunately, because this function * would have to handle multiple return values as well as the single * return value case, getting the status of just one entity would * become cumbersome: you'd have to roll through a hash to find one * lone status. * * So we have svn_wc_status() for depth 0, and * svn_wc_get_status_editor() for depths 1 and 2, since the latter * two involve multiple return values. * * @note The status structures may contain a @c NULL ->entry field. * This indicates an item that is not versioned in the working copy. */enum svn_wc_status_kind{ /** does not exist */ svn_wc_status_none = 1, /** is not a versioned thing in this wc */ svn_wc_status_unversioned, /** exists, but uninteresting */ svn_wc_status_normal, /** is scheduled for addition */ svn_wc_status_added, /** under v.c., but is missing */ svn_wc_status_missing, /** scheduled for deletion */ svn_wc_status_deleted, /** was deleted and then re-added */ svn_wc_status_replaced, /** text or props have been modified */ svn_wc_status_modified, /** local mods received repos mods */ svn_wc_status_merged, /** local mods received conflicting repos mods */ svn_wc_status_conflicted, /** is unversioned but configured to be ignored */ svn_wc_status_ignored, /** an unversioned resource is in the way of the versioned resource */ svn_wc_status_obstructed, /** an unversioned path populated by an svn:externals property */ svn_wc_status_external, /** a directory doesn't contain a complete entries list */ svn_wc_status_incomplete};/** * Structure for holding the "status" of a working copy item. * * The item's entry data is in @a entry, augmented and possibly shadowed * by the other fields. @a entry is @c NULL if this item is not under * version control. * * @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.2. */typedef struct svn_wc_status2_t{ /** Can be @c NULL if not under version control. */ svn_wc_entry_t *entry; /** The status of the entries text. */ enum svn_wc_status_kind text_status; /** The status of the entries properties. */ enum svn_wc_status_kind prop_status; /** a directory can be 'locked' if a working copy update was interrupted. */ svn_boolean_t locked; /** a file or directory can be 'copied' if it's scheduled for * addition-with-history (or part of a subtree that is scheduled as such.). */ svn_boolean_t copied; /** a file or directory can be 'switched' if the switch command has been * used. */ svn_boolean_t switched; /** The entry's text status in the repository. */ enum svn_wc_status_kind repos_text_status; /** The entry's property status in the repository. */ enum svn_wc_status_kind repos_prop_status; /** The entry's lock in the repository, if any. */ svn_lock_t *repos_lock; /** Set to the URI (actual or expected) of the item. * @since New in 1.3 */ const char *url; /** * @defgroup svn_wc_status_ood WC out of date info from the repository * @{ * * When the working copy item is out of date compared to the * repository, the following fields represent the state of the * youngest revision of the item in the repository. If the working * copy is not out of date, the fields are initialized as described * below. */ /** Set to the youngest committed revision, or @c SVN_INVALID_REVNUM * if not out of date. * @since New in 1.3 */ svn_revnum_t ood_last_cmt_rev; /** Set to the most recent commit date, or @c 0 if not out of date. * @since New in 1.3 */ apr_time_t ood_last_cmt_date; /** Set to the node kind of the youngest commit, or @c svn_node_none * if not out of date. * @since New in 1.3 */ svn_node_kind_t ood_kind; /** Set to the user name of the youngest commit, or @c NULL if not * out of date or non-existent. Because a non-existent @c * svn:author property has the same behavior as an out of date * working copy, examine @c ood_last_cmt_rev to determine whether * the working copy is out of date. * @since New in 1.3 */ const char *ood_last_cmt_author; /** @} */ /* NOTE! Please update svn_wc_dup_status2() when adding new fields here. */} svn_wc_status2_t;/** * Same as @c svn_wc_status2_t, but without the svn_lock_t 'repos_lock' field. * * @deprecated Provided for backward compatibility with the 1.1 API. */typedef struct svn_wc_status_t{ /** Can be @c NULL if not under version control. */ svn_wc_entry_t *entry; /** The status of the entries text. */ enum svn_wc_status_kind text_status; /** The status of the entries properties. */ enum svn_wc_status_kind prop_status; /** a directory can be 'locked' if a working copy update was interrupted. */ svn_boolean_t locked; /** a file or directory can be 'copied' if it's scheduled for * addition-with-history (or part of a subtree that is scheduled as such.). */ svn_boolean_t copied; /** a file or directory can be 'switched' if the switch command has been * used. */ svn_boolean_t switched; /** The entry's text status in the repository. */ enum svn_wc_status_kind r
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -