pub unsafe extern "C" fn svn_fs_lock_many(
fs: *mut svn_fs_t,
lock_targets: *mut apr_hash_t,
comment: *const c_char,
is_dav_comment: svn_boolean_t,
expiration_date: apr_time_t,
steal_lock: svn_boolean_t,
lock_callback: svn_fs_lock_callback_t,
lock_baton: *mut c_void,
result_pool: *mut apr_pool_t,
scratch_pool: *mut apr_pool_t,
) -> *mut svn_error_tExpand description
Lock the paths in @a lock_targets in @a fs.
@a fs must have a username associated with it (see #svn_fs_access_t), else return #SVN_ERR_FS_NO_USER. Set the ‘owner’ field in each new lock to the fs username.
@a comment is optional: it’s either an xml-escapable UTF8 string which describes the lock, or it is @c NULL.
@a is_dav_comment describes whether the comment was created by a generic DAV client; only mod_dav_svn’s autoversioning feature needs to use it. If in doubt, pass 0.
The paths to be locked are passed as the const char * keys of the @a lock_targets hash. The hash values are svn_fs_lock_target_t * and provide the token and @a current_rev for each path. The token is a lock token such as can be generated using svn_fs_generate_lock_token() (indicating that the caller wants to dictate the lock token used), or it is @c NULL (indicating that the caller wishes to have a new token generated by this function). If the token is not @c NULL, and represents an existing lock, then the path must match the path associated with that existing lock. If @a current_rev is a valid revnum, then do an out-of-dateness check. If the revnum is less than the last-changed-revision of the path (or if the path doesn’t exist in HEAD), yield an #SVN_ERR_FS_OUT_OF_DATE error for this path.
If a path is already locked, then yield #SVN_ERR_FS_PATH_ALREADY_LOCKED, unless @a steal_lock is TRUE, in which case “steal” the existing lock, even if the FS access-context’s username does not match the current lock’s owner: delete the existing lock on the path, and create a new one.
If @a expiration_date is zero, then create a non-expiring lock. Else, the lock will expire at @a expiration_date.
For each path in @a lock_targets @a lock_callback will be invoked passing @a lock_baton and the lock and error that apply to path. @a lock_callback can be NULL in which case it is not called and any errors that would have been passed to the callback are not reported.
The lock and path passed to @a lock_callback will be allocated in @a result_pool. Use @a scratch_pool for temporary allocations.
@note At this time, only files can be locked.
@note This function is not atomic. If it returns an error, some targets may remain unlocked while others may have been locked.
@note You probably don’t want to use this directly. Take a look at svn_repos_fs_lock_many() instead.
@since New in 1.9.