Subversion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
svn_ra.h File Reference

Repository Access. More...

#include <apr.h>
#include <apr_pools.h>
#include <apr_hash.h>
#include <apr_tables.h>
#include <apr_time.h>
#include <apr_file_io.h>
#include "svn_types.h"
#include "svn_string.h"
#include "svn_delta.h"
#include "svn_auth.h"
#include "svn_mergeinfo.h"

Go to the source code of this file.

Data Structures

struct  svn_ra_reporter3_t
 The update Reporter. More...
 
struct  svn_ra_reporter2_t
 Similar to svn_ra_reporter3_t, but without support for depths. 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...
 

Macros

#define SVN_RA_CAPABILITY_DEPTH   "depth"
 The capability of understanding svn_depth_t (e.g., the server understands what the client means when the client describes the depth of a working copy to the server.) More...
 
#define SVN_RA_CAPABILITY_MERGEINFO   "mergeinfo"
 The capability of doing the right thing with merge-tracking information. More...
 
#define SVN_RA_CAPABILITY_LOG_REVPROPS   "log-revprops"
 The capability of retrieving arbitrary revprops in svn_ra_get_log2. More...
 
#define SVN_RA_CAPABILITY_PARTIAL_REPLAY   "partial-replay"
 The capability of replaying a directory in the repository (partial replay). More...
 
#define SVN_RA_CAPABILITY_COMMIT_REVPROPS   "commit-revprops"
 The capability of including revision properties in a commit. More...
 
#define SVN_RA_CAPABILITY_ATOMIC_REVPROPS   "atomic-revprops"
 The capability of specifying (and atomically verifying) expected preexisting values when modifying revprops. More...
 
#define SVN_RA_CAPABILITY_INHERITED_PROPS   "inherited-props"
 The capability to get inherited properties. More...
 
#define SVN_RA_CAPABILITY_EPHEMERAL_TXNPROPS   "ephemeral-txnprops"
 The capability of a server to automatically remove transaction properties prefixed with SVN_PROP_EPHEMERAL_PREFIX. More...
 
#define SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE   "get-file-revs-reversed"
 The capability of a server to walk revisions backwards in svn_ra_get_file_revs2. More...
 
#define SVN_RA_ABI_VERSION   2
 The current ABI (Application Binary Interface) version for the RA plugin model. More...
 

Typedefs

typedef svn_error_t *(* svn_ra_get_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 fetch working copy (WC) properties. More...
 
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. More...
 
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. More...
 
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 recursively. More...
 
typedef svn_error_t *(* svn_ra_get_wc_contents_func_t )(void *baton, svn_stream_t **contents, const svn_checksum_t *checksum, apr_pool_t *pool)
 This is a function type which allows the RA layer to fetch the cached pristine file contents whose checksum is checksum, if any. More...
 
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. More...
 
typedef svn_error_t *(* svn_ra_get_client_string_func_t )(void *baton, const char **name, apr_pool_t *pool)
 A function type which allows the RA layer to ask about any customizations to the client name string. More...
 
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. More...
 
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. More...
 
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. More...
 
typedef svn_error_t *(* svn_ra_replay_revstart_callback_t )(svn_revnum_t revision, void *replay_baton, const svn_delta_editor_t **editor, void **edit_baton, apr_hash_t *rev_props, apr_pool_t *pool)
 Callback function type for replay_range actions. More...
 
typedef svn_error_t *(* svn_ra_replay_revfinish_callback_t )(svn_revnum_t revision, void *replay_baton, const svn_delta_editor_t *editor, void *edit_baton, apr_hash_t *rev_props, apr_pool_t *pool)
 Callback function type for replay_range actions. More...
 
typedef struct svn_ra_reporter3_t svn_ra_reporter3_t
 The update Reporter. More...
 
typedef struct svn_ra_reporter2_t svn_ra_reporter2_t
 Similar to svn_ra_reporter3_t, but without support for depths. More...
 
typedef struct svn_ra_reporter_t svn_ra_reporter_t
 Similar to svn_ra_reporter2_t, but without support for lock tokens. More...
 
typedef struct svn_ra_callbacks2_t 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...
 
typedef struct svn_ra_callbacks_t svn_ra_callbacks_t
 Similar to svn_ra_callbacks2_t, except that the progress notification function and baton is missing. More...
 
typedef struct svn_ra_session_t svn_ra_session_t
 A repository access session. More...
 
typedef struct svn_ra_plugin_t 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...
 
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. More...
 

Functions

const svn_version_tsvn_ra_version (void)
 Get libsvn_ra version information. More...
 
svn_error_tsvn_ra_initialize (apr_pool_t *pool)
 Initialize the RA library. More...
 
svn_error_tsvn_ra_create_callbacks (svn_ra_callbacks2_t **callbacks, apr_pool_t *pool)
 Initialize a callback structure. More...
 
svn_error_tsvn_ra_open4 (svn_ra_session_t **session_p, const char **corrected_url, const char *repos_URL, const char *uuid, const svn_ra_callbacks2_t *callbacks, void *callback_baton, apr_hash_t *config, apr_pool_t *pool)
 Open a repository access session to the repository at repos_URL, or inform the caller regarding a correct URL by which to access that repository. More...
 
svn_error_tsvn_ra_open3 (svn_ra_session_t **session_p, const char *repos_URL, const char *uuid, const svn_ra_callbacks2_t *callbacks, void *callback_baton, apr_hash_t *config, apr_pool_t *pool)
 Similar to svn_ra_open4(), but with corrected_url always passed as NULL. More...
 
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)
 Similar to svn_ra_open3(), but with uuid set to NULL. More...
 
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_reparent (svn_ra_session_t *ra_session, const char *url, apr_pool_t *pool)
 Change the root URL of an open ra_session to point to a new path in the same repository. More...
 
