📄 svn_repos.h
字号:
svn_repos_replay2(svn_fs_root_t *root, const char *base_dir, svn_revnum_t low_water_mark, svn_boolean_t send_deltas, const svn_delta_editor_t *editor, void *edit_baton, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool);/** * Similar to svn_repos_replay2(), but with @a base_dir set to @c "", * @a low_water_mark set to @c SVN_INVALID_REVNUM, @a send_deltas * set to @c FALSE, and @a authz_read_func and @a authz_read_baton * set to @c NULL. * * @deprecated Provided for backward compatibility with the 1.3 API. */svn_error_t *svn_repos_replay(svn_fs_root_t *root, const svn_delta_editor_t *editor, void *edit_baton, apr_pool_t *pool);/* ---------------------------------------------------------------*//* Making commits. *//** * Return an @a editor and @a edit_baton to commit changes to @a session->fs, * beginning at location 'rev:@a base_path', where "rev" is the argument * given to open_root(). * * @a repos is a previously opened repository. @a repos_url is the * decoded URL to the base of the repository, and is used to check * copyfrom paths. @a txn is a filesystem transaction object to use * during the commit, or @c NULL to indicate that this function should * create (and fully manage) a new transaction. * * Iff @a user is not @c NULL, store it as the author of the commit * transaction. * * Iff @a log_msg is not @c NULL, store it as the log message * associated with the commit transaction. * * Iff @a authz_callback is provided, check read/write authorizations * on paths accessed by editor operations. An operation which fails * due to authz will return SVN_ERR_AUTHZ_UNREADABLE or * SVN_ERR_AUTHZ_UNWRITABLE. * * Calling @a (*editor)->close_edit completes the commit. Before * @c close_edit returns, but after the commit has succeeded, it will * invoke @a callback with the new revision number, the commit date (as a * <tt>const char *</tt>), commit author (as a <tt>const char *</tt>), and * @a callback_baton as arguments. If @a callback returns an error, that * error will be returned from @c close_edit, otherwise if there was a * post-commit hook failure, then that error will be returned and will * have code SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED. * * Calling @a (*editor)->abort_edit aborts the commit, and will also * abort the commit transaction unless @a txn was supplied (not @c * NULL). Callers who supply their own transactions are responsible * for cleaning them up (either by committing them, or aborting them). * * @since New in 1.4. */svn_error_t *svn_repos_get_commit_editor4(const svn_delta_editor_t **editor, void **edit_baton, svn_repos_t *repos, svn_fs_txn_t *txn, const char *repos_url, const char *base_path, const char *user, const char *log_msg, svn_commit_callback2_t callback, void *callback_baton, svn_repos_authz_callback_t authz_callback, void *authz_baton, apr_pool_t *pool);/** * Similar to svn_repos_get_commit_editor4(), but * uses the svn_commit_callback_t type. * * @since New in 1.3. * * @deprecated Provided for backward compatibility with the 1.3 API. */svn_error_t *svn_repos_get_commit_editor3(const svn_delta_editor_t **editor, void **edit_baton, svn_repos_t *repos, svn_fs_txn_t *txn, const char *repos_url, const char *base_path, const char *user, const char *log_msg, svn_commit_callback_t callback, void *callback_baton, svn_repos_authz_callback_t authz_callback, void *authz_baton, apr_pool_t *pool);/** * Similar to svn_repos_get_commit_editor3(), but with @a * authz_callback and @a authz_baton set to @c NULL. * * @deprecated Provided for backward compatibility with the 1.2 API. */svn_error_t *svn_repos_get_commit_editor2(const svn_delta_editor_t **editor, void **edit_baton, svn_repos_t *repos, svn_fs_txn_t *txn, const char *repos_url, const char *base_path, const char *user, const char *log_msg, svn_commit_callback_t callback, void *callback_baton, apr_pool_t *pool);/** * Similar to svn_repos_get_commit_editor2(), but with @a txn always * set to @c NULL. * * @deprecated Provided for backward compatibility with the 1.1 API. */svn_error_t *svn_repos_get_commit_editor(const svn_delta_editor_t **editor, void **edit_baton, svn_repos_t *repos, const char *repos_url, const char *base_path, const char *user, const char *log_msg, svn_commit_callback_t callback, void *callback_baton, apr_pool_t *pool);/* ---------------------------------------------------------------*//* Finding particular revisions. *//** Set @a *revision to the revision number in @a repos's filesystem that was * youngest at time @a tm. */svn_error_t *svn_repos_dated_revision(svn_revnum_t *revision, svn_repos_t *repos, apr_time_t tm, apr_pool_t *pool); /** Given a @a root/@a path within some filesystem, return three pieces of * information allocated in @a pool: * * - set @a *committed_rev to the revision in which the object was * last modified. (In fs parlance, this is the revision in which * the particular node-rev-id was 'created'.) * * - set @a *committed_date to the date of said revision, or @c NULL * if not available. * * - set @a *last_author to the author of said revision, or @c NULL * if not available. */svn_error_t *svn_repos_get_committed_info(svn_revnum_t *committed_rev, const char **committed_date, const char **last_author, svn_fs_root_t *root, const char *path, apr_pool_t *pool);/** * Set @a *dirent to an @c svn_dirent_t associated with @a path in @a * root. If @a path does not exist in @a root, set @a *dirent to * NULL. Use @a pool for memory allocation. * * @since New in 1.2. */svn_error_t *svn_repos_stat(svn_dirent_t **dirent, svn_fs_root_t *root, const char *path, apr_pool_t *pool);/** Callback type for use with svn_repos_history(). @a path and @a * revision represent interesting history locations in the lifetime * of the path passed to svn_repos_history(). @a baton is the same * baton given to svn_repos_history(). @a pool is provided for the * convenience of the implementor, who should not expect it to live * longer than a single callback call. */typedef svn_error_t *(*svn_repos_history_func_t)(void *baton, const char *path, svn_revnum_t revision, apr_pool_t *pool);/** * Call @a history_func (with @a history_baton) for each interesting * history location in the lifetime of @a path in @a fs, from the * youngest of @a end and @ start to the oldest. Only cross * filesystem copy history if @a cross_copies is @c TRUE. And do all * of this in @a pool. * * If @a authz_read_func is non-NULL, then use it (and @a * authz_read_baton) to verify that @a path in @a end is readable; if * not, return SVN_ERR_AUTHZ_UNREADABLE. Also verify the readability * of every ancestral path/revision pair before pushing them at @a * history_func. If a pair is deemed unreadable, then do not send * them; instead, immediately stop traversing history and return * SVN_NO_ERROR. * * @since New in 1.1. */svn_error_t *svn_repos_history2(svn_fs_t *fs, const char *path, svn_repos_history_func_t history_func, void *history_baton, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, svn_revnum_t start, svn_revnum_t end, svn_boolean_t cross_copies, apr_pool_t *pool);/** * Similar to svn_repos_history2(), but with @a authz_read_func * and @a authz_read_baton always set to NULL. * * @deprecated Provided for backward compatibility with the 1.0 API. */svn_error_t *svn_repos_history(svn_fs_t *fs, const char *path, svn_repos_history_func_t history_func, void *history_baton, svn_revnum_t start, svn_revnum_t end, svn_boolean_t cross_copies, apr_pool_t *pool);/** * Set @a *locations to be a mapping of the revisions to the paths of * the file @a fs_path present at the repository in revision * @a peg_revision, where the revisions are taken out of the array * @a location_revisions. * * @a location_revisions is an array of svn_revnum_t's and @a *locations * maps 'svn_revnum_t *' to 'const char *'. * * If optional @a authz_read_func is non-NULL, then use it (and @a * authz_read_baton) to verify that the peg-object is readable. If not, * return SVN_ERR_AUTHZ_UNREADABLE. Also use the @a authz_read_func * to check that every path returned in the hash is readable. If an * unreadable path is encountered, stop tracing and return * SVN_NO_ERROR. * * @a pool is used for all allocations. * * @since New in 1.1. */svn_error_t *svn_repos_trace_node_locations(svn_fs_t *fs, apr_hash_t **locations, const char *fs_path, svn_revnum_t peg_revision, apr_array_header_t *location_revisions, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool);/* ### other queries we can do someday -- * fetch the last revision created by <user> (once usernames become revision properties!) * fetch the last revision where <path> was modified *//* ---------------------------------------------------------------*//* Retrieving log messages. *//** * Invoke @a receiver with @a receiver_baton on each log message from * @a start to @a end in @a repos's filesystem. @a start may be greater * or less than @a end; this just controls whether the log messages are * processed in descending or ascending revision number order. * * If @a start or @a end is @c SVN_INVALID_REVNUM, it defaults to youngest. * * If @a paths is non-null and has one or more elements, then only show * revisions in which at least one of @a paths was changed (i.e., if * file, text or props changed; if dir, props or entries changed or any node * changed below it). Each path is a <tt>const char *</tt> representing * an absolute path in the repository. * * If @a limit is non-zero then only invoke @a receiver on the first * @a limit logs. * * If @a discover_changed_paths, then each call to @a receiver passes a * hash mapping paths committed in that revision to information about them * as the receiver's @a changed_paths argument. * Otherwise, each call to @a receiver passes null for @a changed_paths. * * If @a strict_node_history is set, copy history (if any exists) will * not be traversed while harvesting revision logs for each path. * * If any invocation of @a receiver returns error, return that error * immediately and without wrapping it. *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -