svn_ra.h File Reference

Repository Access. More...

#include <apr_pools.h>
#include <apr_tables.h>
#include "svn_error.h"
#include "svn_delta.h"
#include "svn_auth.h"

Go to the source code of this file.

Data Structures

struct  svn_ra_reporter2_t
 The update Reporter. More...
struct  svn_ra_reporter_t
 Similar to svn_ra_reporter2_t, but without support for lock tokens. More...
struct  svn_ra_callbacks2_t
 A collection of callbacks implemented by libsvn_client which allows an RA layer to "pull" information from the client application, or possibly store information. More...
struct  svn_ra_callbacks_t
 Similar to svn_ra_callbacks2_t, except that the progress notification function and baton is missing. More...
struct  svn_ra_plugin_t
 Using this callback struct is similar to calling the newer public interface that is based on svn_ra_session_t. More...

Defines

#define SVN_RA_ABI_VERSION   2
 The current ABI (Application Binary Interface) version for the RA plugin model.

Typedefs

typedef svn_error_t *(* svn_ra_get_wc_prop_func_t )(void *baton, const char *relpath, const char *name, const svn_string_t **value, apr_pool_t *pool)
 This is a function type which allows the RA layer to fetch working copy (WC) properties.
typedef svn_error_t *(* svn_ra_set_wc_prop_func_t )(void *baton, const char *path, const char *name, const svn_string_t *value, apr_pool_t *pool)
 This is a function type which allows the RA layer to store new working copy properties during update-like operations.
typedef svn_error_t *(* svn_ra_push_wc_prop_func_t )(void *baton, const char *path, const char *name, const svn_string_t *value, apr_pool_t *pool)
 This is a function type which allows the RA layer to store new working copy properties as part of a commit.
typedef svn_error_t *(* svn_ra_invalidate_wc_props_func_t )(void *baton, const char *path, const char *name, apr_pool_t *pool)
 This is a function type which allows the RA layer to invalidate (i.e., remove) wcprops.
typedef svn_error_t *(* svn_ra_get_latest_revnum_func_t )(void *session_baton, svn_revnum_t *latest_revnum)
 A function type for retrieving the youngest revision from a repos.
typedef svn_error_t *(* svn_ra_file_rev_handler_t )(void *baton, const char *path, svn_revnum_t rev, apr_hash_t *rev_props, svn_txdelta_window_handler_t *delta_handler, void **delta_baton, apr_array_header_t *prop_diffs, apr_pool_t *pool)
 A callback function type for use in get_file_revs.
typedef svn_error_t *(* svn_ra_lock_callback_t )(void *baton, const char *path, svn_boolean_t do_lock, const svn_lock_t *lock, svn_error_t *ra_err, apr_pool_t *pool)
 Callback function type for locking and unlocking actions.
typedef void(* svn_ra_progress_notify_func_t )(apr_off_t progress, apr_off_t total, void *baton, apr_pool_t *pool)
 Callback function type for progress notification.
typedef svn_ra_session_t svn_ra_session_t
 A repository access session.
typedef svn_error_t *(* svn_ra_init_func_t )(int abi_version, apr_pool_t *pool, apr_hash_t *hash)
 All "ra_FOO" implementations *must* export a function named svn_ra_FOO_init() of type svn_ra_init_func_t.

Functions

const svn_version_tsvn_ra_version (void)
 Get libsvn_ra version information.
svn_error_tsvn_ra_initialize (apr_pool_t *pool)
 Initialize the RA library.
svn_error_tsvn_ra_create_callbacks (svn_ra_callbacks2_t **callbacks, apr_pool_t *pool)
 Initialize a callback structure.
svn_error_tsvn_ra_open2 (svn_ra_session_t **session_p, const char *repos_URL, const svn_ra_callbacks2_t *callbacks, void *callback_baton, apr_hash_t *config, apr_pool_t *pool)
 Open a repository session to repos_URL.
svn_error_tsvn_ra_open (svn_ra_session_t **session_p, const char *repos_URL, const svn_ra_callbacks_t *callbacks, void *callback_baton, apr_hash_t *config, apr_pool_t *pool)
svn_error_tsvn_ra_get_latest_revnum (svn_ra_session_t *session, svn_revnum_t *latest_revnum, apr_pool_t *pool)
 Get the latest revision number from the repository of session.
svn_error_tsvn_ra_get_dated_revision (svn_ra_session_t *session, svn_revnum_t *revision, apr_time_t tm, apr_pool_t *pool)
 Get the latest revision number at time tm in the repository of session.
svn_error_tsvn_ra_change_rev_prop (svn_ra_session_t *session, svn_revnum_t rev, const char *name, const svn_string_t *value, apr_pool_t *pool)
 Set the property name to value on revision rev in the repository of session.
svn_error_tsvn_ra_rev_proplist (svn_ra_session_t *session, svn_revnum_t rev, apr_hash_t **props, apr_pool_t *pool)
 Set *props to the list of unversioned properties attached to revision rev in the repository of session.
