Skip to main content

svn_ra_open5

Function svn_ra_open5 

Source
pub unsafe extern "C" fn svn_ra_open5(
    session_p: *mut *mut svn_ra_session_t,
    corrected_url: *mut *const c_char,
    redirect_url: *mut *const c_char,
    repos_URL: *const c_char,
    uuid: *const c_char,
    callbacks: *const svn_ra_callbacks2_t,
    callback_baton: *mut c_void,
    config: *mut apr_hash_t,
    pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

Open a repository access session to the repository at @a repos_URL, or inform the caller regarding a correct URL by which to access that repository.

If @a repos_URL can be used successfully to access the repository, set @a *session_p to an opaque object representing a repository session for the repository and (if @a corrected_url is non-NULL) set @a *corrected_url to NULL. If there’s a better URL that the caller should try and @a corrected_url is non-NULL, set @a *session_p to NULL and @a *corrected_url to the corrected URL. If there’s a better URL that the caller should try, and @a corrected_url is NULL, return an #SVN_ERR_RA_SESSION_URL_MISMATCH error. Allocate all returned items in @a pool.

The @a repos_URL need not point to the root of the repository: subject to authorization, it may point to any path within the repository, even a path at which no node exists in the repository. The session will remember this URL as its “session URL” (also called “session root URL”), until changed by svn_ra_reparent(). Many RA functions take or return paths that are relative to the session URL.

If a @a corrected_url is returned, it will point to the same path within the new repository root URL that @a repos_URL pointed to within the old repository root URL.

If @a redirect_url is not NULL and a @corrected_url is returned, then @a redirect_url contains a non-canonicalized version of @a corrected_url, as communicated in the network protocol used by the RA provider. THe @a redirect_url should be used for to detect redirection loops. Canonicalization may change the protocol-level URL in a way that makes detection of redirect loops impossible in some cases since URLs which are different at the protocol layer could map to the same canonicalized URL.

Return @c SVN_ERR_RA_UUID_MISMATCH if @a uuid is non-NULL and not equal to the UUID of the repository at @c repos_URL.

@a callbacks/@a callback_baton is a table of callbacks provided by the client; see @c svn_ra_callbacks2_t.

@a config is a hash mapping const char * keys to @c svn_config_t * values. For example, the @c svn_config_t for the “~/.subversion/config” file is under the key “config”. @a config may be NULL. This function examines some config settings under the “servers” key (if present) before loading the required RA module, and the RA module may also examine any config settings.

All RA requests require a session; they will continue to use @a pool for memory allocation.

@see svn_client_open_ra_session().

@since New in 1.14.