svn_wc_adm_open3

Function svn_wc_adm_open3 

Source
pub unsafe extern "C" fn svn_wc_adm_open3(
    adm_access: *mut *mut svn_wc_adm_access_t,
    associated: *mut svn_wc_adm_access_t,
    path: *const c_char,
    write_lock: svn_boolean_t,
    levels_to_lock: c_int,
    cancel_func: svn_cancel_func_t,
    cancel_baton: *mut c_void,
    pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

Return, in @a *adm_access, a pointer to a new access baton for the working copy administrative area associated with the directory @a path. If @a write_lock is TRUE the baton will include a write lock, otherwise the baton can only be used for read access. If @a path refers to a directory that is already write locked then the error #SVN_ERR_WC_LOCKED will be returned. The error #SVN_ERR_WC_NOT_DIRECTORY will be returned if @a path is not a versioned directory.

If @a associated is an open access baton then @a adm_access will be added to the set containing @a associated. @a associated can be @c NULL, in which case @a adm_access is the start of a new set.

@a levels_to_lock specifies how far to lock. Zero means just the specified directory. Any negative value means to lock the entire working copy directory hierarchy under @a path. A positive value indicates the number of levels of directories to lock – 1 means just immediate subdirectories, 2 means immediate subdirectories and their subdirectories, etc. All the access batons will become part of the set containing @a adm_access. This is an all-or-nothing option, if it is not possible to lock all the requested directories then an error will be returned and @a adm_access will be invalid, with the exception that subdirectories of @a path that are missing from the physical filesystem will not be locked and will not cause an error. The error #SVN_ERR_WC_LOCKED will be returned if a subdirectory of @a path is already write locked.

If @a cancel_func is non-NULL, call it with @a cancel_baton to determine if the client has canceled the operation.

@a pool will be used to allocate memory for the baton and any subsequently cached items. If @a adm_access has not been closed when the pool is cleared, it will be closed automatically at that point, and removed from its set. A baton closed in this way will not remove physical locks from the working copy if cleanup is required.

The first baton in a set, with @a associated passed as @c NULL, must have the longest lifetime of all the batons in the set. This implies it must be the root of the hierarchy.

@since New in 1.2. @deprecated Provided for backward compatibility with the 1.6 API. Callers should use a #svn_wc_context_t object to access the working copy.