svn_error_tsvn_ra_rev_prop (svn_ra_session_t *session, svn_revnum_t rev, const char *name, svn_string_t **value, apr_pool_t *pool)
 Set *value to the value of unversioned property name attached to revision rev in the repository of session.
svn_error_tsvn_ra_get_commit_editor (svn_ra_session_t *session, const svn_delta_editor_t **editor, void **edit_baton, const char *log_msg, svn_commit_callback_t callback, void *callback_baton, apr_hash_t *lock_tokens, svn_boolean_t keep_locks, apr_pool_t *pool)
 Set *editor and *edit_baton to an editor for committing changes to the repository of session, using log_msg as the log message.
svn_error_tsvn_ra_get_file (svn_ra_session_t *session, const char *path, svn_revnum_t revision, svn_stream_t *stream, svn_revnum_t *fetched_rev, apr_hash_t **props, apr_pool_t *pool)
 Fetch the contents and properties of file path at revision.
svn_error_tsvn_ra_get_dir (svn_ra_session_t *session, const char *path, svn_revnum_t revision, apr_hash_t **dirents, svn_revnum_t *fetched_rev, apr_hash_t **props, apr_pool_t *pool)
 If dirents is non NULL, set *dirents to contain all the entries of directory path at revision.
svn_error_tsvn_ra_do_update (svn_ra_session_t *session, const svn_ra_reporter2_t **reporter, void **report_baton, svn_revnum_t revision_to_update_to, const char *update_target, svn_boolean_t recurse, const svn_delta_editor_t *update_editor, void *update_baton, apr_pool_t *pool)
 Ask the RA layer to update a working copy.
svn_error_tsvn_ra_do_switch (svn_ra_session_t *session, const svn_ra_reporter2_t **reporter, void **report_baton, svn_revnum_t revision_to_switch_to, const char *switch_target, svn_boolean_t recurse, const char *switch_url, const svn_delta_editor_t *switch_editor, void *switch_baton, apr_pool_t *pool)
 Ask the RA layer to 'switch' a working copy to a new switch_url; it's another form of svn_ra_do_update().
svn_error_tsvn_ra_do_status (svn_ra_session_t *session, const svn_ra_reporter2_t **reporter, void **report_baton, const char *status_target, svn_revnum_t revision, svn_boolean_t recurse, const svn_delta_editor_t *status_editor, void *status_baton, apr_pool_t *pool)
 Ask the RA layer to describe the status of a working copy with respect to revision of the repository (or HEAD, if revision is invalid).
svn_error_tsvn_ra_do_diff (svn_ra_session_t *session, const svn_ra_reporter2_t **reporter, void **report_baton, svn_revnum_t revision, const char *diff_target, svn_boolean_t recurse, svn_boolean_t ignore_ancestry, const char *versus_url, const svn_delta_editor_t *diff_editor, void *diff_baton, apr_pool_t *pool)
 Ask the RA layer to 'diff' a working copy against versus_url; it's another form of svn_ra_do_update().
svn_error_tsvn_ra_get_log (svn_ra_session_t *session, const apr_array_header_t *paths, svn_revnum_t start, svn_revnum_t end, int limit, svn_boolean_t discover_changed_paths, svn_boolean_t strict_node_history, svn_log_message_receiver_t receiver, void *receiver_baton, apr_pool_t *pool)
 Invoke receiver with receiver_baton on each log message from start to end.
svn_error_tsvn_ra_check_path (svn_ra_session_t *session, const char *path, svn_revnum_t revision, svn_node_kind_t *kind, apr_pool_t *pool)
 Set *kind to the node kind associated with path at revision.
svn_error_tsvn_ra_stat (svn_ra_session_t *session, const char *path, svn_revnum_t revision, svn_dirent_t **dirent, apr_pool_t *pool)
 Set *dirent to an svn_dirent_t associated with path at revision.
svn_error_tsvn_ra_get_uuid (svn_ra_session_t *session, const char **uuid, apr_pool_t *pool)
 Set *uuid to the repository's UUID.
svn_error_tsvn_ra_get_repos_root (svn_ra_session_t *session, const char **url, apr_pool_t *pool)
 Set *url to the repository's root URL.
svn_error_tsvn_ra_get_locations (svn_ra_session_t *session, apr_hash_t **locations, const char *path, svn_revnum_t peg_revision, apr_array_header_t *location_revisions, apr_pool_t *pool)
 Set *locations to the locations (at the repository revisions location_revisions) of the file identified by path in peg_revision.
svn_error_tsvn_ra_get_file_revs (svn_ra_session_t *session, const char *path, svn_revnum_t start, svn_revnum_t end, svn_ra_file_rev_handler_t handler, void *handler_baton, apr_pool_t *pool)
 Retrieve a subset of the interesting revisions of a file path as seen in revision end (see svn_fs_history_prev() for a definition of "interesting revisions").
svn_error_tsvn_ra_lock (svn_ra_session_t *session, apr_hash_t *path_revs, const char *comment, svn_boolean_t steal_lock, svn_ra_lock_callback_t lock_func, void *lock_baton, apr_pool_t *pool)
 Lock each path in path_revs, which is a hash whose keys are the paths to be locked, and whose values are the corresponding bas revisions for each path.
