pub unsafe extern "C" fn svn_wc_revert6(
wc_ctx: *mut svn_wc_context_t,
local_abspath: *const c_char,
depth: svn_depth_t,
use_commit_times: svn_boolean_t,
changelist_filter: *const apr_array_header_t,
clear_changelists: svn_boolean_t,
metadata_only: svn_boolean_t,
added_keep_local: svn_boolean_t,
cancel_func: svn_cancel_func_t,
cancel_baton: *mut c_void,
notify_func: svn_wc_notify_func2_t,
notify_baton: *mut c_void,
scratch_pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description
Revert changes to @a local_abspath. Perform necessary allocations in @a scratch_pool.
@a wc_ctx contains the necessary locks required for performing the operation.
If @a depth is #svn_depth_empty, revert just @a path (if a directory, then revert just the properties on that directory). Else if #svn_depth_files, revert @a path and any files directly under @a path if it is directory. Else if #svn_depth_immediates, revert all of the preceding plus properties on immediate subdirectories; else if #svn_depth_infinity, revert path and everything under it fully recursively.
@a changelist_filter is an array of const char * changelist names, used as a restrictive filter on items reverted; that is, don’t revert any item unless it’s a member of one of those changelists. If @a changelist_filter is empty (or altogether @c NULL), no changelist filtering occurs.
If @a clear_changelists is TRUE, then changelist information for the paths is cleared.
The @a metadata_only and @a added_keep_local options control the extent of reverting. If @a metadata_only is TRUE, the working copy files are untouched, but if there are conflict marker files attached to these files these markers are removed. Otherwise, if @a added_keep_local is TRUE, then all items are reverted except an item that was scheduled as plain ‘add’ (not a copy) will not be removed from the working copy. Otherwise, all items are reverted and their on-disk state changed to match.
If @a cancel_func is non-NULL, call it with @a cancel_baton at various points during the reversion process. If it returns an error (typically #SVN_ERR_CANCELLED), return that error immediately.
If @a use_commit_times is TRUE, then all reverted working-files will have their timestamp set to the last-committed-time. If FALSE, the reverted working-files will be touched with the ‘now’ time.
For each item reverted, @a notify_func will be called with @a notify_baton and the path of the reverted item. @a notify_func may be @c NULL if this notification is not needed.
If @a path is not under version control, return the error #SVN_ERR_UNVERSIONED_RESOURCE.
@since New in 1.11.