svn_error_tsvn_ra_get_session_url (svn_ra_session_t *ra_session, const char **url, apr_pool_t *pool)
 Set *url to the session URL – the URL to which ra_session was opened or most recently reparented. More...
 
svn_error_tsvn_ra_get_path_relative_to_session (svn_ra_session_t *ra_session, const char **rel_path, const char *url, apr_pool_t *pool)
 Convert url into a path relative to the session URL of ra_session, setting *rel_path to that value. More...
 
svn_error_tsvn_ra_get_path_relative_to_root (svn_ra_session_t *ra_session, const char **rel_path, const char *url, apr_pool_t *pool)
 Convert url into a path relative to the repository root URL of the repository with which ra_session is associated, setting *rel_path to that value. More...
 
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. More...
 
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. More...
 
svn_error_tsvn_ra_change_rev_prop2 (svn_ra_session_t *session, svn_revnum_t rev, const char *name, const svn_string_t *const *old_value_p, const svn_string_t *value, apr_pool_t *pool)
 Set the property name to value on revision rev in the repository of session. More...
 
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)
 Similar to svn_ra_change_rev_prop2(), but with old_value_p set to NULL. More...
 
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. More...
 
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. More...
 
svn_error_tsvn_ra_get_commit_editor3 (svn_ra_session_t *session, const svn_delta_editor_t **editor, void **edit_baton, apr_hash_t *revprop_table, svn_commit_callback2_t commit_callback, void *commit_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, setting the revision properties from revprop_table. More...
 
svn_error_tsvn_ra_get_commit_editor2 (svn_ra_session_t *session, const svn_delta_editor_t **editor, void **edit_baton, const char *log_msg, svn_commit_callback2_t commit_callback, void *commit_baton, apr_hash_t *lock_tokens, svn_boolean_t keep_locks, apr_pool_t *pool)
 Same as svn_ra_get_commit_editor3(), but with revprop_table set to a hash containing the SVN_PROP_REVISION_LOG property set to the value of log_msg. More...
 
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)
 Same as svn_ra_get_commit_editor2(), but uses svn_commit_callback_t. More...
 
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. More...
 
svn_error_tsvn_ra_get_dir2 (svn_ra_session_t *session, apr_hash_t **dirents, svn_revnum_t *fetched_rev, apr_hash_t **props, const char *path, svn_revnum_t revision, apr_uint32_t dirent_fields, apr_pool_t *pool)
 If dirents is non NULL, set *dirents to contain all the entries of directory path at revision. More...
 
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)
 Similar to svn_ra_get_dir2, but with SVN_DIRENT_ALL for the dirent_fields parameter. More...
 
svn_error_tsvn_ra_get_mergeinfo (svn_ra_session_t *session, svn_mergeinfo_catalog_t *catalog, const apr_array_header_t *paths, svn_revnum_t revision, svn_mergeinfo_inheritance_t inherit, svn_boolean_t include_descendants, apr_pool_t *pool)
 Set *catalog to a mergeinfo catalog for the paths in paths. More...
 
svn_error_tsvn_ra_do_update3 (svn_ra_session_t *session, const svn_ra_reporter3_t **reporter, void **report_baton, svn_revnum_t revision_to_update_to, const char *update_target, svn_depth_t depth, svn_boolean_t send_copyfrom_args, svn_boolean_t ignore_ancestry, const svn_delta_editor_t *update_editor, void *update_baton, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Ask the RA layer to update a working copy to a new revision. More...
 
svn_error_tsvn_ra_do_update2 (svn_ra_session_t *session, const svn_ra_reporter3_t **reporter, void **report_baton, svn_revnum_t revision_to_update_to, const char *update_target, svn_depth_t depth, svn_boolean_t send_copyfrom_args, const svn_delta_editor_t *update_editor, void *update_baton, apr_pool_t *pool)
 Similar to svn_ra_do_update3(), but always ignoring ancestry. More...
 
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)
 Similar to svn_ra_do_update2(), but taking svn_ra_reporter2_t instead of svn_ra_reporter3_t; if recurse is true, pass svn_depth_infinity for depth, else pass svn_depth_files; and with send_copyfrom_args always false. More...
 
svn_error_tsvn_ra_do_switch3 (svn_ra_session_t *session, const svn_ra_reporter3_t **reporter, void **report_baton, svn_revnum_t revision_to_switch_to, const char *switch_target, svn_depth_t depth, const char *switch_url, svn_boolean_t send_copyfrom_args, svn_boolean_t ignore_ancestry, const svn_delta_editor_t *switch_editor, void *switch_baton, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Ask the RA layer to switch a working copy to a new revision and URL. More...
 
svn_error_tsvn_ra_do_switch2 (svn_ra_session_t *session, const svn_ra_reporter3_t **reporter, void **report_baton, svn_revnum_t revision_to_switch_to, const char *switch_target, svn_depth_t depth, const char *switch_url, const svn_delta_editor_t *switch_editor, void *switch_baton, apr_pool_t *pool)
 Similar to svn_ra_do_switch3(), but always ignoring ancestry and never sending copyfrom_args. More...
 
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)
 Similar to svn_ra_do_switch2(), but taking svn_ra_reporter2_t instead of svn_ra_reporter3_t, and therefore only able to report svn_depth_infinity for depths. More...
 
svn_error_tsvn_ra_do_status2 (svn_ra_session_t *session, const svn_ra_reporter3_t **reporter, void **report_baton, const char *status_target, svn_revnum_t revision, svn_depth_t depth, 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). More...
 
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)
 Similar to svn_ra_do_status2(), but taking svn_ra_reporter2_t instead of svn_ra_reporter3_t, and therefore only able to report svn_depth_infinity for depths. More...
 