svn_error_tsvn_ra_unlock (svn_ra_session_t *session, apr_hash_t *path_tokens, svn_boolean_t break_lock, svn_ra_lock_callback_t lock_func, void *lock_baton, apr_pool_t *pool)
 Remove the repository lock for each path in path_tokens.
svn_error_tsvn_ra_get_lock (svn_ra_session_t *session, svn_lock_t **lock, const char *path, apr_pool_t *pool)
 If path is locked, set *lock to an svn_lock_t which represents the lock, allocated in pool.
svn_error_tsvn_ra_get_locks (svn_ra_session_t *session, apr_hash_t **locks, const char *path, apr_pool_t *pool)
 Set *locks to a hashtable which represents all locks on or below path.
svn_error_tsvn_ra_print_modules (svn_stringbuf_t *output, apr_pool_t *pool)
 Append a textual list of all available RA modules to the stringbuf output.
svn_error_tsvn_ra_print_ra_libraries (svn_stringbuf_t **descriptions, void *ra_baton, apr_pool_t *pool)
 Similar to svn_ra_print_modules().
svn_error_tsvn_ra_dav_init (int abi_version, apr_pool_t *pool, apr_hash_t *hash)
 Initialize libsvn_ra_dav.
svn_error_tsvn_ra_local_init (int abi_version, apr_pool_t *pool, apr_hash_t *hash)
 Initialize libsvn_ra_local.
svn_error_tsvn_ra_svn_init (int abi_version, apr_pool_t *pool, apr_hash_t *hash)
 Initialize libsvn_ra_svn.
svn_error_tsvn_ra_init_ra_libs (void **ra_baton, apr_pool_t *pool)
 Initialize the compatibility wrapper, using pool for any allocations.
svn_error_tsvn_ra_get_ra_library (svn_ra_plugin_t **library, void *ra_baton, const char *url, apr_pool_t *pool)
 Return an RA vtable-library which can handle URL.


Detailed Description

Repository Access.

Definition in file svn_ra.h.


Define Documentation

#define SVN_RA_ABI_VERSION   2
 

The current ABI (Application Binary Interface) version for the RA plugin model.

This version number will change when the ABI between the SVN core (e.g. libsvn_client) and the RA plugin changes.

An RA plugin should verify that the passed version number is acceptable before accessing the rest of the parameters, and before returning any information.

It is entirely acceptable for an RA plugin to accept multiple ABI versions. It can simply interpret the parameters based on the version, and it can return different plugin structures.

 VSN  DATE        REASON FOR CHANGE
 ---  ----------  ------------------------------------------------
   1  2001-02-17  Initial revision.
   2  2004-06-29  Preparing for svn 1.1, which adds new RA vtable funcs.
      2005-01-19  Rework the plugin interface and don't provide the vtable
                  to the client.  Separate ABI versions are no longer used.
 

Deprecated:
Provided for backward compatibility with the 1.0 API.

Definition at line 1420 of file svn_ra.h.


Typedef Documentation

typedef svn_error_t*(* svn_ra_file_rev_handler_t)(void *baton, const char *path, svn_revnum_t rev, apr_hash_t *rev_props, svn_txdelta_window_handler_t *delta_handler, void **delta_baton, apr_array_header_t *prop_diffs, apr_pool_t *pool)
 

A callback function type for use in get_file_revs.

baton is provided by the caller, path is the pathname of the file in revision rev and rev_props are the revision properties. If delta_handler and delta_baton are non-NULL, they may be set to a handler/baton which will be called with the delta between the previous revision and this one after the return of this callback. They may be left as NULL/NULL. prop_diffs is an array of svn_prop_t elements indicating the property delta for this and the previous revision. pool may be used for temporary allocations, but you can't rely on objects allocated to live outside of this particular call and the immediately following calls to *delta_handler, if any.

Since:
New in 1.1.

Definition at line 137 of file svn_ra.h.

typedef svn_error_t*(* svn_ra_get_wc_prop_func_t)(void *baton, const char *relpath, const char *name, const svn_string_t **value, apr_pool_t *pool)
 

This is a function type which allows the RA layer to fetch working copy (WC) properties.

The baton is provided along with the function pointer and should be passed back in. This will be the callback_baton or the close_baton as appropriate.

path is relative to the "root" of the session, defined by the repos_url passed to the RA->open() vtable call.

name is the name of the property to fetch. If the property is present, then it is returned in value. Otherwise, *value is set to NULL.

Definition at line 64 of file svn_ra.h.

typedef svn_error_t*(* svn_ra_init_func_t)(int abi_version, apr_pool_t *pool, apr_hash_t *hash)
 

All "ra_FOO" implementations *must* export a function named svn_ra_FOO_init() of type svn_ra_init_func_t.

When called by libsvn_client, this routine adds an entry (or entries) to the hash table for any URL schemes it handles. The hash value must be of type (svn_ra_plugin_t *). pool is a pool for allocating configuration / one-time data.

This type is defined to use the "C Calling Conventions" to ensure that abi_version is the first parameter. The RA plugin must check that value before accessing the other parameters.

