#[repr(C)]pub struct svn_wc_diff_callbacks4_t {
pub file_opened: Option<unsafe extern "C" fn(tree_conflicted: *mut svn_boolean_t, skip: *mut svn_boolean_t, path: *const c_char, rev: svn_revnum_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>,
pub file_changed: Option<unsafe extern "C" fn(contentstate: *mut svn_wc_notify_state_t, propstate: *mut svn_wc_notify_state_t, tree_conflicted: *mut svn_boolean_t, path: *const c_char, tmpfile1: *const c_char, tmpfile2: *const c_char, rev1: svn_revnum_t, rev2: svn_revnum_t, mimetype1: *const c_char, mimetype2: *const c_char, propchanges: *const apr_array_header_t, originalprops: *mut apr_hash_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>,
pub file_added: Option<unsafe extern "C" fn(contentstate: *mut svn_wc_notify_state_t, propstate: *mut svn_wc_notify_state_t, tree_conflicted: *mut svn_boolean_t, path: *const c_char, tmpfile1: *const c_char, tmpfile2: *const c_char, rev1: svn_revnum_t, rev2: svn_revnum_t, mimetype1: *const c_char, mimetype2: *const c_char, copyfrom_path: *const c_char, copyfrom_revision: svn_revnum_t, propchanges: *const apr_array_header_t, originalprops: *mut apr_hash_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>,
pub file_deleted: Option<unsafe extern "C" fn(state: *mut svn_wc_notify_state_t, tree_conflicted: *mut svn_boolean_t, path: *const c_char, tmpfile1: *const c_char, tmpfile2: *const c_char, mimetype1: *const c_char, mimetype2: *const c_char, originalprops: *mut apr_hash_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>,
pub dir_deleted: Option<unsafe extern "C" fn(state: *mut svn_wc_notify_state_t, tree_conflicted: *mut svn_boolean_t, path: *const c_char, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>,
pub dir_opened: Option<unsafe extern "C" fn(tree_conflicted: *mut svn_boolean_t, skip: *mut svn_boolean_t, skip_children: *mut svn_boolean_t, path: *const c_char, rev: svn_revnum_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>,
pub dir_added: Option<unsafe extern "C" fn(state: *mut svn_wc_notify_state_t, tree_conflicted: *mut svn_boolean_t, skip: *mut svn_boolean_t, skip_children: *mut svn_boolean_t, path: *const c_char, rev: svn_revnum_t, copyfrom_path: *const c_char, copyfrom_revision: svn_revnum_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>,
pub dir_props_changed: Option<unsafe extern "C" fn(propstate: *mut svn_wc_notify_state_t, tree_conflicted: *mut svn_boolean_t, path: *const c_char, dir_was_added: svn_boolean_t, propchanges: *const apr_array_header_t, original_props: *mut apr_hash_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>,
pub dir_closed: Option<unsafe extern "C" fn(contentstate: *mut svn_wc_notify_state_t, propstate: *mut svn_wc_notify_state_t, tree_conflicted: *mut svn_boolean_t, path: *const c_char, dir_was_added: svn_boolean_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>,
}
Expand description
A callback vtable invoked by our diff-editors, as they receive diffs from the server. ‘svn diff’ and ‘svn merge’ implement their own versions of this vtable.
Common parameters:
If @a state is non-NULL, set @a *state to the state of the item after the operation has been performed. (In practice, this is only useful with merge, not diff; diff callbacks will probably set @a *state to #svn_wc_notify_state_unknown, since they do not change the state and therefore do not bother to know the state after the operation.) By default, @a state refers to the item’s content state. Functions concerned with property state have separate @a contentstate and @a propstate arguments.
If @a tree_conflicted is non-NULL, set @a *tree_conflicted to true if this operation caused a tree conflict, else to false. (Like with @a state, this is only useful with merge, not diff; diff callbacks should set this to false.)
@since New in 1.7.
Fields§
§file_opened: Option<unsafe extern "C" fn(tree_conflicted: *mut svn_boolean_t, skip: *mut svn_boolean_t, path: *const c_char, rev: svn_revnum_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>
This function is called before @a file_changed to allow callbacks to skip the most expensive processing of retrieving the file data.
file_changed: Option<unsafe extern "C" fn(contentstate: *mut svn_wc_notify_state_t, propstate: *mut svn_wc_notify_state_t, tree_conflicted: *mut svn_boolean_t, path: *const c_char, tmpfile1: *const c_char, tmpfile2: *const c_char, rev1: svn_revnum_t, rev2: svn_revnum_t, mimetype1: *const c_char, mimetype2: *const c_char, propchanges: *const apr_array_header_t, originalprops: *mut apr_hash_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>
A file @a path has changed. If @a tmpfile2 is non-NULL, the contents have changed and those changes can be seen by comparing @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2 of the file, respectively.
If known, the @c svn:mime-type value of each file is passed into @a mimetype1 and @a mimetype2; either or both of the values can be NULL. The implementor can use this information to decide if (or how) to generate differences.
@a propchanges is an array of (#svn_prop_t) structures. If it contains any elements, the original list of properties is provided in @a originalprops, which is a hash of #svn_string_t values, keyed on the property name.
file_added: Option<unsafe extern "C" fn(contentstate: *mut svn_wc_notify_state_t, propstate: *mut svn_wc_notify_state_t, tree_conflicted: *mut svn_boolean_t, path: *const c_char, tmpfile1: *const c_char, tmpfile2: *const c_char, rev1: svn_revnum_t, rev2: svn_revnum_t, mimetype1: *const c_char, mimetype2: *const c_char, copyfrom_path: *const c_char, copyfrom_revision: svn_revnum_t, propchanges: *const apr_array_header_t, originalprops: *mut apr_hash_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>
A file @a path was added. The contents can be seen by comparing @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2 of the file, respectively. (If either file is empty, the rev will be 0.)
If known, the @c svn:mime-type value of each file is passed into @a mimetype1 and @a mimetype2; either or both of the values can be NULL. The implementor can use this information to decide if (or how) to generate differences.
@a propchanges is an array of (#svn_prop_t) structures. If it contains any elements, the original list of properties is provided in @a originalprops, which is a hash of #svn_string_t values, keyed on the property name. If @a copyfrom_path is non-@c NULL, this add has history (i.e., is a copy), and the origin of the copy may be recorded as @a copyfrom_path under @a copyfrom_revision.
file_deleted: Option<unsafe extern "C" fn(state: *mut svn_wc_notify_state_t, tree_conflicted: *mut svn_boolean_t, path: *const c_char, tmpfile1: *const c_char, tmpfile2: *const c_char, mimetype1: *const c_char, mimetype2: *const c_char, originalprops: *mut apr_hash_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>
A file @a path was deleted. The [loss of] contents can be seen by comparing @a tmpfile1 and @a tmpfile2. @a originalprops provides the properties of the file.
§Some existing callers include WC “entry props” in @a originalprops.
If known, the @c svn:mime-type value of each file is passed into @a mimetype1 and @a mimetype2; either or both of the values can be NULL. The implementor can use this information to decide if (or how) to generate differences.
dir_deleted: Option<unsafe extern "C" fn(state: *mut svn_wc_notify_state_t, tree_conflicted: *mut svn_boolean_t, path: *const c_char, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>
A directory @a path was deleted.
dir_opened: Option<unsafe extern "C" fn(tree_conflicted: *mut svn_boolean_t, skip: *mut svn_boolean_t, skip_children: *mut svn_boolean_t, path: *const c_char, rev: svn_revnum_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>
A directory @a path has been opened. @a rev is the revision that the directory came from.
This function is called for any existing directory @a path before any of the callbacks are called for a child of @a path.
If the callback returns @c TRUE in @a *skip_children, children of this directory will be skipped.
dir_added: Option<unsafe extern "C" fn(state: *mut svn_wc_notify_state_t, tree_conflicted: *mut svn_boolean_t, skip: *mut svn_boolean_t, skip_children: *mut svn_boolean_t, path: *const c_char, rev: svn_revnum_t, copyfrom_path: *const c_char, copyfrom_revision: svn_revnum_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>
A directory @a path was added. @a rev is the revision that the directory came from.
This function is called for any new directory @a path before any of the callbacks are called for a child of @a path.
If @a copyfrom_path is non-@c NULL, this add has history (i.e., is a copy), and the origin of the copy may be recorded as @a copyfrom_path under @a copyfrom_revision.
dir_props_changed: Option<unsafe extern "C" fn(propstate: *mut svn_wc_notify_state_t, tree_conflicted: *mut svn_boolean_t, path: *const c_char, dir_was_added: svn_boolean_t, propchanges: *const apr_array_header_t, original_props: *mut apr_hash_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>
A list of property changes (@a propchanges) was applied to the directory @a path.
The array is a list of (#svn_prop_t) structures.
@a dir_was_added is set to #TRUE if the directory was added, and to #FALSE if the directory pre-existed.
dir_closed: Option<unsafe extern "C" fn(contentstate: *mut svn_wc_notify_state_t, propstate: *mut svn_wc_notify_state_t, tree_conflicted: *mut svn_boolean_t, path: *const c_char, dir_was_added: svn_boolean_t, diff_baton: *mut c_void, scratch_pool: *mut apr_pool_t) -> *mut svn_error_t>
A directory @a path which has been opened with @a dir_opened or @a dir_added has been closed.
@a dir_was_added is set to #TRUE if the directory was added, and to #FALSE if the directory pre-existed.
Trait Implementations§
Source§impl Clone for svn_wc_diff_callbacks4_t
impl Clone for svn_wc_diff_callbacks4_t
Source§fn clone(&self) -> svn_wc_diff_callbacks4_t
fn clone(&self) -> svn_wc_diff_callbacks4_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more