svn_error_tsvn_ra_do_diff3 (svn_ra_session_t *session, const svn_ra_reporter3_t **reporter, void **report_baton, svn_revnum_t revision, const char *diff_target, svn_depth_t depth, svn_boolean_t ignore_ancestry, svn_boolean_t text_deltas, 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_update2(). More...
 
svn_error_tsvn_ra_do_diff2 (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, svn_boolean_t text_deltas, const char *versus_url, const svn_delta_editor_t *diff_editor, void *diff_baton, apr_pool_t *pool)
 Similar to svn_ra_do_diff3(), but taking svn_ra_reporter2_t instead of svn_ra_reporter3_t, and therefore only able to report svn_depth_infinity for depths. More...
 
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)
 Similar to svn_ra_do_diff2(), but with text_deltas set to TRUE. More...
 
svn_error_tsvn_ra_get_log2 (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_boolean_t include_merged_revisions, const apr_array_header_t *revprops, svn_log_entry_receiver_t receiver, void *receiver_baton, apr_pool_t *pool)
 Invoke receiver with receiver_baton on each log message from start to end. More...
 
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)
 Similar to svn_ra_get_log2(), but uses svn_log_message_receiver_t instead of svn_log_entry_receiver_t. More...
 
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. More...
 
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. More...
 
svn_error_tsvn_ra_get_uuid2 (svn_ra_session_t *session, const char **uuid, apr_pool_t *pool)
 Set *uuid to the repository's UUID, allocated in pool. More...
 
svn_error_tsvn_ra_get_uuid (svn_ra_session_t *session, const char **uuid, apr_pool_t *pool)
 Similar to svn_ra_get_uuid2(), but returns the value allocated in session's pool. More...
 
svn_error_tsvn_ra_get_repos_root2 (svn_ra_session_t *session, const char **url, apr_pool_t *pool)
 Set *url to the repository's root URL, allocated in pool. More...
 
svn_error_tsvn_ra_get_repos_root (svn_ra_session_t *session, const char **url, apr_pool_t *pool)
 Similar to svn_ra_get_repos_root2(), but returns the value allocated in session's pool. More...
 