### need to force this to be __cdecl on Windows... how??

Deprecated:
Provided for backward compatibility with the 1.1 API.

Definition at line 1391 of file svn_ra.h.

typedef svn_error_t*(* svn_ra_invalidate_wc_props_func_t)(void *baton, const char *path, const char *name, apr_pool_t *pool)
 

This is a function type which allows the RA layer to invalidate (i.e., remove) wcprops.

See the documentation for svn_ra_get_wc_prop_func_t for baton, path, and name.

Unlike svn_ra_push_wc_prop_func_t, this has immediate effect. If it returns success, the wcprops have been removed.

Definition at line 109 of file svn_ra.h.

typedef svn_error_t*(* svn_ra_lock_callback_t)(void *baton, const char *path, svn_boolean_t do_lock, const svn_lock_t *lock, svn_error_t *ra_err, apr_pool_t *pool)
 

Callback function type for locking and unlocking actions.

Since:
New in 1.2.
do_lock is TRUE when locking path, and FALSE otherwise.

lock is a lock for path or null if do_lock is false or ra_err is non-null.

ra_err is NULL unless the ra layer encounters a locking related error which it passes back for notification purposes. The caller is responsible for clearing ra_err after the callback is run.

baton is a closure object; it should be provided by the implementation, and passed by the caller. pool may be used for temporary allocation.

Definition at line 165 of file svn_ra.h.

typedef void(* svn_ra_progress_notify_func_t)(apr_off_t progress, apr_off_t total, void *baton, apr_pool_t *pool)
 

Callback function type for progress notification.

progress is the number of bytes already transferred, total is the total number of bytes to transfer or -1 if it's not known, baton is the callback baton.

Since:
New in 1.3.

Definition at line 181 of file svn_ra.h.

typedef svn_error_t*(* svn_ra_push_wc_prop_func_t)(void *baton, const char *path, const char *name, const svn_string_t *value, apr_pool_t *pool)
 

This is a function type which allows the RA layer to store new working copy properties as part of a commit.

See the comments for svn_ra_get_wc_prop_func_t for baton, path, and name. The value is the value that will be stored for the property; a NULL value means the property will be deleted.

Note that this might not actually store the new property before returning, but instead schedule it to be changed as part of post-commit processing (in which case a successful commit means the properties got written). Thus, during the commit, it is possible to invoke this function to set a new value for a wc prop, then read the wc prop back from the working copy and get the *old* value. Callers beware.

Definition at line 96 of file svn_ra.h.

typedef struct svn_ra_session_t svn_ra_session_t
 

A repository access session.

This object is used to perform requests to a repository, identified by an URL.

Since:
New in 1.2.

Definition at line 437 of file svn_ra.h.

typedef svn_error_t*(* svn_ra_set_wc_prop_func_t)(void *baton, const char *path, const char *name, const svn_string_t *value, apr_pool_t *pool)
 

This is a function type which allows the RA layer to store new working copy properties during update-like operations.

See the comments for svn_ra_get_wc_prop_func_t for baton, path, and name. The value is the value that will be stored for the property; a null value means the property will be deleted.

Definition at line 76 of file svn_ra.h.


Function Documentation

svn_error_t* svn_ra_change_rev_prop svn_ra_session_t session,
svn_revnum_t  rev,
const char *  name,
const svn_string_t value,
apr_pool_t *  pool
 

Set the property name to value on revision rev in the repository of session.

If value is NULL, delete the named revision property.

Please note that properties attached to revisions are unversioned.

Use pool for memory allocation.

Since:
New in 1.2.

svn_error_t* svn_ra_check_path svn_ra_session_t session,
const char *  path,
svn_revnum_t  revision,
svn_node_kind_t kind,
apr_pool_t *  pool
 

Set *kind to the node kind associated with path at revision.

If path does not exist under revision, set *kind to svn_node_none. path is relative to the session's parent URL.

Use pool for memory allocation.

Since:
New in 1.2.

svn_error_t* svn_ra_create_callbacks svn_ra_callbacks2_t **  callbacks,
apr_pool_t *  pool
 

Initialize a callback structure.

Set *callbacks to a ra callbacks object, allocated in pool.

Clients must use this function to allocate and initialize svn_ra_callbacks2_t structures.

Since:
New in 1.3.

svn_error_t* svn_ra_dav_init int  abi_version,
apr_pool_t *  pool,
apr_hash_t *  hash
 

Initialize libsvn_ra_dav.

Deprecated:
Provided for backward compatibility with the 1.1 API.

svn_error_t* svn_ra_do_diff svn_ra_session_t session,
const svn_ra_reporter2_t **  reporter,
void **  report_baton,
svn_revnum_t  revision,
const char *  diff_target,
svn_boolean_t  recurse,
svn_boolean_t  ignore_ancestry,
const char *  versus_url,
const svn_delta_editor_t diff_editor,
void *  diff_baton,
apr_pool_t *  pool
 

Ask the RA layer to 'diff' a working copy against versus_url; it's another form of svn_ra_do_update().

