pub unsafe extern "C" fn svn_ra_lock(
session: *mut svn_ra_session_t,
path_revs: *mut apr_hash_t,
comment: *const c_char,
steal_lock: svn_boolean_t,
lock_func: svn_ra_lock_callback_t,
lock_baton: *mut c_void,
pool: *mut apr_pool_t,
) -> *mut svn_error_tExpand description
Lock each path in @a path_revs, which is a hash whose keys are the paths to be locked, and whose values are the corresponding base revisions for each path. The keys are (const char *) and the revisions are (svn_revnum_t *).
Note that locking is never anonymous, so any server implementing this function will have to “pull” a username from the client, if it hasn’t done so already.
@a comment is optional: it’s either an xml-escapable string which describes the lock, or it is NULL.
If any path is already locked by a different user, then call @a lock_func/@a lock_baton with an error. If @a steal_lock is TRUE, then “steal” the existing lock(s) anyway, even if the RA username does not match the current lock’s owner. Delete any lock on the path, and unconditionally create a new lock.
For each path, if its base revision (in @a path_revs) is a valid revnum, then do an out-of-dateness check. If the revnum is less than the last-changed-revision of any path (or if a path doesn’t exist in HEAD), call @a lock_func/@a lock_baton with an SVN_ERR_RA_OUT_OF_DATE error.
After successfully locking a file, @a lock_func is called with the @a lock_baton.
Use @a pool for temporary allocations.
@since New in 1.2.