svn_error_tsvn_ra_get_locations (svn_ra_session_t *session, apr_hash_t **locations, const char *path, svn_revnum_t peg_revision, const 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. More...
 
svn_error_tsvn_ra_get_location_segments (svn_ra_session_t *session, const char *path, svn_revnum_t peg_revision, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_location_segment_receiver_t receiver, void *receiver_baton, apr_pool_t *pool)
 Call receiver (with receiver_baton) for each segment in the location history of path in peg_revision, working backwards in time from start_rev to end_rev. More...
 
svn_error_tsvn_ra_get_file_revs2 (svn_ra_session_t *session, const char *path, svn_revnum_t start, svn_revnum_t end, svn_boolean_t include_merged_revisions, svn_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"). More...
 
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)
 Similar to svn_ra_get_file_revs2(), but with include_merged_revisions set to FALSE. More...
 
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 base revisions for each path. More...
 
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. More...
 
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. More...
 
svn_error_tsvn_ra_get_locks2 (svn_ra_session_t *session, apr_hash_t **locks, const char *path, svn_depth_t depth, apr_pool_t *pool)
 Set *locks to a hashtable which represents all locks on or below path. More...
 
svn_error_tsvn_ra_get_locks (svn_ra_session_t *session, apr_hash_t **locks, const char *path, apr_pool_t *pool)
 Similar to svn_ra_get_locks2(), but with depth always passed as svn_depth_infinity. More...
 
svn_error_tsvn_ra_replay_range (svn_ra_session_t *session, svn_revnum_t start_revision, svn_revnum_t end_revision, svn_revnum_t low_water_mark, svn_boolean_t send_deltas, svn_ra_replay_revstart_callback_t revstart_func, svn_ra_replay_revfinish_callback_t revfinish_func, void *replay_baton, apr_pool_t *pool)
 Replay the changes from a range of revisions between start_revision and end_revision. More...
 
svn_error_tsvn_ra_replay (svn_ra_session_t *session, svn_revnum_t revision, svn_revnum_t low_water_mark, svn_boolean_t send_deltas, const svn_delta_editor_t *editor, void *edit_baton, apr_pool_t *pool)
 Replay the changes from revision through editor and edit_baton. More...
 
svn_error_tsvn_ra_get_deleted_rev (svn_ra_session_t *session, const char *path, svn_revnum_t peg_revision, svn_revnum_t end_revision, svn_revnum_t *revision_deleted, apr_pool_t *pool)
 Given path at revision peg_revision, set *revision_deleted to the revision path was first deleted, within the inclusive revision range defined by peg_revision and end_revision. More...
 
svn_error_tsvn_ra_get_inherited_props (svn_ra_session_t *session, apr_array_header_t **inherited_props, const char *path, svn_revnum_t revision, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Set *inherited_props to a depth-first ordered array of svn_prop_inherited_item_t * structures representing the properties inherited by path at revision (or the 'head' revision if revision is SVN_INVALID_REVNUM). More...
 
svn_error_tsvn_ra_has_capability (svn_ra_session_t *session, svn_boolean_t *has, const char *capability, apr_pool_t *pool)
 Set *has to TRUE if the server represented by session has capability (one of the capabilities beginning with "SVN_RA_CAPABILITY_"), else set *has to FALSE. More...
 
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. More...
 
svn_error_tsvn_ra_print_ra_libraries (svn_stringbuf_t **descriptions, void *ra_baton, apr_pool_t *pool)
 Similar to svn_ra_print_modules(). More...
 
svn_error_tsvn_ra_dav_init (int abi_version, apr_pool_t *pool, apr_hash_t *hash)
 Initialize libsvn_ra_serf. More...
 
svn_error_tsvn_ra_local_init (int abi_version, apr_pool_t *pool, apr_hash_t *hash)
 Initialize libsvn_ra_local. More...
 
svn_error_tsvn_ra_svn_init (int abi_version, apr_pool_t *pool, apr_hash_t *hash)
 Initialize libsvn_ra_svn. More...
 
svn_error_tsvn_ra_serf_init (int abi_version, apr_pool_t *pool, apr_hash_t *hash)
 Initialize libsvn_ra_serf. More...
 
svn_error_tsvn_ra_init_ra_libs (void **ra_baton, apr_pool_t *pool)
 Initialize the compatibility wrapper, using pool for any allocations. More...
 
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. More...
 

Detailed Description

Repository Access.

Definition in file svn_ra.h.

Macro Definition 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 2395 of file svn_ra.h.

Typedef Documentation

A collection of callbacks implemented by libsvn_client which allows an RA layer to "pull" information from the client application, or possibly store information.

libsvn_client passes this vtable to svn_ra_open4().

Each routine takes a callback_baton originally provided with the vtable.

Clients must use svn_ra_create_callbacks() to allocate and initialize this structure.

Since
New in 1.3.

Similar to svn_ra_callbacks2_t, except that the progress notification function and baton is missing.

Deprecated:
Provided for backward compatibility with the 1.2 API.
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 171 of file svn_ra.h.

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

A function type which allows the RA layer to ask about any customizations to the client name string.

This is primarily used by HTTP-based RA layers wishing to extend the string reported to Apache/mod_dav_svn via the User-agent HTTP header.

Since
New in 1.5.

Definition at line 149 of file svn_ra.h.

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.

Definition at line 138 of file svn_ra.h.

typedef svn_error_t*(* svn_ra_get_wc_contents_func_t)(void *baton, svn_stream_t **contents, const svn_checksum_t *checksum, apr_pool_t *pool)

This is a function type which allows the RA layer to fetch the cached pristine file contents whose checksum is checksum, if any.

*contents will be a read stream containing those contents if they are found; NULL otherwise.

Since
New in 1.8.

Definition at line 131 of file svn_ra.h.

typedef svn_error_t*(* svn_ra_get_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 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 svn_ra_open4() 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 73 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 2366 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 recursively.

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 118 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 200 of file svn_ra.h.

Using this callback struct is similar to calling the newer public interface that is based on svn_ra_session_t.

Deprecated:
Provided for backward compatibility with the 1.1 API.
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 216 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 105 of file svn_ra.h.

typedef svn_error_t*(* svn_ra_replay_revfinish_callback_t)(svn_revnum_t revision, void *replay_baton, const svn_delta_editor_t *editor, void *edit_baton, apr_hash_t *rev_props, apr_pool_t *pool)

Callback function type for replay_range actions.

This callback function should close the editor.

revision is the target revision number of the received replay report.

editor and edit_baton should provided by the callback implementation.

replay_baton is the baton as originally passed to replay_range.

revprops contains key/value pairs for each revision properties for this revision.

Since
New in 1.5.

Definition at line 262 of file svn_ra.h.

typedef svn_error_t*(* svn_ra_replay_revstart_callback_t)(svn_revnum_t revision, void *replay_baton, const svn_delta_editor_t **editor, void **edit_baton, apr_hash_t *rev_props, apr_pool_t *pool)

Callback function type for replay_range actions.

This callback function should provide replay_range with an editor which will be driven with the received replay reports from the master repository.

revision is the target revision number of the received replay report.

editor and edit_baton should provided by the callback implementation.

replay_baton is the baton as originally passed to replay_range.

revprops contains key/value pairs for each revision properties for this revision.

Since
New in 1.5.

Definition at line 238 of file svn_ra.h.

Similar to svn_ra_reporter3_t, but without support for depths.

Deprecated:
Provided for backward compatibility with the 1.4 API.

The update Reporter.

A vtable structure which allows a working copy to describe a subset (or possibly all) of its working-copy to an RA layer, for the purposes of an update, switch, status, or diff operation.

Paths for report calls are relative to the target (not the anchor) of the operation. Report calls must be made in depth-first order: parents before children, all children of a parent before any siblings of the parent. The first report call must be a set_path with a path argument of "" and a valid revision. (If the target of the operation is locally deleted or missing, use the anchor's revision.) If the target of the operation is deleted or switched relative to the anchor, follow up the initial set_path call with a link_path or delete_path call with a path argument of "" to indicate that. In no other case may there be two report descriptions for the same path. If the target of the operation is a locally added file or directory (which previously did not exist), it may be reported as having revision 0 or as having the parent directory's revision.

Since
New in 1.5.

Similar to svn_ra_reporter2_t, but without support for lock tokens.

Deprecated:
Provided for backward compatibility with the 1.1 API.

A repository access session.

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

Since
New in 1.2.

Definition at line 599 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 85 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 
)

Similar to svn_ra_change_rev_prop2(), but with old_value_p set to NULL.

Since
New in 1.2.
Deprecated:
Provided for backward compatibility with the 1.6 API.
svn_error_t* svn_ra_change_rev_prop2 ( svn_ra_session_t session,
svn_revnum_t  rev,
const char *  name,
const svn_string_t *const *  old_value_p,
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.

If the server advertises the SVN_RA_CAPABILITY_ATOMIC_REVPROPS capability and old_value_p is not NULL, then changing the property will fail with an error chain that contains SVN_ERR_FS_PROP_BASEVALUE_MISMATCH if the present value of the property is not *old_value_p. (This is an atomic test-and-set). *old_value_p may be NULL, representing that the property must be not already set.

If the capability is not advertised, then old_value_p MUST be NULL.

Please note that properties attached to revisions are unversioned.

Use pool for memory allocation.

See Also
svn_fs_change_rev_prop2(), svn_error_find_cause().
Since
New in 1.7.
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_serf.

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 
)

Similar to svn_ra_do_diff2(), but with text_deltas set to TRUE.

Deprecated:
Provided for backward compatibility with the 1.3 API.
svn_error_t* svn_ra_do_diff2 ( 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,
svn_boolean_t  text_deltas,
const char *  versus_url,
const svn_delta_editor_t diff_editor,
void *  diff_baton,
apr_pool_t *  pool 
)

Similar to svn_ra_do_diff3(), but taking svn_ra_reporter2_t instead of svn_ra_reporter3_t, and therefore only able to report svn_depth_infinity for depths.

Perform the diff according to recurse: if TRUE, then depth is svn_depth_infinity, else it is svn_depth_files.

Deprecated:
Provided for compatibility with the 1.4 API.
svn_error_t* svn_ra_do_diff3 ( svn_ra_session_t session,
const svn_ra_reporter3_t **  reporter,
void **  report_baton,
svn_revnum_t  revision,
const char *  diff_target,
svn_depth_t  depth,
svn_boolean_t  ignore_ancestry,
svn_boolean_t  text_deltas,
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_update2().

Note
This function cannot be used to diff a single file, only a working copy directory. See the svn_ra_do_switch3() function for more details.

The client initially provides a diff_editor/diff_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 by making calls into the reporter.

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.

Diff only as deeply as depth indicates.

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.

text_deltas instructs the driver of the diff_editor to enable the generation of text deltas. If text_deltas is FALSE the window handler returned by apply_textdelta will be called once with a NULL svn_txdelta_window_t pointer.

Use pool for memory allocation.

Note
The reporter provided by this function does NOT supply copy- from information to the diff editor callbacks.
In order to prevent pre-1.5 servers from doing more work than needed, and sending too much data back, a pre-1.5 'recurse' directive may be sent to the server, based on depth.
Since
New in 1.5.
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 
)

Similar to svn_ra_do_status2(), but taking svn_ra_reporter2_t instead of svn_ra_reporter3_t, and therefore only able to report svn_depth_infinity for depths.

The status operation itself is performed according to recurse: if TRUE, then depth is svn_depth_infinity, else it is svn_depth_immediates.

Deprecated:
Provided for compatibility with the 1.4 API.
svn_error_t* svn_ra_do_status2 ( svn_ra_session_t session,
const svn_ra_reporter3_t **  reporter,
void **  report_baton,
const char *  status_target,
svn_revnum_t  revision,
svn_depth_t  depth,
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/status_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 by making calls into the reporter.

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's URL, or empty if the entire directory is meant to be examined.

Get status as deeply as depth indicates. If depth is svn_depth_unknown, get the status down to the ambient depth of the working copy. If depth is deeper than the working copy, include changes that would be needed to populate the working copy to that depth.

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.

Note
The reporter provided by this function does NOT supply copy- from information to the diff editor callbacks.
In order to prevent pre-1.5 servers from doing more work than needed, and sending too much data back, a pre-1.5 'recurse' directive may be sent to the server, based on depth.
Since
New in 1.5.
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 
)

Similar to svn_ra_do_switch2(), but taking svn_ra_reporter2_t instead of svn_ra_reporter3_t, and therefore only able to report svn_depth_infinity for depths.

The switch itself is performed according to recurse: if TRUE, then use svn_depth_infinity for depth, else use svn_depth_files.

Deprecated:
Provided for compatibility with the 1.4 API.
svn_error_t* svn_ra_do_switch2 ( svn_ra_session_t session,
const svn_ra_reporter3_t **  reporter,
void **  report_baton,
svn_revnum_t  revision_to_switch_to,
const char *  switch_target,
svn_depth_t  depth,
const char *  switch_url,
const svn_delta_editor_t switch_editor,
void *  switch_baton,
apr_pool_t *  pool 
)

Similar to svn_ra_do_switch3(), but always ignoring ancestry and never sending copyfrom_args.

Since
New in 1.5.
Deprecated:
Provided for compatibility with the 1.7 API.
svn_error_t* svn_ra_do_switch3 ( svn_ra_session_t session,
const svn_ra_reporter3_t **  reporter,
void **  report_baton,
svn_revnum_t  revision_to_switch_to,
const char *  switch_target,
svn_depth_t  depth,
const char *  switch_url,
svn_boolean_t  send_copyfrom_args,
svn_boolean_t  ignore_ancestry,
const svn_delta_editor_t switch_editor,
void *  switch_baton,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Ask the RA layer to switch a working copy to a new revision and URL.

This is similar to svn_ra_do_update3(), but also changes the URL of every node in the target tree to a child of the switch_url. In contrast, update changes only the revision numbers, leaving any switched subtrees still switched.

Note
Pre Subversion 1.8 svnserve based servers always ignore ancestry and never send copyfrom data.
Since
New in 1.8.
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 
)

Similar to svn_ra_do_update2(), but taking svn_ra_reporter2_t instead of svn_ra_reporter3_t; if recurse is true, pass svn_depth_infinity for depth, else pass svn_depth_files; and with send_copyfrom_args always false.

Deprecated:
Provided for compatibility with the 1.4 API.
svn_error_t* svn_ra_do_update2 ( svn_ra_session_t session,
const svn_ra_reporter3_t **  reporter,
void **  report_baton,
svn_revnum_t  revision_to_update_to,
const char *  update_target,
svn_depth_t  depth,
svn_boolean_t  send_copyfrom_args,
const svn_delta_editor_t update_editor,
void *  update_baton,
apr_pool_t *  pool 
)

Similar to svn_ra_do_update3(), but always ignoring ancestry.

Since
New in 1.5.
Deprecated:
Provided for compatibility with the 1.4 API.
svn_error_t* svn_ra_do_update3 ( svn_ra_session_t session,
const svn_ra_reporter3_t **  reporter,
void **  report_baton,
svn_revnum_t  revision_to_update_to,
const char *  update_target,
svn_depth_t  depth,
svn_boolean_t  send_copyfrom_args,
svn_boolean_t  ignore_ancestry,
const svn_delta_editor_t update_editor,
void *  update_baton,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Ask the RA layer to update a working copy to a new revision.

The client initially provides an update_editor/update_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 by making calls into the reporter.

When finished, the client calls reporter->finish_report(). The RA layer then does a complete drive of update_editor, ending with update_editor->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.

Update the target only as deeply as depth indicates.

If send_copyfrom_args is TRUE, then ask the server to send copyfrom arguments to add_file() and add_directory() when possible. (Note: this means that any subsequent txdeltas coming from the server are presumed to apply against the copied file!)

Use ignore_ancestry to control whether or not items being updated 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.

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.

Allocate *reporter and *report_baton in result_pool. Use scratch_pool for temporary allocations.

Note
The reporter provided by this function does NOT supply copy- from information to the diff editor callbacks.
In order to prevent pre-1.5 servers from doing more work than needed, and sending too much data back, a pre-1.5 'recurse' directive may be sent to the server, based on depth.
Pre Subversion 1.8 svnserve based servers never ignore ancestry.
This differs from calling svn_ra_do_switch3() with the current URL of the target node. Update changes only the revision numbers, leaving any switched subtrees still switched, whereas switch changes every node in the tree to a child of the same URL.
Since
New in 1.8.
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 
)

Same as svn_ra_get_commit_editor2(), but uses svn_commit_callback_t.

Since
New in 1.2.
Deprecated:
Provided for backward compatibility with the 1.3 API.
svn_error_t* svn_ra_get_commit_editor2 ( svn_ra_session_t session,
const svn_delta_editor_t **  editor,
void **  edit_baton,
const char *  log_msg,
svn_commit_callback2_t  commit_callback,
void *  commit_baton,
apr_hash_t *  lock_tokens,
svn_boolean_t  keep_locks,
apr_pool_t *  pool 
)

Same as svn_ra_get_commit_editor3(), but with revprop_table set to a hash containing the SVN_PROP_REVISION_LOG property set to the value of log_msg.

Since
New in 1.4.
Deprecated:
Provided for backward compatibility with the 1.4 API.
svn_error_t* svn_ra_get_commit_editor3 ( svn_ra_session_t session,
const svn_delta_editor_t **  editor,
void **  edit_baton,
apr_hash_t *  revprop_table,
svn_commit_callback2_t  commit_callback,
void *  commit_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, setting the revision properties from revprop_table.

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 the session's URL.

revprop_table is a hash mapping const char * property names to svn_string_t property values. The commit log message is expected to be in the SVN_PROP_REVISION_LOG element. revprop_table can not contain either of SVN_PROP_REVISION_DATE or SVN_PROP_REVISION_AUTHOR.

Before close_edit returns, but after the commit has succeeded, it will invoke commit_callback (if non-NULL) with filled-in svn_commit_info_t *, commit_baton, and pool or some subpool thereof as arguments. If commit_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 commit_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) 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.5.
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_deleted_rev ( svn_ra_session_t session,
const char *  path,
svn_revnum_t  peg_revision,
svn_revnum_t  end_revision,
svn_revnum_t revision_deleted,
apr_pool_t *  pool 
)

Given path at revision peg_revision, set *revision_deleted to the revision path was first deleted, within the inclusive revision range defined by peg_revision and end_revision.

path is relative to the URL in session.

If path does not exist at peg_revision or was not deleted within the specified range, then set *revision_deleted to SVN_INVALID_REVNUM. If peg_revision or end_revision are invalid or if peg_revision is greater than end_revision, then return SVN_ERR_CLIENT_BAD_REVISION.

Use pool for all allocations.

Since
New in 1.6.
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 
)

Similar to svn_ra_get_dir2, but with SVN_DIRENT_ALL for the dirent_fields parameter.

Since
New in 1.2.
Deprecated:
Provided for compatibility with the 1.3 API.
svn_error_t* svn_ra_get_dir2 ( svn_ra_session_t session,
apr_hash_t **  dirents,
svn_revnum_t fetched_rev,
apr_hash_t **  props,
const char *  path,
svn_revnum_t  revision,
apr_uint32_t  dirent_fields,
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.

dirent_fields controls which portions of the svn_dirent_t objects are filled in. To have them completely filled in just pass SVN_DIRENT_ALL, otherwise pass the bitwise OR of all the SVN_DIRENT_ fields you would like to have returned to you.

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.4.
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.

revision may be SVN_INVALID_REVNUM, indicating that the HEAD revision should be used. Interpret path relative to the URL in session. Use pool for all allocations.

If revision is SVN_INVALID_REVNUM and fetched_rev is not NULL, then set *fetched_rev to the actual revision that was retrieved.

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 
)

Similar to svn_ra_get_file_revs2(), but with include_merged_revisions set to FALSE.

Since
New in 1.2.
Deprecated:
Provided for backward compatibility with the 1.4 API.
svn_error_t* svn_ra_get_file_revs2 ( svn_ra_session_t session,
const char *  path,
svn_revnum_t  start,
svn_revnum_t  end,
svn_boolean_t  include_merged_revisions,
svn_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.

If include_merged_revisions is TRUE, revisions which are included as a result of a merge between start and end will be included.

Note
This functionality is not available in pre-1.1 servers. If the server doesn't implement it, an alternative (but much slower) implementation based on svn_ra_get_log2() is used.

On subversion 1.8 and newer servers this function has been enabled to support reversion of the revision range for include_merged_revision FALSE reporting by switching end with start.

Since
New in 1.5.
svn_error_t* svn_ra_get_inherited_props ( svn_ra_session_t session,
apr_array_header_t **  inherited_props,
const char *  path,
svn_revnum_t  revision,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Set *inherited_props to a depth-first ordered array of svn_prop_inherited_item_t * structures representing the properties inherited by path at revision (or the 'head' revision if revision is SVN_INVALID_REVNUM).

Interpret path relative to the URL in session. Use pool for all allocations. If no inheritable properties are found, then set *inherited_props to an empty array.

The svn_prop_inherited_item_t->path_or_url members of the svn_prop_inherited_item_t * structures in *inherited_props are paths relative to the repository root URL (of the repository which ra_session is associated).

Allocate *inherited_props in result_pool. Use scratch_pool for temporary allocations.

Since
New in 1.8.
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_location_segments ( svn_ra_session_t session,
const char *  path,
svn_revnum_t  peg_revision,
svn_revnum_t  start_rev,
svn_revnum_t  end_rev,
svn_location_segment_receiver_t  receiver,
void *  receiver_baton,
apr_pool_t *  pool 
)

Call receiver (with receiver_baton) for each segment in the location history of path in peg_revision, working backwards in time from start_rev to end_rev.

end_rev may be SVN_INVALID_REVNUM to indicate that you want to trace the history of the object to its origin.

start_rev may be SVN_INVALID_REVNUM to indicate "the HEAD revision". Otherwise, start_rev must be younger than end_rev (unless end_rev is SVN_INVALID_REVNUM).

peg_revision may be SVN_INVALID_REVNUM to indicate "the HEAD revision", and must evaluate to be at least as young as start_rev.

Use pool for all allocations.

Since
New in 1.5.
svn_error_t* svn_ra_get_locations ( svn_ra_session_t session,
apr_hash_t **  locations,
const char *  path,
svn_revnum_t  peg_revision,
const 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.

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 
)

Similar to svn_ra_get_locks2(), but with depth always passed as svn_depth_infinity.

Since
New in 1.2.
Deprecated:
Provided for backward compatibility with the 1.6 API.
svn_error_t* svn_ra_get_locks2 ( svn_ra_session_t session,
apr_hash_t **  locks,
const char *  path,
svn_depth_t  depth,
apr_pool_t *  pool 
)

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

depth limits the returned locks to those associated with paths within the specified depth of path, and must be one of the following values: svn_depth_empty, svn_depth_files, svn_depth_immediates, or svn_depth_infinity.

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.7.
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 
)

Similar to svn_ra_get_log2(), but uses svn_log_message_receiver_t instead of svn_log_entry_receiver_t.

Also, include_merged_revisions is set to FALSE and revprops is svn:author, svn:date, and svn:log.

Since
New in 1.2.
Deprecated:
Provided for backward compatibility with the 1.4 API.
svn_error_t* svn_ra_get_log2 ( 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_boolean_t  include_merged_revisions,
const apr_array_header_t *  revprops,
svn_log_entry_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, the hash's values are const svn_log_changed_path2_t * for each committed path. 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 include_merged_revisions is set, log information for revisions which have been merged to targets will also be returned.

If revprops is NULL, retrieve all revision properties; else, retrieve only the revision properties named by the (const char *) array elements (i.e. retrieve none if the array is empty).

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.

Note
If paths is NULL or empty, the result depends on the server. Pre-1.5 servers will send nothing; 1.5 servers will effectively perform the log operation on the root of the repository. This behavior may be changed in the future to ensure consistency across all pedigrees of server.
Pre-1.5 servers do not support custom revprop retrieval; if revprops is NULL or contains a revprop other than svn:author, svn:date, or svn:log, an SVN_ERR_RA_NOT_IMPLEMENTED error is returned.
Since
New in 1.5.
svn_error_t* svn_ra_get_mergeinfo ( svn_ra_session_t session,
svn_mergeinfo_catalog_t *  catalog,
const apr_array_header_t *  paths,
svn_revnum_t  revision,
svn_mergeinfo_inheritance_t  inherit,
svn_boolean_t  include_descendants,
apr_pool_t *  pool 
)

Set *catalog to a mergeinfo catalog for the paths in paths.

If no mergeinfo is available, set *catalog to NULL. The requested mergeinfo hashes are for paths (which are relative to session's URL) in revision. If one of the paths does not exist in that revision, return SVN_ERR_FS_NOT_FOUND.

inherit indicates whether explicit, explicit or inherited, or only inherited mergeinfo for paths is retrieved.

If include_descendants is TRUE, then additionally return the mergeinfo for any descendant of any element of paths which has the SVN_PROP_MERGEINFO property explicitly set on it. (Note that inheritance is only taken into account for the elements in paths; descendants of the elements in paths which get their mergeinfo via inheritance are not included in *catalog.)

Allocate the returned values in pool.

If revision is SVN_INVALID_REVNUM, it defaults to youngest.

If the server doesn't support retrieval of mergeinfo (which can happen even for file:// URLs, if the repository itself hasn't been upgraded), return SVN_ERR_UNSUPPORTED_FEATURE in preference to any other error that might otherwise be returned.

Since
New in 1.5.
svn_error_t* svn_ra_get_path_relative_to_root ( svn_ra_session_t ra_session,
const char **  rel_path,
const char *  url,
apr_pool_t *  pool 
)

Convert url into a path relative to the repository root URL of the repository with which ra_session is associated, setting *rel_path to that value.

If url is not a child of repository root URL, return SVN_ERR_RA_ILLEGAL_URL.

The returned path is uri decoded to allow using it with the ra or other apis as a valid relpath.

Since
New in 1.7.
svn_error_t* svn_ra_get_path_relative_to_session ( svn_ra_session_t ra_session,
const char **  rel_path,
const char *  url,
apr_pool_t *  pool 
)

Convert url into a path relative to the session URL of ra_session, setting *rel_path to that value.

If url is not a child of the session URL, return SVN_ERR_RA_ILLEGAL_URL.

The returned path is uri decoded to allow using it with the ra or other apis as a valid relpath.

Since
New in 1.7.
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 
)

Similar to svn_ra_get_repos_root2(), but returns the value allocated in session's pool.

Deprecated:
Provided for backward compatibility with the 1.4 API.
Since
New in 1.2.
svn_error_t* svn_ra_get_repos_root2 ( svn_ra_session_t session,
const char **  url,
apr_pool_t *  pool 
)

Set *url to the repository's root URL, allocated in pool.

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

Since
New in 1.5.
svn_error_t* svn_ra_get_session_url ( svn_ra_session_t ra_session,
const char **  url,
apr_pool_t *  pool 
)

Set *url to the session URL – the URL to which ra_session was opened or most recently reparented.

Since
New in 1.5.
svn_error_t* svn_ra_get_uuid ( svn_ra_session_t session,
const char **  uuid,
apr_pool_t *  pool 
)

Similar to svn_ra_get_uuid2(), but returns the value allocated in session's pool.

Deprecated:
Provided for backward compatibility with the 1.4 API.
Since
New in 1.2.
svn_error_t* svn_ra_get_uuid2 ( svn_ra_session_t session,
const char **  uuid,
apr_pool_t *  pool 
)

Set *uuid to the repository's UUID, allocated in pool.

Since
New in 1.5.
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 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.

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 
)

Similar to svn_ra_open3(), but with uuid set to NULL.

Since
New in 1.3.
Deprecated:
Provided for backward compatibility with the 1.4 API.
svn_error_t* svn_ra_open3 ( svn_ra_session_t **  session_p,
const char *  repos_URL,
const char *  uuid,
const svn_ra_callbacks2_t callbacks,
void *  callback_baton,
apr_hash_t *  config,
apr_pool_t *  pool 
)

Similar to svn_ra_open4(), but with corrected_url always passed as NULL.

Since
New in 1.5.
Deprecated:
Provided for backward compatibility with the 1.6 API.
svn_error_t* svn_ra_open4 ( svn_ra_session_t **  session_p,
const char **  corrected_url,
const char *  repos_URL,
const char *  uuid,
const svn_ra_callbacks2_t callbacks,
void *  callback_baton,
apr_hash_t *  config,
apr_pool_t *  pool 
)

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

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

The 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 corrected_url is returned, it will point to the same path within the new repository root URL that repos_URL pointed to within the old repository root URL.

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

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". 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 pool for memory allocation.

See Also
svn_client_open_ra_session().
Since
New in 1.7.
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_reparent ( svn_ra_session_t ra_session,
const char *  url,
apr_pool_t *  pool 
)

Change the root URL of an open ra_session to point to a new path in the same repository.

url is the new root URL. Use pool for temporary allocations.

If url has a different repository root than the current session URL, return SVN_ERR_RA_ILLEGAL_URL.

Since
New in 1.4.
svn_error_t* svn_ra_replay ( svn_ra_session_t session,
svn_revnum_t  revision,
svn_revnum_t  low_water_mark,
svn_boolean_t  send_deltas,
const svn_delta_editor_t editor,
void *  edit_baton,
apr_pool_t *  pool 
)

Replay the changes from revision through editor and edit_baton.

Changes will be limited to those that occur under session's URL, and the server will assume that the client has no knowledge of revisions prior to low_water_mark. These two limiting factors define the portion of the tree that the server will assume the client already has knowledge of, and thus any copies of data from outside that part of the tree will be sent in their entirety, not as simple copies or deltas against a previous version.

If send_deltas is TRUE, the actual text and property changes in the revision will be sent, otherwise dummy text deltas and null property changes will be sent instead.

pool is used for all allocation.

Since
New in 1.4.
svn_error_t* svn_ra_replay_range ( svn_ra_session_t session,
svn_revnum_t  start_revision,
svn_revnum_t  end_revision,
svn_revnum_t  low_water_mark,
svn_boolean_t  send_deltas,
svn_ra_replay_revstart_callback_t  revstart_func,
svn_ra_replay_revfinish_callback_t  revfinish_func,
void *  replay_baton,
apr_pool_t *  pool 
)

Replay the changes from a range of revisions between start_revision and end_revision.

When receiving information for one revision, a callback revstart_func is called; this callback will provide an editor and baton through which the revision will be replayed. When replaying the revision is finished, callback revfinish_func will be called so the editor can be closed.

Changes will be limited to those that occur under session's URL, and the server will assume that the client has no knowledge of revisions prior to low_water_mark. These two limiting factors define the portion of the tree that the server will assume the client already has knowledge of, and thus any copies of data from outside that part of the tree will be sent in their entirety, not as simple copies or deltas against a previous version.

If send_deltas is TRUE, the actual text and property changes in the revision will be sent, otherwise dummy text deltas and NULL property changes will be sent instead.

pool is used for all allocation.

Since
New in 1.5.
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_serf_init ( int  abi_version,
apr_pool_t *  pool,
apr_hash_t *  hash 
)

Initialize libsvn_ra_serf.

Since
New in 1.4.
Deprecated:
Provided for backward compatibility with the 1.1 API.
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 lock_func/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.