Note:
This function cannot be used to diff a single file, only a working copy directory. See the svn_ra_do_switch() function for more details.
The client initially provides a diff_editor/baton to the RA layer; this editor contains knowledge of where the common diff root is in the working copy (when open_root() is called).

In return, the client receives a reporter/report_baton. The client then describes its working-copy revision numbers by making calls into the reporter structure; the RA layer assumes that all paths are relative to the URL used to open session.

When finished, the client calls reporter->finish_report(). The RA layer then does a complete drive of diff_editor, ending with close_edit(), to transmit the diff.

diff_target is an optional single path component will restrict the scope of the diff to an entry in the directory represented by the session's URL, or empty if the entire directory is meant to be one of the diff paths.

The working copy will be diffed against versus_url as it exists in revision revision, or as it is in head if revision is SVN_INVALID_REVNUM.

Use ignore_ancestry to control whether or not items being diffed will be checked for relatedness first. Unrelated items are typically transmitted to the editor as a deletion of one thing and the addition of another, but if this flag is TRUE, unrelated items will be diffed as if they were related.

If recurse is true and the target is a directory, diff recursively; otherwise, diff just target and its immediate entries, but not its child directories (if any).

The caller may not perform any RA operations using session before finishing the report, and may not perform any RA operations using session from within the editing operations of diff_editor.

Use pool for memory allocation.

Since:
New in 1.2.

svn_error_t* svn_ra_do_status svn_ra_session_t session,
const svn_ra_reporter2_t **  reporter,
void **  report_baton,
const char *  status_target,
svn_revnum_t  revision,
svn_boolean_t  recurse,
const svn_delta_editor_t status_editor,
void *  status_baton,
apr_pool_t *  pool
 

Ask the RA layer to describe the status of a working copy with respect to revision of the repository (or HEAD, if revision is invalid).

The client initially provides a status_editor/baton to the RA layer; this editor contains knowledge of where the change will begin in the working copy (when open_root() is called).

In return, the client receives a reporter/report_baton. The client then describes its working-copy revision numbers by making calls into the reporter structure; the RA layer assumes that all paths are relative to the URL used to open session.

When finished, the client calls reporter->finish_report(). The RA layer then does a complete drive of status_editor, ending with close_edit(), to report, essentially, what would be modified in the working copy were the client to call do_update(). status_target is an optional single path component will restrict the scope of the status report to an entry in the directory represented by the session_baton's URL, or empty if the entire directory is meant to be examined.

If recurse is true and the target is a directory, get status recursively; otherwise, get status for just the target and its immediate entries, but not its child directories (if any).

The caller may not perform any RA operations using session before finishing the report, and may not perform any RA operations using session from within the editing operations of status_editor.

Use pool for memory allocation.

Since:
New in 1.2.

svn_error_t* svn_ra_do_switch svn_ra_session_t session,
const svn_ra_reporter2_t **  reporter,
void **  report_baton,
svn_revnum_t  revision_to_switch_to,
const char *  switch_target,
svn_boolean_t  recurse,
const char *  switch_url,
const svn_delta_editor_t switch_editor,
void *  switch_baton,
apr_pool_t *  pool
 

Ask the RA layer to 'switch' a working copy to a new switch_url; it's another form of svn_ra_do_update().

The client initially provides a switch_editor/baton to the RA layer; this editor contains knowledge of where the change will begin in the working copy (when open_root() is called).

In return, the client receives a reporter/report_baton. The client then describes its working-copy revision numbers by making calls into the reporter structure; the RA layer assumes that all paths are relative to the URL used to create session_baton.

When finished, the client calls reporter->finish_report(). The RA layer then does a complete drive of switch_editor, ending with close_edit(), to switch the working copy.

switch_target is an optional single path component will restrict the scope of things affected by the switch to an entry in the directory represented by the session's URL, or empty if the entire directory is meant to be switched.

If recurse is true and the target is a directory, switch recursively; otherwise, switch just the target and its immediate entries, but not its child directories (if any).

The working copy will be switched to revision_to_switch_to, or the "latest" revision if this arg is invalid.

The caller may not perform any RA operations using session before finishing the report, and may not perform any RA operations using session_baton from within the editing operations of switch_editor.

Use pool for memory allocation.

Since:
New in 1.2.

svn_error_t* svn_ra_do_update svn_ra_session_t session,
const svn_ra_reporter2_t **  reporter,
void **  report_baton,
svn_revnum_t  revision_to_update_to,
const char *  update_target,
svn_boolean_t  recurse,
const svn_delta_editor_t update_editor,
void *  update_baton,
apr_pool_t *  pool
 

Ask the RA layer to update a working copy.

The client initially provides an update_editor/baton to the RA layer; this editor contains knowledge of where the change will begin in the working copy (when open_root() is called).

In return, the client receives a reporter/report_baton. The client then describes its working-copy revision numbers by making calls into the reporter structure; the RA layer assumes that all paths are relative to the URL used to open session.

When finished, the client calls reporter->finish_report(). The RA layer then does a complete drive of update_editor, ending with close_edit(), to update the working copy.

