📄 svn_ra.h
字号:
const char *repos_URL,
const svn_ra_callbacks_t *callbacks,
void *callback_baton,
apr_hash_t *config,
apr_pool_t *pool);
/** Get the latest revision number from the repository. This is
* useful for the `svn status' command. :)
*
* Use @a pool for memory allocation.
*/
svn_error_t *(*get_latest_revnum) (void *session_baton,
svn_revnum_t *latest_revnum,
apr_pool_t *pool);
/** Get the latest revision number at time @a tm.
*
* Use @a pool for memory allocation.
*/
svn_error_t *(*get_dated_revision) (void *session_baton,
svn_revnum_t *revision,
apr_time_t tm,
apr_pool_t *pool);
/** Set the property @a name to @a value on revision @a rev.
*
* If @a value is @c NULL, delete the named revision property.
*
* Please note that properties attached to revisions are **unversioned**.
*
* Use @a pool for memory allocation.
*/
svn_error_t *(*change_rev_prop) (void *session_baton,
svn_revnum_t rev,
const char *name,
const svn_string_t *value,
apr_pool_t *pool);
/** Set @a *props to the list of unversioned properties attached to
* revision @a rev. The hash maps (<tt>const char *</tt>) names to
* (<tt>@c svn_string_t *</tt>) values.
*
* Use @a pool for memory allocation.
*/
svn_error_t *(*rev_proplist) (void *session_baton,
svn_revnum_t rev,
apr_hash_t **props,
apr_pool_t *pool);
/** Set @a *value to the value of unversioned property @a name attached to
* revision @a rev. If @a rev has no property by that name, set @a *value
* to @c NULL.
*
* Use @a pool for memory allocation.
*/
svn_error_t *(*rev_prop) (void *session_baton,
svn_revnum_t rev,
const char *name,
svn_string_t **value,
apr_pool_t *pool);
/** Set @a *editor and @a *edit_baton to an editor for committing changes
* to the repository, using @a log_msg as the log message. The
* revisions being committed against are passed to the editor
* functions, starting with the rev argument to @c open_root. The path
* root of the commit is in the @a session_baton's url.
*
* These three functions all share @c close_baton:
*
* * @c get_func is used by the RA layer to fetch any WC properties
* during the commit.
*
* * @c set_func is used by the RA layer to set any WC properties,
* after the commit completes.
*
* * @c close_func is used by the RA layer to bump the revisions of
* each committed item, after the commit completes. It may be
* called multiple times.
*
* Any of these functions may be @c NULL.
*
* 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 @c close_edit will return successfully
* (unless it encountered an error before invoking @a callback).
*
* The callback will not be called if the commit was a no-op
* (i.e. nothing was committed);
*
* The caller may not perform any RA operations using
* @a session_baton before finishing the edit.
*
* Use @a pool for memory allocation.
*/
svn_error_t *(*get_commit_editor) (void *session_baton,
const svn_delta_editor_t **editor,
void **edit_baton,
const char *log_msg,
svn_commit_callback_t callback,
void *callback_baton,
apr_pool_t *pool);
/** Fetch the contents and properties of file @a path at @a revision.
* Interpret @a path relative to the url in @a session_baton. Use
* @a pool for all allocations.
*
* If @a revision is @c SVN_INVALID_REVNUM (meaning 'head') and
* @a *fetched_rev is not @c NULL, then this function will set
* @a *fetched_rev to the actual revision that was retrieved. (Some
* callers want to know, and some don't.)
*
* If @a stream is non @c NULL, push the contents of the file at @a stream.
*
* If @a props is non @c NULL, set @a *props to contain the properties of
* the file. This means *all* properties: not just ones controlled by
* the user and stored in the repository fs, but non-tweakable ones
* generated by the SCM system itself (e.g. 'wcprops', 'entryprops',
* etc.) The keys are <tt>const char *</tt>, values are
* <tt>@c svn_string_t *</tt>.
*
* The stream handlers for @a stream may not perform any RA
* operations using @a session_baton.
*/
svn_error_t *(*get_file) (void *session_baton,
const char *path,
svn_revnum_t revision,
svn_stream_t *stream,
svn_revnum_t *fetched_rev,
apr_hash_t **props,
apr_pool_t *pool);
/** If @a dirents is non @c NULL, set @a *dirents to contain all the entries
* of directory @a path at @a revision. The keys of @a dirents will be
* entry names (<tt>const char *</tt>), and the values dirents
* (<tt>@c svn_dirent_t *</tt>). Use @a pool for all allocations.
*
* @a path is interpreted relative to the url in @a session_baton.
*
* If @a revision is @c SVN_INVALID_REVNUM (meaning 'head') and
* @a *fetched_rev is not @c NULL, then this function will set
* @a *fetched_rev to the actual revision that was retrieved. (Some
* callers want to know, and some don't.)
*
* If @a props is non @c NULL, set @a *props to contain the properties of
* the directory. This means *all* properties: not just ones controlled by
* the user and stored in the repository fs, but non-tweakable ones
* generated by the SCM system itself (e.g. 'wcprops', 'entryprops',
* etc.) The keys are <tt>const char *</tt>, values are
* <tt>@c svn_string_t *</tt>.
*/
svn_error_t *(*get_dir) (void *session_baton,
const char *path,
svn_revnum_t revision,
apr_hash_t **dirents,
svn_revnum_t *fetched_rev,
apr_hash_t **props,
apr_pool_t *pool);
/** Ask the network layer to update a working copy.
*
* The client initially provides an @a update_editor/@a baton to the
* RA layer; this editor contains knowledge of where the change will
* begin in the working copy (when @c open_root() is called).
*
* In return, the client receives a @a reporter/@a report_baton. The
* client then describes its working-copy revision numbers by making
* calls into the @a reporter structure; the RA layer assumes that all
* paths are relative to the URL used to create @a session_baton.
*
* When finished, the client calls @a reporter->finish_report(). The
* RA layer then does a complete drive of @a update_editor, ending with
* @c close_edit(), to update the working copy.
*
* @a update_target is an optional single path component will restrict
* the scope of things affected by the update to an entry in the
* directory represented by the @a session_baton's URL, or empty if the
* entire directory is meant to be updated.
*
* The working copy will be updated to @a revision_to_update_to, or the
* "latest" revision if this arg is invalid.
*
* The caller may not perform any RA operations using
* @a session_baton before finishing the report, and may not perform
* any RA operations using @a session_baton from within the editing
* operations of @a update_editor.
*
* Use @a pool for memory allocation.
*/
svn_error_t *(*do_update) (void *session_baton,
const svn_ra_reporter_t **reporter,
void **report_baton,
svn_revnum_t revision_to_update_to,
const char *update_target,
svn_boolean_t recurse,
const svn_delta_editor_t *update_editor,
void *update_baton,
apr_pool_t *pool);
/** Ask the network layer to 'switch' a working copy to a new
* @a switch_url; it's another form of @c do_update().
*
* The client initially provides an @a switch_editor/@a baton to the RA
* layer; this editor contains knowledge of where the change will
* begin in the working copy (when @c open_root() is called).
*
* In return, the client receives a @a reporter/@a report_baton. The
* client then describes its working-copy revision numbers by making
* calls into the @a reporter structure; the RA layer assumes that all
* paths are relative to the URL used to create @a session_baton.
*
* When finished, the client calls @a reporter->finish_report(). The
* RA layer then does a complete drive of @a switch_editor, ending with
* @c close_edit(), to switch the working copy.
*
* @a switch_target is an optional single path component will restrict
* the scope of things affected by the switch to an entry in the
* directory represented by the @a session_baton's URL, or empty if the
* entire directory is meant to be switched.
*
* The working copy will be switched to @a revision_to_switch_to, or the
* "latest" revision if this arg is invalid.
*
* The caller may not perform any RA operations using
* @a session_baton before finishing the report, and may not perform
* any RA operations using @a session_baton from within the editing
* operations of @a switch_editor.
*
* Use @a pool for memory allocation.
*/
svn_error_t *(*do_switch) (void *session_baton,
const svn_ra_reporter_t **reporter,
void **report_baton,
svn_revnum_t revision_to_switch_to,
const char *switch_target,
svn_boolean_t recurse,
const char *switch_url,
const svn_delta_editor_t *switch_editor,
void *switch_baton,
apr_pool_t *pool);
/** Ask the network layer to describe the status of a working copy
* with respect to @a revision of the repository (or HEAD, if @a
* revision is invalid).
*
* The client initially provides an @a status_editor/@a baton to the RA
* layer; this editor contains knowledge of where the change will
* begin in the working copy (when @c open_root() is called).
*
* In return, the client receives a @a reporter/@a report_baton. The
* client then describes its working-copy revision numbers by making
* calls into the @a reporter structure; the RA layer assumes that all
* paths are relative to the URL used to create @a session_baton.
*
* When finished, the client calls @a reporter->finish_report(). The RA
* layer then does a complete drive of @a status_editor, ending with
* @c close_edit(), to report, essentially, what would be modified in
* the working copy were the client to call @c do_update().
* @a status_target is an optional single path component will restrict
* the scope of the status report to an entry in the directory
* represented by the @a session_baton's URL, or empty if the entire
* directory is meant to be examined.
*
* The caller may not perform any RA operations using
* @a session_baton before finishing the report, and may not perform
* any RA operations using @a session_baton from within the editing
* operations of @a status_editor.
*
* Use @a pool for memory allocation.
*/
svn_error_t *(*do_status) (void *session_baton,
const svn_ra_reporter_t **reporter,
void **report_baton,
const char *status_target,
svn_revnum_t revision,
svn_boolean_t recurse,
const svn_delta_editor_t *status_editor,
void *status_baton,
apr_pool_t *pool);
/** Ask the network layer to 'diff' a working copy against @a versus_url;
* it's another form of @c do_update().
*
* [Please note: this function cannot be used to diff a single
* file, only a working copy directory. See the do_switch()
* function for more details.]
*
* The client initially provides a @a diff_editor/@a baton to the RA
* layer; this editor contains knowledge of where the common diff
* root is in the working copy (when @c open_root() is called).
*
* In return, the client receives a @a reporter/@a report_baton. The
* client then describes its working-copy revision numbers by making
* calls into the @a reporter structure; the RA layer assumes that all
* paths are relative to the URL used to create @a session_baton.
*
* When finished, the client calls @a reporter->finish_report(). The
* RA layer then does a complete drive of @a diff_editor, ending with
* @c close_edit(), to transmit the diff.
*
* @a diff_target is an optional single path component will restrict
* the scope of the diff to an entry in the directory represented by
* the @a session_baton's URL, or empty if the entire directory is
* meant to be one of the diff paths.
*
* The working copy will be diffed against @a versus_url as it exists
* in revision @a revision, or as it is in head if @a revision is
* @c SVN_INVALID_REVNUM.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -