pub unsafe extern "C" fn svn_client_revert4(
paths: *const apr_array_header_t,
depth: svn_depth_t,
changelists: *const apr_array_header_t,
clear_changelists: svn_boolean_t,
metadata_only: svn_boolean_t,
added_keep_local: svn_boolean_t,
ctx: *mut svn_client_ctx_t,
scratch_pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description
Restore the pristine version of working copy @a paths, effectively undoing any local mods. This means returning each path’s versioned status to ‘unmodified’ and changing its on-disk state to match that.
If an item was in a state of conflict, reverting also marks the conflict as resolved. If there are conflict marker files attached to the item, these are removed.
@a paths is an array of (const char *) local WC paths.
For each path in @a paths, revert it if it is a file. Else if it is a directory, revert according to @a depth: If @a depth is #svn_depth_empty, revert just the directory; else if #svn_depth_files, revert the directory and any files immediately under the directory; else if #svn_depth_immediates, revert all of the preceding plus immediate subdirectories; else if #svn_depth_infinity, revert path and everything under it fully recursively.
@a changelists 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 changelists is empty (or altogether @c NULL), no changelist filtering occurs.
If @a clear_changelists is TRUE, then changelist information for the paths is cleared while reverting.
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.
Consult the @c SVN_CONFIG_OPTION_USE_COMMIT_TIMES option in @a ctx to determine whether or not to revert timestamp to the time of last commit (‘use-commit-times = yes’).
If @a ctx->notify_func2 is non-NULL, then for each item reverted, call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the reverted item.
If an item specified for reversion is not under version control, then do not error, just invoke @a ctx->notify_func2 with @a ctx->notify_baton2, using notification code #svn_wc_notify_skip.
@warning The ‘revert’ command intentionally and permanently loses local modifications.
@since New in 1.11.