update_target is an optional single path component to restrict the scope of the update to just that entry (in the directory represented by the session's URL). If update_target is the empty string, the entire directory is updated.

If recurse is true and the target is a directory, update recursively; otherwise, update just the target and its immediate entries, but not its child directories (if any).

The working copy will be updated to revision_to_update_to, or the "latest" revision if this arg is invalid.

The caller may not perform any RA operations using session before finishing the report, and may not perform any RA operations using session from within the editing operations of update_editor.

Use pool for memory allocation.

Since:
New in 1.2.

svn_error_t* svn_ra_get_commit_editor svn_ra_session_t session,
const svn_delta_editor_t **  editor,
void **  edit_baton,
const char *  log_msg,
svn_commit_callback_t  callback,
void *  callback_baton,
apr_hash_t *  lock_tokens,
svn_boolean_t  keep_locks,
apr_pool_t *  pool
 

Set *editor and *edit_baton to an editor for committing changes to the repository of session, using log_msg as the log message.

The revisions being committed against are passed to the editor functions, starting with the rev argument to open_root. The path root of the commit is in the session's URL.

Before close_edit returns, but after the commit has succeeded, it will invoke callback with the new revision number, the commit date (as a const char *), commit author (as a const char *), and callback_baton as arguments. If callback returns an error, that error will be returned from close_edit, otherwise close_edit will return successfully (unless it encountered an error before invoking callback).

The callback will not be called if the commit was a no-op (i.e. nothing was committed);

lock_tokens, if non-NULL, is a hash mapping const char * paths (relative to the URL of session_baton) to const char * lock tokens. The server checks that the correct token is provided for each committed, locked path. lock_tokens must live during the whole commit operation.

If keep_locks is TRUE, then do not release locks on committed objects. Else, automatically release such locks.

The caller may not perform any RA operations using session before finishing the edit.

Use pool for memory allocation.

Since:
New in 1.2.

svn_error_t* svn_ra_get_dated_revision svn_ra_session_t session,
svn_revnum_t revision,
apr_time_t  tm,
apr_pool_t *  pool
 

Get the latest revision number at time tm in the repository of session.

Use pool for memory allocation.

Since:
New in 1.2.

svn_error_t* svn_ra_get_dir svn_ra_session_t session,
const char *  path,
svn_revnum_t  revision,
apr_hash_t **  dirents,
svn_revnum_t fetched_rev,
apr_hash_t **  props,
apr_pool_t *  pool
 

If dirents is non NULL, set *dirents to contain all the entries of directory path at revision.

The keys of dirents will be entry names (const char *), and the values dirents (svn_dirent_t *). Use pool for all allocations.

path is interpreted relative to the URL in session.

If revision is SVN_INVALID_REVNUM (meaning 'head') and *fetched_rev is not NULL, then this function will set *fetched_rev to the actual revision that was retrieved. (Some callers want to know, and some don't.)

If props is non NULL, set *props to contain the properties of the directory. This means all properties: not just ones controlled by the user and stored in the repository fs, but non-tweakable ones generated by the SCM system itself (e.g. 'wcprops', 'entryprops', etc.) The keys are const char *, values are svn_string_t *.

Since:
New in 1.2.

svn_error_t* svn_ra_get_file svn_ra_session_t session,
const char *  path,
svn_revnum_t  revision,
svn_stream_t stream,
svn_revnum_t fetched_rev,
apr_hash_t **  props,
apr_pool_t *  pool
 

Fetch the contents and properties of file path at revision.

Interpret path relative to the URL in session. Use pool for all allocations.

If revision is SVN_INVALID_REVNUM (meaning 'head') and *fetched_rev is not NULL, then this function will set *fetched_rev to the actual revision that was retrieved. (Some callers want to know, and some don't.)

If stream is non NULL, push the contents of the file at stream, do not call svn_stream_close() when finished.

If props is non NULL, set *props to contain the properties of the file. This means all properties: not just ones controlled by the user and stored in the repository fs, but non-tweakable ones generated by the SCM system itself (e.g. 'wcprops', 'entryprops', etc.) The keys are const char *, values are svn_string_t *.

The stream handlers for stream may not perform any RA operations using session.

Since:
New in 1.2.

svn_error_t* svn_ra_get_file_revs svn_ra_session_t session,
const char *  path,
svn_revnum_t  start,
svn_revnum_t  end,
svn_ra_file_rev_handler_t  handler,
void *  handler_baton,
apr_pool_t *  pool
 

Retrieve a subset of the interesting revisions of a file path as seen in revision end (see svn_fs_history_prev() for a definition of "interesting revisions").

Invoke handler with handler_baton as its first argument for each such revision. session is an open RA session. Use pool for all allocations.

If there is an interesting revision of the file that is less than or equal to start, the iteration will begin at that revision. Else, the iteration will begin at the first revision of the file in the repository, which has to be less than or equal to end. Note that if the function succeeds, handler will have been called at least once.

In a series of calls to handler, the file contents for the first interesting revision will be provided as a text delta against the empty file. In the following calls, the delta will be against the fulltext contents for the previous call.

Note:
This functionality is not available in pre-1.1 servers. If the server doesn't implement it, an SVN_ERR_RA_NOT_IMPLEMENTED error is returned.
Since:
New in 1.2.

svn_error_t* svn_ra_get_latest_revnum svn_ra_session_t session,
svn_revnum_t latest_revnum,
apr_pool_t *  pool
 

Get the latest revision number from the repository of session.

Use pool for memory allocation.

Since:
New in 1.2.

svn_error_t* svn_ra_get_locations svn_ra_session_t session,
apr_hash_t **  locations,
const char *  path,
svn_revnum_t  peg_revision,
apr_array_header_t *  location_revisions,
apr_pool_t *  pool
 

Set *locations to the locations (at the repository revisions location_revisions) of the file identified by path in peg_revision.

path is relative to the URL to which session was opened. location_revisions is an array of svn_revnum_t's. *locations will be a mapping from the revisions to their appropriate absolute paths. If the file doesn't exist in a location_revision, that revision will be ignored.

Use pool for all allocations.

Note:
This functionality is not available in pre-1.1 servers. If the server doesn't implement it, an SVN_ERR_RA_NOT_IMPLEMENTED error is returned.
Since:
New in 1.2.

svn_error_t* svn_ra_get_lock svn_ra_session_t session,
svn_lock_t **  lock,
const char *  path,
apr_pool_t *  pool
 

If path is locked, set *lock to an svn_lock_t which represents the lock, allocated in pool.

If path is not locked, set *lock to NULL.

Since:
New in 1.2.

svn_error_t* svn_ra_get_locks svn_ra_session_t session,
apr_hash_t **  locks,
const char *  path,
apr_pool_t *  pool
 

Set *locks to a hashtable which represents all locks on or below path.

The hashtable maps (const char *) absolute fs paths to (const svn_lock_t *) structures. The hashtable -- and all keys and values -- are allocated in pool.

Note:
It is not considered an error for path to not exist in HEAD. Such a search will simply return no locks.

This functionality is not available in pre-1.2 servers. If the server doesn't implement it, an SVN_ERR_RA_NOT_IMPLEMENTED error is returned.

Since:
New in 1.2.

svn_error_t* svn_ra_get_log svn_ra_session_t session,
const apr_array_header_t *  paths,
svn_revnum_t  start,
svn_revnum_t  end,
int  limit,
svn_boolean_t  discover_changed_paths,
svn_boolean_t  strict_node_history,
svn_log_message_receiver_t  receiver,
void *  receiver_baton,
apr_pool_t *  pool
 

Invoke receiver with receiver_baton on each log message from start to end.

start may be greater or less than end; this just controls whether the log messages are processed in descending or ascending revision number order.

If start or end is SVN_INVALID_REVNUM, it defaults to youngest.

If paths is non-null and has one or more elements, then only show revisions in which at least one of paths was changed (i.e., if file, text or props changed; if dir, props changed or an entry was added or deleted). Each path is an const char *, relative to the session's common parent.

If limit is non-zero only invoke receiver on the first limit logs.

If discover_changed_paths, then each call to receiver passes a const apr_hash_t * for the receiver's changed_paths argument; the hash's keys are all the paths committed in that revision. Otherwise, each call to receiver passes null for changed_paths.

If strict_node_history is set, copy history will not be traversed (if any exists) when harvesting the revision logs for each path.

If any invocation of receiver returns error, return that error immediately and without wrapping it.

If start or end is a non-existent revision, return the error SVN_ERR_FS_NO_SUCH_REVISION, without ever invoking receiver.

See also the documentation for svn_log_message_receiver_t.

The caller may not invoke any RA operations using session from within receiver.

Use pool for memory allocation.

Since:
New in 1.2.

svn_error_t* svn_ra_get_ra_library svn_ra_plugin_t **  library,
void *  ra_baton,
const char *  url,
apr_pool_t *  pool
 

Return an RA vtable-library which can handle URL.

A number of svn_client_* routines will call this internally, but client apps might use it too. $a ra_baton is a baton obtained by a call to svn_ra_init_ra_libs().

Deprecated:
Provided for backward compatibility with the 1.1 API.

svn_error_t* svn_ra_get_repos_root svn_ra_session_t session,
const char **  url,
apr_pool_t *  pool
 

Set *url to the repository's root URL.

The value will not include a trailing '/'. The returned URL is guaranteed to be a prefix of the session's URL.

Note:
The URL has the same lifetime as the session.
Use pool for temporary memory allocation.

Since:
New in 1.2.

svn_error_t* svn_ra_get_uuid svn_ra_session_t session,
const char **  uuid,
apr_pool_t *  pool
 

Set *uuid to the repository's UUID.

Note:
The UUID has the same lifetime as the session.
Use pool for temporary memory allocation.

Since:
New in 1.2.

svn_error_t* svn_ra_init_ra_libs void **  ra_baton,
apr_pool_t *  pool
 

Initialize the compatibility wrapper, using pool for any allocations.

The caller must hold on to ra_baton as long as the RA library is used.

Deprecated:
Provided for backward compatibility with the 1.1 API.

svn_error_t* svn_ra_initialize apr_pool_t *  pool  ) 
 

Initialize the RA library.

This function must be called before using any function in this header, except the deprecated APIs based on svn_ra_plugin_t, or svn_ra_version(). This function must not be called simultaneously in multiple threads. pool must live longer than any open RA sessions.

Since:
New in 1.2.

svn_error_t* svn_ra_local_init int  abi_version,
apr_pool_t *  pool,
apr_hash_t *  hash
 

Initialize libsvn_ra_local.

Deprecated:
Provided for backward compatibility with the 1.1 API.

svn_error_t* svn_ra_lock svn_ra_session_t session,
apr_hash_t *  path_revs,
const char *  comment,
svn_boolean_t  steal_lock,
svn_ra_lock_callback_t  lock_func,
void *  lock_baton,
apr_pool_t *  pool
 

Lock each path in path_revs, which is a hash whose keys are the paths to be locked, and whose values are the corresponding bas revisions for each path.

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.

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 lock_func/lock_baton with an error. If 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 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 lock_func/lock_baton with an SVN_ERR_RA_OUT_OF_DATE error.

After successfully locking a file, lock_func is called with the lock_baton.

Use pool for temporary allocations.

Since:
New in 1.2.

svn_error_t* svn_ra_open svn_ra_session_t **  session_p,
const char *  repos_URL,
const svn_ra_callbacks_t callbacks,
void *  callback_baton,
apr_hash_t *  config,
apr_pool_t *  pool
 

See also:
svn_ra_open2().
Since:
New in 1.2.
Deprecated:
Provided for backward compatibility with the 1.2 API.

svn_error_t* svn_ra_open2 svn_ra_session_t **  session_p,
const char *  repos_URL,
const svn_ra_callbacks2_t callbacks,
void *  callback_baton,
apr_hash_t *  config,
apr_pool_t *  pool
 

Open a repository session to repos_URL.

Return an opaque object representing this session in *session_p, allocated in pool.

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

config is a hash mapping const char * keys to svn_config_t * values. For example, the svn_config_t for the "~/.subversion/config" file is under the key "config".

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

See also:
svn_client_open_ra_session().
Since:
New in 1.3.

svn_error_t* svn_ra_print_modules svn_stringbuf_t output,
apr_pool_t *  pool
 

Append a textual list of all available RA modules to the stringbuf output.

Since:
New in 1.2.

svn_error_t* svn_ra_print_ra_libraries svn_stringbuf_t **  descriptions,
void *  ra_baton,
apr_pool_t *  pool
 

Similar to svn_ra_print_modules().

ra_baton is ignored.

Deprecated:
Provided for backward compatibility with the 1.1 API.

svn_error_t* svn_ra_rev_prop svn_ra_session_t session,
svn_revnum_t  rev,
const char *  name,
svn_string_t **  value,
apr_pool_t *  pool
 

Set *value to the value of unversioned property name attached to revision rev in the repository of session.

If rev has no property by that name, set *value to NULL.

Use pool for memory allocation.

Since:
New in 1.2.

svn_error_t* svn_ra_rev_proplist svn_ra_session_t session,
svn_revnum_t  rev,
apr_hash_t **  props,
apr_pool_t *  pool
 

Set *props to the list of unversioned properties attached to revision rev in the repository of session.

The hash maps (const char *) names to (svn_string_t *) values.

Use pool for memory allocation.

Since:
New in 1.2.

svn_error_t* svn_ra_stat svn_ra_session_t session,
const char *  path,
svn_revnum_t  revision,
svn_dirent_t **  dirent,
apr_pool_t *  pool
 

Set *dirent to an svn_dirent_t associated with path at revision.

path is relative to the session's parent's URL. If path does not exist in revision, set *dirent to NULL.

Use pool for memory allocation.

Since:
New in 1.2.

svn_error_t* svn_ra_svn_init int  abi_version,
apr_pool_t *  pool,
apr_hash_t *  hash
 

Initialize libsvn_ra_svn.

Deprecated:
Provided for backward compatibility with the 1.1 API.

svn_error_t* svn_ra_unlock svn_ra_session_t session,
apr_hash_t *  path_tokens,
svn_boolean_t  break_lock,
svn_ra_lock_callback_t  lock_func,
void *  lock_baton,
apr_pool_t *  pool
 

Remove the repository lock for each path in path_tokens.

path_tokens is a hash whose keys are the paths to be locked, and whose values are the corresponding lock tokens for each path. If the path has no corresponding lock token, or if break_lock is TRUE, then the corresponding value shall be "".

Note that unlocking 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.

If token points to a lock, but the RA username doesn't match the lock's owner, call lockfunc/lock_baton with an error. If break_lock is true, however, instead allow the lock to be "broken" by the RA user.

After successfully unlocking a path, lock_func is called with the lock_baton.

Use pool for temporary allocations.

Since:
New in 1.2.

const svn_version_t* svn_ra_version void   ) 
 

Get libsvn_ra version information.

Since:
New in 1.1.


Generated on Wed Mar 23 12:11:31 2011 for Subversion by  doxygen 1.4.6