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

Tools built on top of the filesystem. More...

#include <apr_pools.h>
#include <apr_hash.h>
#include <apr_tables.h>
#include <apr_time.h>
#include "svn_types.h"
#include "svn_string.h"
#include "svn_delta.h"
#include "svn_fs.h"
#include "svn_io.h"
#include "svn_mergeinfo.h"

Go to the source code of this file.

Data Structures

struct  svn_repos_notify_t
 Structure used by svn_repos_notify_func_t. More...
 
struct  svn_repos_node_t
 A node in the repository. More...
 
struct  svn_repos_parse_fns3_t
 A vtable that is driven by svn_repos_parse_dumpstream3(). More...
 
struct  svn_repos_parse_fns2_t
 A vtable that is driven by svn_repos_parse_dumpstream2(). More...
 
struct  svn_repos_parse_fns_t
 A vtable that is driven by svn_repos_parse_dumpstream(). More...
 

Macros

#define SVN_REPOS_CAPABILITY_MERGEINFO   "mergeinfo"
 The capability of doing the right thing with merge-tracking information, both storing it and responding to queries about it. More...
 
#define SVN_REPOS_DUMPFILE_MAGIC_HEADER   "SVN-fs-dump-format-version"
 
#define SVN_REPOS_DUMPFILE_FORMAT_VERSION   3
 
#define SVN_REPOS_DUMPFILE_FORMAT_VERSION_DELTAS   3
 
#define SVN_REPOS_DUMPFILE_UUID   "UUID"
 
#define SVN_REPOS_DUMPFILE_CONTENT_LENGTH   "Content-length"
 
#define SVN_REPOS_DUMPFILE_REVISION_NUMBER   "Revision-number"
 
#define SVN_REPOS_DUMPFILE_NODE_PATH   "Node-path"
 
#define SVN_REPOS_DUMPFILE_NODE_KIND   "Node-kind"
 
#define SVN_REPOS_DUMPFILE_NODE_ACTION   "Node-action"
 
#define SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH   "Node-copyfrom-path"
 
#define SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV   "Node-copyfrom-rev"
 
#define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5   "Text-copy-source-md5"
 
#define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_SHA1   "Text-copy-source-sha1"
 
#define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_CHECKSUM   SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5
 
#define SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5   "Text-content-md5"
 
#define SVN_REPOS_DUMPFILE_TEXT_CONTENT_SHA1   "Text-content-sha1"
 
#define SVN_REPOS_DUMPFILE_TEXT_CONTENT_CHECKSUM   SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5
 
#define SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH   "Prop-content-length"
 
#define SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH   "Text-content-length"
 
#define SVN_REPOS_DUMPFILE_PROP_DELTA   "Prop-delta"
 
#define SVN_REPOS_DUMPFILE_TEXT_DELTA   "Text-delta"
 
#define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5   "Text-delta-base-md5"
 
#define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_SHA1   "Text-delta-base-sha1"
 
#define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_CHECKSUM   SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5
 

Typedefs

typedef svn_error_t *(* svn_repos_authz_func_t )(svn_boolean_t *allowed, svn_fs_root_t *root, const char *path, void *baton, apr_pool_t *pool)
 Callback type for checking authorization on paths produced by (at least) svn_repos_dir_delta2(). More...
 
typedef enum
svn_repos_authz_access_t 
svn_repos_authz_access_t
 An enum defining the kinds of access authz looks up. More...
 
typedef svn_error_t *(* svn_repos_authz_callback_t )(svn_repos_authz_access_t required, svn_boolean_t *allowed, svn_fs_root_t *root, const char *path, void *baton, apr_pool_t *pool)
 Callback type for checking authorization on paths produced by the repository commit editor. More...
 
typedef svn_error_t *(* svn_repos_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)
 Similar to svn_file_rev_handler_t, but without the result_of_merge parameter. More...
 
typedef enum
svn_repos_notify_action_t 
svn_repos_notify_action_t
 The type of action occurring. More...
 
typedef enum
svn_repos_notify_warning_t 
svn_repos_notify_warning_t
 The type of error occurring. More...
 
typedef struct svn_repos_notify_t svn_repos_notify_t
 Structure used by svn_repos_notify_func_t. More...
 
typedef void(* svn_repos_notify_func_t )(void *baton, const svn_repos_notify_t *notify, apr_pool_t *scratch_pool)
 Callback for providing notification from the repository. More...
 
typedef struct svn_repos_t svn_repos_t
 The repository object. More...
 
typedef svn_error_t *(* svn_repos_freeze_func_t )(void *baton, apr_pool_t *pool)
 Callback for svn_repos_freeze. More...
 
typedef svn_error_t *(* svn_repos_history_func_t )(void *baton, const char *path, svn_revnum_t revision, apr_pool_t *pool)
 Callback type for use with svn_repos_history(). More...
 
typedef struct svn_repos_node_t svn_repos_node_t
 A node in the repository. More...
 
typedef struct
svn_repos_parse_fns3_t 
svn_repos_parse_fns3_t
 A vtable that is driven by svn_repos_parse_dumpstream3(). More...
 
typedef struct
svn_repos_parse_fns2_t 
svn_repos_parse_fns2_t
 A vtable that is driven by svn_repos_parse_dumpstream2(). More...
 
typedef svn_repos_parse_fns2_t svn_repos_parser_fns2_t
 
typedef struct
svn_repos_parse_fns_t 
svn_repos_parser_fns_t
 A vtable that is driven by svn_repos_parse_dumpstream(). More...
 
typedef struct svn_authz_t svn_authz_t
 A data type which stores the authz information. More...
 
typedef enum
svn_repos_revision_access_level_t 
svn_repos_revision_access_level_t
 Revision Access Levels. More...
 

Enumerations

enum  svn_node_action {
  svn_node_action_change,
  svn_node_action_add,
  svn_node_action_delete,
  svn_node_action_replace
}
 The different "actions" attached to nodes in the dumpfile. More...
 
enum  svn_repos_load_uuid {
  svn_repos_load_uuid_default,
  svn_repos_load_uuid_ignore,
  svn_repos_load_uuid_force
}
 The different policies for processing the UUID in the dumpfile. More...
 
enum  svn_repos_authz_access_t {
  svn_authz_none = 0,
  svn_authz_read = 1,
  svn_authz_write = 2,
  svn_authz_recursive = 4
}
 An enum defining the kinds of access authz looks up. More...
 
enum  svn_repos_notify_action_t {
  svn_repos_notify_warning = 0,
  svn_repos_notify_dump_rev_end,
  svn_repos_notify_verify_rev_end,
  svn_repos_notify_dump_end,
  svn_repos_notify_verify_end,
  svn_repos_notify_pack_shard_start,
  svn_repos_notify_pack_shard_end,
  svn_repos_notify_pack_shard_start_revprop,
  svn_repos_notify_pack_shard_end_revprop,
  svn_repos_notify_load_txn_start,
  svn_repos_notify_load_txn_committed,
  svn_repos_notify_load_node_start,
  svn_repos_notify_load_node_done,
  svn_repos_notify_load_copied_node,
  svn_repos_notify_load_normalized_mergeinfo,
  svn_repos_notify_mutex_acquired,
  svn_repos_notify_recover_start,
  svn_repos_notify_upgrade_start,
  svn_repos_notify_load_skipped_rev,
  svn_repos_notify_verify_rev_structure
}
 The type of action occurring. More...
 
enum  svn_repos_notify_warning_t {
  svn_repos_notify_warning_found_old_reference,
  svn_repos_notify_warning_found_old_mergeinfo,
  svn_repos_notify_warning_invalid_fspath
}
 The type of error occurring. More...
 
enum  svn_repos_revision_access_level_t {
  svn_repos_revision_access_none,
  svn_repos_revision_access_partial,
  svn_repos_revision_access_full
}
 Revision Access Levels. More...
 

Functions

const svn_version_tsvn_repos_version (void)
 Get libsvn_repos version information. More...
 
svn_repos_notify_tsvn_repos_notify_create (svn_repos_notify_action_t action, apr_pool_t *result_pool)
 Allocate an svn_repos_notify_t structure in result_pool, initialize and return it. More...
 
const char * svn_repos_find_root_path (const char *path, apr_pool_t *pool)
 Find the root path of the repository that contains path. More...
 
svn_error_tsvn_repos_open2 (svn_repos_t **repos_p, const char *path, apr_hash_t *fs_config, apr_pool_t *pool)
 Set *repos_p to a repository object for the repository at path. More...
 
svn_error_tsvn_repos_open (svn_repos_t **repos_p, const char *path, apr_pool_t *pool)
 Similar to svn_repos_open2() with fs_config set to NULL. More...
 
svn_error_tsvn_repos_create (svn_repos_t **repos_p, const char *path, const char *unused_1, const char *unused_2, apr_hash_t *config, apr_hash_t *fs_config, apr_pool_t *pool)
 Create a new Subversion repository at path, building the necessary directory structure, creating the filesystem, and so on. More...
 
svn_error_tsvn_repos_upgrade2 (const char *path, svn_boolean_t nonblocking, svn_repos_notify_func_t notify_func, void *notify_baton, apr_pool_t *pool)
 Upgrade the Subversion repository (and its underlying versioned filesystem) located in the directory path to the latest version supported by this library. More...
 
svn_error_tsvn_repos_upgrade (const char *path, svn_boolean_t nonblocking, svn_error_t *(*start_callback)(void *baton), void *start_callback_baton, apr_pool_t *pool)
 Similar to svn_repos_upgrade2(), but with start_callback and baton, rather than a notify_callback / baton. More...
 
svn_error_tsvn_repos_delete (const char *path, apr_pool_t *pool)
 Destroy the Subversion repository found at path, using pool for any necessary allocations.
 
svn_error_tsvn_repos_has_capability (svn_repos_t *repos, svn_boolean_t *has, const char *capability, apr_pool_t *pool)
 Set *has to TRUE if repos has capability (one of the capabilities beginning with "SVN_REPOS_CAPABILITY_"), else set *has to FALSE. More...
 
svn_fs_tsvn_repos_fs (svn_repos_t *repos)
 Return the filesystem associated with repository object repos. More...
 
svn_error_tsvn_repos_hotcopy2 (const char *src_path, const char *dst_path, svn_boolean_t clean_logs, svn_boolean_t incremental, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Make a hot copy of the Subversion repository found at src_path to dst_path. More...
 
svn_error_tsvn_repos_hotcopy (const char *src_path, const char *dst_path, svn_boolean_t clean_logs, apr_pool_t *pool)
 Like svn_repos_hotcopy2(), but with incremental always passed as FALSE and without cancellation support. More...
 
svn_error_tsvn_repos_fs_pack2 (svn_repos_t *repos, svn_repos_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Possibly update the repository, repos, to use a more efficient filesystem representation. More...
 
svn_error_tsvn_repos_fs_pack (svn_repos_t *repos, svn_fs_pack_notify_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Similar to svn_repos_fs_pack2(), but with a svn_fs_pack_notify_t instead of a svn_repos_notify_t. More...
 
svn_error_tsvn_repos_recover4 (const char *path, svn_boolean_t nonblocking, svn_repos_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Run database recovery procedures on the repository at path, returning the database to a consistent state. More...
 
svn_error_tsvn_repos_recover3 (const char *path, svn_boolean_t nonblocking, svn_error_t *(*start_callback)(void *baton), void *start_callback_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Similar to svn_repos_recover4(), but with start callback in place of the notify_func / baton. More...
 
svn_error_tsvn_repos_recover2 (const char *path, svn_boolean_t nonblocking, svn_error_t *(*start_callback)(void *baton), void *start_callback_baton, apr_pool_t *pool)
 Similar to svn_repos_recover3(), but without cancellation support. More...
 
svn_error_tsvn_repos_recover (const char *path, apr_pool_t *pool)
 Similar to svn_repos_recover2(), but with nonblocking set to FALSE, and with no callbacks provided. More...
 
svn_error_tsvn_repos_freeze (apr_array_header_t *paths, svn_repos_freeze_func_t freeze_func, void *freeze_baton, apr_pool_t *pool)
 Take an exclusive lock on each of the repositories in paths to prevent commits and then while holding all the locks invoke freeze_func passing freeze_baton. More...
 
svn_error_tsvn_repos_db_logfiles (apr_array_header_t **logfiles, const char *path, svn_boolean_t only_unused, apr_pool_t *pool)
 This function is a wrapper around svn_fs_berkeley_logfiles(), returning log file paths relative to the root of the repository. More...
 
const char * svn_repos_path (svn_repos_t *repos, apr_pool_t *pool)
 Return the top-level repository path allocated in pool. More...
 
const char * svn_repos_db_env (svn_repos_t *repos, apr_pool_t *pool)
 Return the path to repos's filesystem directory, allocated in pool.
 
const char * svn_repos_conf_dir (svn_repos_t *repos, apr_pool_t *pool)
 Return path to repos's config directory, allocated in pool. More...
 
const char * svn_repos_svnserve_conf (svn_repos_t *repos, apr_pool_t *pool)
 Return path to repos's svnserve.conf, allocated in pool. More...
 
const char * svn_repos_lock_dir (svn_repos_t *repos, apr_pool_t *pool)
 Return path to repos's lock directory, allocated in pool. More...
 
const char * svn_repos_db_lockfile (svn_repos_t *repos, apr_pool_t *pool)
 Return path to repos's db lockfile, allocated in pool. More...
 
const char * svn_repos_db_logs_lockfile (svn_repos_t *repos, apr_pool_t *pool)
 Return path to repos's db logs lockfile, allocated in pool. More...
 
const char * svn_repos_hook_dir (svn_repos_t *repos, apr_pool_t *pool)
 Return the path to repos's hook directory, allocated in pool. More...
 
const char * svn_repos_start_commit_hook (svn_repos_t *repos, apr_pool_t *pool)
 Return the path to repos's start-commit hook, allocated in pool. More...
 
const char * svn_repos_pre_commit_hook (svn_repos_t *repos, apr_pool_t *pool)
 Return the path to repos's pre-commit hook, allocated in pool. More...
 
const char * svn_repos_post_commit_hook (svn_repos_t *repos, apr_pool_t *pool)
 Return the path to repos's post-commit hook, allocated in pool. More...
 
const char * svn_repos_pre_revprop_change_hook (svn_repos_t *repos, apr_pool_t *pool)
 Return the path to repos's pre-revprop-change hook, allocated in pool.
 
const char * svn_repos_post_revprop_change_hook (svn_repos_t *repos, apr_pool_t *pool)
 Return the path to repos's post-revprop-change hook, allocated in pool.
 
const char * svn_repos_pre_lock_hook (svn_repos_t *repos, apr_pool_t *pool)
 Return the path to repos's pre-lock hook, allocated in pool. More...
 
const char * svn_repos_post_lock_hook (svn_repos_t *repos, apr_pool_t *pool)
 Return the path to repos's post-lock hook, allocated in pool. More...
 
const char * svn_repos_pre_unlock_hook (svn_repos_t *repos, apr_pool_t *pool)
 Return the path to repos's pre-unlock hook, allocated in pool. More...
 
const char * svn_repos_post_unlock_hook (svn_repos_t *repos, apr_pool_t *pool)
 Return the path to repos's post-unlock hook, allocated in pool. More...
 
svn_error_tsvn_repos_hooks_setenv (svn_repos_t *repos, const char *hooks_env_path, apr_pool_t *scratch_pool)
 Specify that Subversion should consult the configuration file located at hooks_env_path to determine how to setup the environment for hook scripts invoked for the repository repos. More...
 
svn_error_tsvn_repos_begin_report3 (void **report_baton, svn_revnum_t revnum, svn_repos_t *repos, const char *fs_base, const char *target, const char *tgt_path, svn_boolean_t text_deltas, svn_depth_t depth, svn_boolean_t ignore_ancestry, svn_boolean_t send_copyfrom_args, const svn_delta_editor_t *editor, void *edit_baton, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_size_t zero_copy_limit, apr_pool_t *pool)
 Construct and return a report_baton that will be passed to the other functions in this section to describe the state of a pre-existing tree (typically, a working copy). More...
 
svn_error_tsvn_repos_begin_report2 (void **report_baton, svn_revnum_t revnum, svn_repos_t *repos, const char *fs_base, const char *target, const char *tgt_path, svn_boolean_t text_deltas, svn_depth_t depth, svn_boolean_t ignore_ancestry, svn_boolean_t send_copyfrom_args, const svn_delta_editor_t *editor, void *edit_baton, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool)
 The same as svn_repos_begin_report3(), but with zero_copy_limit always passed as 0. More...
 
svn_error_tsvn_repos_begin_report (void **report_baton, svn_revnum_t revnum, const char *username, svn_repos_t *repos, const char *fs_base, const char *target, const char *tgt_path, svn_boolean_t text_deltas, svn_boolean_t recurse, svn_boolean_t ignore_ancestry, const svn_delta_editor_t *editor, void *edit_baton, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool)
 The same as svn_repos_begin_report2(), but taking a boolean recurse flag, and sending FALSE for send_copyfrom_args. More...
 
svn_error_tsvn_repos_set_path3 (void *report_baton, const char *path, svn_revnum_t revision, svn_depth_t depth, svn_boolean_t start_empty, const char *lock_token, apr_pool_t *pool)
 Given a report_baton constructed by svn_repos_begin_report3(), record the presence of path, at revision with depth depth, in the current tree. More...
 
svn_error_tsvn_repos_set_path2 (void *report_baton, const char *path, svn_revnum_t revision, svn_boolean_t start_empty, const char *lock_token, apr_pool_t *pool)
 Similar to svn_repos_set_path3(), but with depth set to svn_depth_infinity. More...
 
svn_error_tsvn_repos_set_path (void *report_baton, const char *path, svn_revnum_t revision, svn_boolean_t start_empty, apr_pool_t *pool)
 Similar to svn_repos_set_path2(), but with lock_token set to NULL. More...
 
svn_error_tsvn_repos_link_path3 (void *report_baton, const char *path, const char *link_path, svn_revnum_t revision, svn_depth_t depth, svn_boolean_t start_empty, const char *lock_token, apr_pool_t *pool)
 Given a report_baton constructed by svn_repos_begin_report3(), record the presence of path in the current tree, containing the contents of link_path at revision with depth depth. More...
 
svn_error_tsvn_repos_link_path2 (void *report_baton, const char *path, const char *link_path, svn_revnum_t revision, svn_boolean_t start_empty, const char *lock_token, apr_pool_t *pool)
 Similar to svn_repos_link_path3(), but with depth set to svn_depth_infinity. More...
 
svn_error_tsvn_repos_link_path (void *report_baton, const char *path, const char *link_path, svn_revnum_t revision, svn_boolean_t start_empty, apr_pool_t *pool)
 Similar to svn_repos_link_path2(), but with lock_token set to NULL. More...
 
svn_error_tsvn_repos_delete_path (void *report_baton, const char *path, apr_pool_t *pool)
 Given a report_baton constructed by svn_repos_begin_report3(), record the non-existence of path in the current tree. More...
 
svn_error_tsvn_repos_finish_report (void *report_baton, apr_pool_t *pool)
 Given a report_baton constructed by svn_repos_begin_report3(), finish the report and drive the editor as specified when the report baton was constructed. More...
 
svn_error_tsvn_repos_abort_report (void *report_baton, apr_pool_t *pool)
 Given a report_baton constructed by svn_repos_begin_report3(), abort the report. More...
 
svn_error_tsvn_repos_dir_delta2 (svn_fs_root_t *src_root, const char *src_parent_dir, const char *src_entry, svn_fs_root_t *tgt_root, const char *tgt_path, const svn_delta_editor_t *editor, void *edit_baton, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, svn_boolean_t text_deltas, svn_depth_t depth, svn_boolean_t entry_props, svn_boolean_t ignore_ancestry, apr_pool_t *pool)
 Use the provided editor and edit_baton to describe the changes necessary for making a given node (and its descendants, if it is a directory) under src_root look exactly like tgt_path under tgt_root. More...
 
svn_error_tsvn_repos_dir_delta (svn_fs_root_t *src_root, const char *src_parent_dir, const char *src_entry, svn_fs_root_t *tgt_root, const char *tgt_path, const svn_delta_editor_t *editor, void *edit_baton, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, svn_boolean_t text_deltas, svn_boolean_t recurse, svn_boolean_t entry_props, svn_boolean_t ignore_ancestry, apr_pool_t *pool)
 Similar to svn_repos_dir_delta2(), but if recurse is TRUE, pass svn_depth_infinity for depth, and if recurse is FALSE, pass svn_depth_files for depth. More...
 
svn_error_tsvn_repos_replay2 (svn_fs_root_t *root, const char *base_dir, svn_revnum_t low_water_mark, svn_boolean_t send_deltas, const svn_delta_editor_t *editor, void *edit_baton, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool)
 Use the provided editor and edit_baton to describe the skeletal changes made in a particular filesystem root (revision or transaction). More...
 
svn_error_tsvn_repos_replay (svn_fs_root_t *root, const svn_delta_editor_t *editor, void *edit_baton, apr_pool_t *pool)
 Similar to svn_repos_replay2(), but with base_dir set to "", low_water_mark set to SVN_INVALID_REVNUM, send_deltas set to FALSE, and authz_read_func and authz_read_baton set to NULL. More...
 
svn_error_tsvn_repos_get_commit_editor5 (const svn_delta_editor_t **editor, void **edit_baton, svn_repos_t *repos, svn_fs_txn_t *txn, const char *repos_url, const char *base_path, apr_hash_t *revprop_table, svn_commit_callback2_t commit_callback, void *commit_baton, svn_repos_authz_callback_t authz_callback, void *authz_baton, apr_pool_t *pool)
 Return an editor and edit_baton to commit changes to the filesystem of repos, beginning at location 'rev:base_path', where "rev" is the argument given to open_root(). More...
 
svn_error_tsvn_repos_get_commit_editor4 (const svn_delta_editor_t **editor, void **edit_baton, svn_repos_t *repos, svn_fs_txn_t *txn, const char *repos_url, const char *base_path, const char *user, const char *log_msg, svn_commit_callback2_t commit_callback, void *commit_baton, svn_repos_authz_callback_t authz_callback, void *authz_baton, apr_pool_t *pool)
 Similar to svn_repos_get_commit_editor5(), but with revprop_table set to a hash containing user and log_msg as the SVN_PROP_REVISION_AUTHOR and SVN_PROP_REVISION_LOG properties, respectively. More...
 
svn_error_tsvn_repos_get_commit_editor3 (const svn_delta_editor_t **editor, void **edit_baton, svn_repos_t *repos, svn_fs_txn_t *txn, const char *repos_url, const char *base_path, const char *user, const char *log_msg, svn_commit_callback_t callback, void *callback_baton, svn_repos_authz_callback_t authz_callback, void *authz_baton, apr_pool_t *pool)
 Similar to svn_repos_get_commit_editor4(), but uses the svn_commit_callback_t type. More...
 
svn_error_tsvn_repos_get_commit_editor2 (const svn_delta_editor_t **editor, void **edit_baton, svn_repos_t *repos, svn_fs_txn_t *txn, const char *repos_url, const char *base_path, const char *user, const char *log_msg, svn_commit_callback_t callback, void *callback_baton, apr_pool_t *pool)
 Similar to svn_repos_get_commit_editor3(), but with authz_callback and authz_baton set to NULL. More...
 
svn_error_tsvn_repos_get_commit_editor (const svn_delta_editor_t **editor, void **edit_baton, svn_repos_t *repos, const char *repos_url, const char *base_path, const char *user, const char *log_msg, svn_commit_callback_t callback, void *callback_baton, apr_pool_t *pool)
 Similar to svn_repos_get_commit_editor2(), but with txn always set to NULL. More...
 
svn_error_tsvn_repos_dated_revision (svn_revnum_t *revision, svn_repos_t *repos, apr_time_t tm, apr_pool_t *pool)
 Set *revision to the revision number in repos's filesystem that was youngest at time tm.
 
svn_error_tsvn_repos_get_committed_info (svn_revnum_t *committed_rev, const char **committed_date, const char **last_author, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Given a root/path within some filesystem, return three pieces of information allocated in pool: More...
 
svn_error_tsvn_repos_stat (svn_dirent_t **dirent, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Set *dirent to an svn_dirent_t associated with path in root. More...
 
svn_error_tsvn_repos_deleted_rev (svn_fs_t *fs, const char *path, svn_revnum_t start, svn_revnum_t end, svn_revnum_t *deleted, apr_pool_t *pool)
 Given path which exists at revision start in fs, set *deleted to the revision path was first deleted, within the inclusive revision range bounded by start and end. More...
 
svn_error_tsvn_repos_history2 (svn_fs_t *fs, const char *path, svn_repos_history_func_t history_func, void *history_baton, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, svn_revnum_t start, svn_revnum_t end, svn_boolean_t cross_copies, apr_pool_t *pool)
 Call history_func (with history_baton) for each interesting history location in the lifetime of path in fs, from the youngest of end and start to the oldest. More...
 
svn_error_tsvn_repos_history (svn_fs_t *fs, const char *path, svn_repos_history_func_t history_func, void *history_baton, svn_revnum_t start, svn_revnum_t end, svn_boolean_t cross_copies, apr_pool_t *pool)
 Similar to svn_repos_history2(), but with authz_read_func and authz_read_baton always set to NULL. More...
 
svn_error_tsvn_repos_trace_node_locations (svn_fs_t *fs, apr_hash_t **locations, const char *fs_path, svn_revnum_t peg_revision, const apr_array_header_t *location_revisions, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool)
 Set *locations to be a mapping of the revisions to the paths of the file fs_path present at the repository in revision peg_revision, where the revisions are taken out of the array location_revisions. More...
 
svn_error_tsvn_repos_node_location_segments (svn_repos_t *repos, 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, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool)
 Call receiver and receiver_baton to report successive location segments in revisions between start_rev and end_rev (inclusive) for the line of history identified by the peg-object path in peg_revision (and in repos). More...
 
svn_error_tsvn_repos_get_logs4 (svn_repos_t *repos, 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_repos_authz_func_t authz_read_func, void *authz_read_baton, 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 in repos's filesystem. More...
 
svn_error_tsvn_repos_get_logs3 (svn_repos_t *repos, 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_repos_authz_func_t authz_read_func, void *authz_read_baton, svn_log_message_receiver_t receiver, void *receiver_baton, apr_pool_t *pool)
 Same as svn_repos_get_logs4(), but with receiver being svn_log_message_receiver_t instead of svn_log_entry_receiver_t. More...
 
svn_error_tsvn_repos_get_logs2 (svn_repos_t *repos, const apr_array_header_t *paths, svn_revnum_t start, svn_revnum_t end, svn_boolean_t discover_changed_paths, svn_boolean_t strict_node_history, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, svn_log_message_receiver_t receiver, void *receiver_baton, apr_pool_t *pool)
 Same as svn_repos_get_logs3(), but with limit always set to 0. More...
 
svn_error_tsvn_repos_get_logs (svn_repos_t *repos, const apr_array_header_t *paths, svn_revnum_t start, svn_revnum_t end, 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)
 Same as svn_repos_get_logs2(), but with authz_read_func and authz_read_baton always set to NULL. More...
 
svn_error_tsvn_repos_fs_get_mergeinfo (svn_mergeinfo_catalog_t *catalog, svn_repos_t *repos, const apr_array_header_t *paths, svn_revnum_t revision, svn_mergeinfo_inheritance_t inherit, svn_boolean_t include_descendants, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool)
 Fetch the mergeinfo for paths at revision in repos, and set *catalog to a catalog of this mergeinfo. More...
 
svn_error_tsvn_repos_get_file_revs2 (svn_repos_t *repos, const char *path, svn_revnum_t start, svn_revnum_t end, svn_boolean_t include_merged_revisions, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, svn_file_rev_handler_t handler, void *handler_baton, apr_pool_t *pool)
 Retrieve a subset of the interesting revisions of a file path in repos as seen in revision end. More...
 
svn_error_tsvn_repos_get_file_revs (svn_repos_t *repos, const char *path, svn_revnum_t start, svn_revnum_t end, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, svn_repos_file_rev_handler_t handler, void *handler_baton, apr_pool_t *pool)
 Similar to svn_repos_get_file_revs2(), with include_merged_revisions set to FALSE. More...
 
svn_error_tsvn_repos_fs_commit_txn (const char **conflict_p, svn_repos_t *repos, svn_revnum_t *new_rev, svn_fs_txn_t *txn, apr_pool_t *pool)
 Like svn_fs_commit_txn(), but invoke the repos' pre- and post-commit hooks around the commit. More...
 
svn_error_tsvn_repos_fs_begin_txn_for_commit2 (svn_fs_txn_t **txn_p, svn_repos_t *repos, svn_revnum_t rev, apr_hash_t *revprop_table, apr_pool_t *pool)
 Like svn_fs_begin_txn(), but use revprop_table, a hash mapping const char * property names to svn_string_t values, to set the properties on transaction *txn_p. More...
 
svn_error_tsvn_repos_fs_begin_txn_for_commit (svn_fs_txn_t **txn_p, svn_repos_t *repos, svn_revnum_t rev, const char *author, const char *log_msg, apr_pool_t *pool)
 Same as svn_repos_fs_begin_txn_for_commit2(), but with revprop_table set to a hash containing author and log_msg as the SVN_PROP_REVISION_AUTHOR and SVN_PROP_REVISION_LOG properties, respectively. More...
 
svn_error_tsvn_repos_fs_begin_txn_for_update (svn_fs_txn_t **txn_p, svn_repos_t *repos, svn_revnum_t rev, const char *author, apr_pool_t *pool)
 Like svn_fs_begin_txn(), but use author to set the corresponding property on transaction *txn_p. More...
 
svn_error_tsvn_repos_fs_lock (svn_lock_t **lock, svn_repos_t *repos, const char *path, const char *token, const char *comment, svn_boolean_t is_dav_comment, apr_time_t expiration_date, svn_revnum_t current_rev, svn_boolean_t steal_lock, apr_pool_t *pool)
 Like svn_fs_lock(), but invoke the repos's pre- and post-lock hooks before and after the locking action. More...
 
svn_error_tsvn_repos_fs_unlock (svn_repos_t *repos, const char *path, const char *token, svn_boolean_t break_lock, apr_pool_t *pool)
 Like svn_fs_unlock(), but invoke the repos's pre- and post-unlock hooks before and after the unlocking action. More...
 
svn_error_tsvn_repos_fs_get_locks2 (apr_hash_t **locks, svn_repos_t *repos, const char *path, svn_depth_t depth, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool)
 Look up all the locks in and under path in repos, setting *locks to a hash which maps const char * paths to the svn_lock_t locks associated with those paths. More...
 
svn_error_tsvn_repos_fs_get_locks (apr_hash_t **locks, svn_repos_t *repos, const char *path, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool)
 Similar to svn_repos_fs_get_locks2(), but with depth always passed as svn_depth_infinity. More...
 
svn_error_tsvn_repos_fs_change_rev_prop4 (svn_repos_t *repos, svn_revnum_t rev, const char *author, const char *name, const svn_string_t *const *old_value_p, const svn_string_t *new_value, svn_boolean_t use_pre_revprop_change_hook, svn_boolean_t use_post_revprop_change_hook, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool)
 Like svn_fs_change_rev_prop2(), but validate the name and value of the property and invoke the repos's pre- and post-revprop-change hooks around the change as specified by use_pre_revprop_change_hook and use_post_revprop_change_hook (respectively). More...
 
svn_error_tsvn_repos_fs_change_rev_prop3 (svn_repos_t *repos, svn_revnum_t rev, const char *author, const char *name, const svn_string_t *new_value, svn_boolean_t use_pre_revprop_change_hook, svn_boolean_t use_post_revprop_change_hook, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool)
 Similar to svn_repos_fs_change_rev_prop4(), but with old_value_p always set to NULL. More...
 
svn_error_tsvn_repos_fs_change_rev_prop2 (svn_repos_t *repos, svn_revnum_t rev, const char *author, const char *name, const svn_string_t *new_value, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool)
 Similar to svn_repos_fs_change_rev_prop3(), but with the use_pre_revprop_change_hook and use_post_revprop_change_hook always set to TRUE. More...
 
svn_error_tsvn_repos_fs_change_rev_prop (svn_repos_t *repos, svn_revnum_t rev, const char *author, const char *name, const svn_string_t *new_value, apr_pool_t *pool)
 Similar to svn_repos_fs_change_rev_prop2(), but with the authz_read_func parameter always NULL. More...
 
svn_error_tsvn_repos_fs_revision_prop (svn_string_t **value_p, svn_repos_t *repos, svn_revnum_t rev, const char *propname, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool)
 Set *value_p to the value of the property named propname on revision rev in the filesystem opened in repos. More...
 
svn_error_tsvn_repos_fs_revision_proplist (apr_hash_t **table_p, svn_repos_t *repos, svn_revnum_t rev, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool)
 Set *table_p to the entire property list of revision rev in filesystem opened in repos, as a hash table allocated in pool. More...
 
svn_error_tsvn_repos_fs_change_node_prop (svn_fs_root_t *root, const char *path, const char *name, const svn_string_t *value, apr_pool_t *pool)
 Validating wrapper for svn_fs_change_node_prop() (which see for argument descriptions). More...
 
svn_error_tsvn_repos_fs_change_txn_prop (svn_fs_txn_t *txn, const char *name, const svn_string_t *value, apr_pool_t *pool)
 Validating wrapper for svn_fs_change_txn_prop() (which see for argument descriptions). More...
 
svn_error_tsvn_repos_fs_change_txn_props (svn_fs_txn_t *txn, const apr_array_header_t *props, apr_pool_t *pool)
 Validating wrapper for svn_fs_change_txn_props() (which see for argument descriptions). More...
 
svn_error_tsvn_repos_node_editor (const svn_delta_editor_t **editor, void **edit_baton, svn_repos_t *repos, svn_fs_root_t *base_root, svn_fs_root_t *root, apr_pool_t *node_pool, apr_pool_t *pool)
 Set *editor and *edit_baton to an editor that, when driven by a driver such as svn_repos_replay2(), builds an svn_repos_node_t * tree representing the delta from base_root to root in repos's filesystem. More...
 
svn_repos_node_tsvn_repos_node_from_baton (void *edit_baton)
 Return the root node of the linked-list tree generated by driving the editor (associated with edit_baton) created by svn_repos_node_editor(). More...
 
svn_error_tsvn_repos_verify_fs2 (svn_repos_t *repos, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_repos_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel, void *cancel_baton, apr_pool_t *scratch_pool)
 Verify the contents of the file system in repos. More...
 
svn_error_tsvn_repos_verify_fs (svn_repos_t *repos, svn_stream_t *feedback_stream, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Similar to svn_repos_verify_fs2(), but with a feedback_stream instead of handling feedback via the notify_func handler. More...
 
svn_error_tsvn_repos_dump_fs3 (svn_repos_t *repos, svn_stream_t *dumpstream, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_boolean_t incremental, svn_boolean_t use_deltas, svn_repos_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *scratch_pool)
 Dump the contents of the filesystem within already-open repos into writable dumpstream. More...
 
svn_error_tsvn_repos_dump_fs2 (svn_repos_t *repos, svn_stream_t *dumpstream, svn_stream_t *feedback_stream, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_boolean_t incremental, svn_boolean_t use_deltas, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Similar to svn_repos_dump_fs3(), but with a feedback_stream instead of handling feedback via the notify_func handler. More...
 
svn_error_tsvn_repos_dump_fs (svn_repos_t *repos, svn_stream_t *dumpstream, svn_stream_t *feedback_stream, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_boolean_t incremental, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Similar to svn_repos_dump_fs2(), but with the use_deltas parameter always set to FALSE. More...
 
svn_error_tsvn_repos_load_fs4 (svn_repos_t *repos, svn_stream_t *dumpstream, svn_revnum_t start_rev, svn_revnum_t end_rev, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_boolean_t use_pre_commit_hook, svn_boolean_t use_post_commit_hook, svn_boolean_t validate_props, svn_repos_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Read and parse dumpfile-formatted dumpstream, reconstructing filesystem revisions in already-open repos, handling uuids in accordance with uuid_action. More...
 
svn_error_tsvn_repos_load_fs3 (svn_repos_t *repos, svn_stream_t *dumpstream, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_boolean_t use_pre_commit_hook, svn_boolean_t use_post_commit_hook, svn_boolean_t validate_props, svn_repos_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Similar to svn_repos_load_fs4(), but with start_rev and end_rev always passed as SVN_INVALID_REVNUM. More...
 
svn_error_tsvn_repos_load_fs2 (svn_repos_t *repos, svn_stream_t *dumpstream, svn_stream_t *feedback_stream, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_boolean_t use_pre_commit_hook, svn_boolean_t use_post_commit_hook, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Similar to svn_repos_load_fs3(), but with feedback_stream in place of the svn_repos_notify_func_t and baton and with validate_props always FALSE. More...
 
svn_error_tsvn_repos_load_fs (svn_repos_t *repos, svn_stream_t *dumpstream, svn_stream_t *feedback_stream, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Similar to svn_repos_load_fs2(), but with use_pre_commit_hook and use_post_commit_hook always FALSE. More...
 
svn_error_tsvn_repos_parse_dumpstream3 (svn_stream_t *stream, const svn_repos_parse_fns3_t *parse_fns, void *parse_baton, svn_boolean_t deltas_are_text, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Read and parse dumpfile-formatted stream, calling callbacks in parse_fns/parse_baton, and using pool for allocations. More...
 
svn_error_tsvn_repos_get_fs_build_parser4 (const svn_repos_parse_fns3_t **parser, void **parse_baton, svn_repos_t *repos, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_boolean_t use_history, svn_boolean_t validate_props, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_repos_notify_func_t notify_func, void *notify_baton, apr_pool_t *pool)
 Set *parser and *parse_baton to a vtable parser which commits new revisions to the fs in repos. More...
 
svn_error_tsvn_repos_parse_dumpstream2 (svn_stream_t *stream, const svn_repos_parser_fns2_t *parse_fns, void *parse_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Similar to svn_repos_parse_dumpstream3(), but uses the more limited svn_repos_parser_fns2_t vtable type. More...
 
svn_error_tsvn_repos_parse_dumpstream (svn_stream_t *stream, const svn_repos_parser_fns_t *parse_fns, void *parse_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Similar to svn_repos_parse_dumpstream2(), but uses the more limited svn_repos_parser_fns_t vtable type. More...
 
svn_error_tsvn_repos_get_fs_build_parser3 (const svn_repos_parse_fns2_t **parser, void **parse_baton, svn_repos_t *repos, svn_boolean_t use_history, svn_boolean_t validate_props, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_repos_notify_func_t notify_func, void *notify_baton, apr_pool_t *pool)
 Similar to svn_repos_get_fs_build_parser4(), but with start_rev and end_rev always passed as SVN_INVALID_REVNUM, and yielding the more limited svn_repos_parse_fns2_t. More...
 
svn_error_tsvn_repos_get_fs_build_parser2 (const svn_repos_parse_fns2_t **parser, void **parse_baton, svn_repos_t *repos, svn_boolean_t use_history, enum svn_repos_load_uuid uuid_action, svn_stream_t *outstream, const char *parent_dir, apr_pool_t *pool)
 Similar to svn_repos_get_fs_build_parser3(), but with outstream in place if a svn_repos_notify_func_t and baton and with validate_props always FALSE. More...
 
svn_error_tsvn_repos_get_fs_build_parser (const svn_repos_parser_fns_t **parser, void **parse_baton, svn_repos_t *repos, svn_boolean_t use_history, enum svn_repos_load_uuid uuid_action, svn_stream_t *outstream, const char *parent_dir, apr_pool_t *pool)
 Similar to svn_repos_get_fs_build_parser2(), but yields the more limited svn_repos_parser_fns_t vtable type. More...
 
svn_error_tsvn_repos_authz_read2 (svn_authz_t **authz_p, const char *path, const char *groups_path, svn_boolean_t must_exist, apr_pool_t *pool)
 Read authz configuration data from path (a dirent, an absolute file url or a registry path) into *authz_p, allocated in pool. More...
 
svn_error_tsvn_repos_authz_read (svn_authz_t **authz_p, const char *file, svn_boolean_t must_exist, apr_pool_t *pool)
 Similar to svn_repos_authz_read2(), but with groups_path and repos_root always passed as NULL. More...
 
svn_error_tsvn_repos_authz_parse (svn_authz_t **authz_p, svn_stream_t *stream, svn_stream_t *groups_stream, apr_pool_t *pool)
 Read authz configuration data from stream into *authz_p, allocated in pool. More...
 
svn_error_tsvn_repos_authz_check_access (svn_authz_t *authz, const char *repos_name, const char *path, const char *user, svn_repos_authz_access_t required_access, svn_boolean_t *access_granted, apr_pool_t *pool)
 Check whether user can access path in the repository repos_name with the required_access. More...
 
svn_error_tsvn_repos_check_revision_access (svn_repos_revision_access_level_t *access_level, svn_repos_t *repos, svn_revnum_t revision, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *pool)
 Set access to the access level granted for revision in repos, as determined by consulting the authz_read_func callback function and its associated authz_read_baton. More...
 
svn_error_tsvn_repos_fs_get_inherited_props (apr_array_header_t **inherited_props, svn_fs_root_t *root, const char *path, const char *propname, svn_repos_authz_func_t authz_read_func, void *authz_read_baton, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Set *inherited_values to a depth-first ordered array of svn_prop_inherited_item_t * structures (the path_or_url members of which are relative filesystem paths) representing the properties inherited by path in root. More...
 
svn_error_tsvn_repos_remember_client_capabilities (svn_repos_t *repos, const apr_array_header_t *capabilities)
 Capabilities. More...
 

Detailed Description

Tools built on top of the filesystem.

Definition in file svn_repos.h.

Macro Definition Documentation

#define SVN_REPOS_CAPABILITY_MERGEINFO   "mergeinfo"

The capability of doing the right thing with merge-tracking information, both storing it and responding to queries about it.

Since
New in 1.5.

Definition at line 507 of file svn_repos.h.

Typedef Documentation

typedef struct svn_authz_t svn_authz_t

A data type which stores the authz information.

Since
New in 1.3.

Definition at line 3174 of file svn_repos.h.

An enum defining the kinds of access authz looks up.

Since
New in 1.3.
typedef svn_error_t*(* svn_repos_authz_callback_t)(svn_repos_authz_access_t required, svn_boolean_t *allowed, svn_fs_root_t *root, const char *path, void *baton, apr_pool_t *pool)

Callback type for checking authorization on paths produced by the repository commit editor.

Set *allowed to TRUE to indicate that the required access on path in root is authorized, or set it to FALSE to indicate unauthorized (presumable according to state stored in baton).

If path is NULL, the callback should perform a global authz lookup for the required access. That is, the lookup should check if the required access is granted for at least one path of the repository, and set *allowed to TRUE if so. root may also be NULL if path is NULL.

This callback is very similar to svn_repos_authz_func_t, with the exception of the addition of the required parameter. This is due to historical reasons: when authz was first implemented for svn_repos_dir_delta2(), it seemed there would need only checks for read and write operations, hence the svn_repos_authz_func_t callback prototype and usage scenario. But it was then realized that lookups due to copying needed to be recursive, and that brute-force recursive lookups didn't square with the O(1) performances a copy operation should have.

So a special way to ask for a recursive lookup was introduced. The commit editor needs this capability to retain acceptable performance. Instead of revving the existing callback, causing unnecessary revving of functions that don't actually need the extended functionality, this second, more complete callback was introduced, for use by the commit editor.

Some day, it would be nice to reunite these two callbacks and do the necessary revving anyway, but for the time being, this dual callback mechanism will do.

Definition at line 163 of file svn_repos.h.

typedef svn_error_t*(* svn_repos_authz_func_t)(svn_boolean_t *allowed, svn_fs_root_t *root, const char *path, void *baton, apr_pool_t *pool)

Callback type for checking authorization on paths produced by (at least) svn_repos_dir_delta2().

Set *allowed to TRUE to indicate that some operation is authorized for path in root, or set it to FALSE to indicate unauthorized (presumably according to state stored in baton).

Do not assume pool has any lifetime beyond this call.

The exact operation being authorized depends on the callback implementation. For read authorization, for example, the caller would implement an instance that does read checking, and pass it as a parameter named [perhaps] 'authz_read_func'. The receiver of that parameter might also take another parameter named 'authz_write_func', which although sharing this type, would be a different implementation.

Note
If someday we want more sophisticated authorization states than just yes/no, allowed can become an enum type.

Definition at line 101 of file svn_repos.h.

typedef svn_error_t*(* svn_repos_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)

Similar to svn_file_rev_handler_t, but without the result_of_merge parameter.

Deprecated:
Provided for backward compatibility with 1.4 API.
Since
New in 1.1.

Definition at line 178 of file svn_repos.h.

typedef svn_error_t*(* svn_repos_freeze_func_t)(void *baton, apr_pool_t *pool)

Callback for svn_repos_freeze.

Since
New in 1.8.

Definition at line 675 of file svn_repos.h.

typedef svn_error_t*(* svn_repos_history_func_t)(void *baton, const char *path, svn_revnum_t revision, apr_pool_t *pool)

Callback type for use with svn_repos_history().

path and revision represent interesting history locations in the lifetime of the path passed to svn_repos_history(). baton is the same baton given to svn_repos_history(). pool is provided for the convenience of the implementor, who should not expect it to live longer than a single callback call.

Signal to callback driver to stop processing/invoking this callback by returning the SVN_ERR_CEASE_INVOCATION error code.

Note
SVN_ERR_CEASE_INVOCATION is new in 1.5.

Definition at line 1585 of file svn_repos.h.

The type of action occurring.

Since
New in 1.7.
typedef void(* svn_repos_notify_func_t)(void *baton, const svn_repos_notify_t *notify, apr_pool_t *scratch_pool)

Callback for providing notification from the repository.

Returns void. Justification: success of an operation is not dependent upon successful notification of that operation.

Since
New in 1.7.

Definition at line 336 of file svn_repos.h.

Structure used by svn_repos_notify_func_t.

The only field guaranteed to be populated is action. Other fields are dependent upon the action. (See individual fields for more information.)

Note
Callers of notification functions should use svn_repos_notify_create() to create structures of this type to allow for future extensibility.
Since
New in 1.7.

The type of error occurring.

Since
New in 1.7.

Revision Access Levels.

Like most version control systems, access to versioned objects in Subversion is determined on primarily path-based system. Users either do or don't have the ability to read a given path.

However, unlike many version control systems where versioned objects maintain their own distinct version information (revision numbers, authors, log messages, change timestamps, etc.), Subversion binds multiple paths changed as part of a single commit operation into a set, calls the whole thing a revision, and hangs commit metadata (author, date, log message, etc.) off of that revision. So, commit metadata is shared across all the paths changed as part of a given commit operation.

It is common (or, at least, we hope it is) for log messages to give detailed information about changes made in the commit to which the log message is attached. Such information might include a mention of all the files changed, what was changed in them, and so on. But this causes a problem when presenting information to readers who aren't authorized to read every path in the repository. Simply knowing that a given path exists may be a security leak, even if the user can't see the contents of the data located at that path.

So Subversion does what it reasonably can to prevent the leak of this information, and does so via a staged revision access policy. A reader can be said to have one of three levels of access to a given revision's metadata, based solely on the reader's access rights to the paths changed or copied in that revision:

'full access' – Granted when the reader has access to all paths changed or copied in the revision, or when no paths were changed in the revision at all, this access level permits full visibility of all revision property names and values, and the full changed-paths information.

'no access' – Granted when the reader does not have access to any paths changed or copied in the revision, this access level denies the reader access to all revision properties and all changed-paths information.

'partial access' – Granted when the reader has access to at least one, but not all, of the paths changed or copied in the revision, this access level permits visibility of the svn:date and svn:author revision properties and only the paths of the changed-paths information to which the reader has access. An enum defining levels of revision access.

Since
New in 1.5.
typedef struct svn_repos_t svn_repos_t

The repository object.

Definition at line 352 of file svn_repos.h.

Enumeration Type Documentation

The different "actions" attached to nodes in the dumpfile.

Definition at line 61 of file svn_repos.h.

An enum defining the kinds of access authz looks up.

Since
New in 1.3.
Enumerator
svn_authz_none 

No access.

svn_authz_read 

Path can be read.

svn_authz_write 

Path can be altered.

svn_authz_recursive 

The other access credentials are recursive.

Definition at line 112 of file svn_repos.h.

The different policies for processing the UUID in the dumpfile.

Enumerator
svn_repos_load_uuid_default 

only update uuid if the repos has no revisions.

svn_repos_load_uuid_ignore 

never update uuid.

svn_repos_load_uuid_force 

always update uuid.

Definition at line 70 of file svn_repos.h.

The type of action occurring.

Since
New in 1.7.
Enumerator
svn_repos_notify_warning 

A warning message is waiting.

svn_repos_notify_dump_rev_end 

A revision has finished being dumped.

svn_repos_notify_verify_rev_end 

A revision has finished being verified.

svn_repos_notify_dump_end 

All revisions have finished being dumped.

svn_repos_notify_verify_end 

All revisions have finished being verified.

svn_repos_notify_pack_shard_start 

packing of an FSFS shard has commenced

svn_repos_notify_pack_shard_end 

packing of an FSFS shard is completed

svn_repos_notify_pack_shard_start_revprop 

packing of the shard revprops has commenced

svn_repos_notify_pack_shard_end_revprop 

packing of the shard revprops has completed

svn_repos_notify_load_txn_start 

A revision has begun loading.

svn_repos_notify_load_txn_committed 

A revision has finished loading.

svn_repos_notify_load_node_start 

A node has begun loading.

svn_repos_notify_load_node_done 

A node has finished loading.

svn_repos_notify_load_copied_node 

A copied node has been encountered.

svn_repos_notify_load_normalized_mergeinfo 

Mergeinfo has been normalized.

svn_repos_notify_mutex_acquired 

The operation has acquired a mutex for the repo.

svn_repos_notify_recover_start 

Recover has started.

svn_repos_notify_upgrade_start 

Upgrade has started.

svn_repos_notify_load_skipped_rev 

A revision was skipped during loading.

Since
New in 1.8.
svn_repos_notify_verify_rev_structure 

The structure of a revision is being verified.

Since
New in 1.8.

Definition at line 194 of file svn_repos.h.

The type of error occurring.

Since
New in 1.7.
Enumerator
svn_repos_notify_warning_found_old_reference 

Referencing copy source data from a revision earlier than the first revision dumped.

svn_repos_notify_warning_found_old_mergeinfo 

An SVN_PROP_MERGEINFO property's encoded mergeinfo references a revision earlier than the first revision dumped.

svn_repos_notify_warning_invalid_fspath 

Found an invalid path in the filesystem.

See Also
svn_fs.h:"Directory entry names and directory paths"

Definition at line 262 of file svn_repos.h.

Revision Access Levels.

Like most version control systems, access to versioned objects in Subversion is determined on primarily path-based system. Users either do or don't have the ability to read a given path.

However, unlike many version control systems where versioned objects maintain their own distinct version information (revision numbers, authors, log messages, change timestamps, etc.), Subversion binds multiple paths changed as part of a single commit operation into a set, calls the whole thing a revision, and hangs commit metadata (author, date, log message, etc.) off of that revision. So, commit metadata is shared across all the paths changed as part of a given commit operation.

It is common (or, at least, we hope it is) for log messages to give detailed information about changes made in the commit to which the log message is attached. Such information might include a mention of all the files changed, what was changed in them, and so on. But this causes a problem when presenting information to readers who aren't authorized to read every path in the repository. Simply knowing that a given path exists may be a security leak, even if the user can't see the contents of the data located at that path.

So Subversion does what it reasonably can to prevent the leak of this information, and does so via a staged revision access policy. A reader can be said to have one of three levels of access to a given revision's metadata, based solely on the reader's access rights to the paths changed or copied in that revision:

'full access' – Granted when the reader has access to all paths changed or copied in the revision, or when no paths were changed in the revision at all, this access level permits full visibility of all revision property names and values, and the full changed-paths information.

'no access' – Granted when the reader does not have access to any paths changed or copied in the revision, this access level denies the reader access to all revision properties and all changed-paths information.

'partial access' – Granted when the reader has access to at least one, but not all, of the paths changed or copied in the revision, this access level permits visibility of the svn:date and svn:author revision properties and only the paths of the changed-paths information to which the reader has access. An enum defining levels of revision access.

Since
New in 1.5.
Enumerator
svn_repos_revision_access_none 

no access allowed to the revision properties and all changed-paths information.

svn_repos_revision_access_partial 

access granted to some (svn:date and svn:author) revision properties and changed-paths information on paths the read has access to.

svn_repos_revision_access_full 

access granted to all revision properites and changed-paths information.

Definition at line 3312 of file svn_repos.h.

Function Documentation

svn_error_t* svn_repos_abort_report ( void *  report_baton,
apr_pool_t *  pool 
)

Given a report_baton constructed by svn_repos_begin_report3(), abort the report.

This function can be called anytime before svn_repos_finish_report() is called.

After the call to this function, report_baton is no longer valid; it should not be passed to any other reporting functions.

svn_error_t* svn_repos_authz_check_access ( svn_authz_t authz,
const char *  repos_name,
const char *  path,
const char *  user,
svn_repos_authz_access_t  required_access,
svn_boolean_t access_granted,
apr_pool_t *  pool 
)

Check whether user can access path in the repository repos_name with the required_access.

authz lists the ACLs to check against. Set *access_granted to indicate if the requested access is granted.

If path is NULL, then check whether user has the required_access anywhere in the repository. Set *access_granted to TRUE if at least one path is accessible with the required_access.

For compatibility with 1.6, and earlier, repos_name can be NULL in which case it is equivalent to a repos_name of "".

Note
Presently, repos_name must byte-for-byte match the repos_name specified in the authz file; it is treated as an opaque string, and not as a dirent.
Since
New in 1.3.
svn_error_t* svn_repos_authz_parse ( svn_authz_t **  authz_p,
svn_stream_t stream,
svn_stream_t groups_stream,
apr_pool_t *  pool 
)

Read authz configuration data from stream into *authz_p, allocated in pool.

If groups_stream is set, use the global groups parsed from it.

Since
New in 1.8.
svn_error_t* svn_repos_authz_read ( svn_authz_t **  authz_p,
const char *  file,
svn_boolean_t  must_exist,
apr_pool_t *  pool 
)

Similar to svn_repos_authz_read2(), but with groups_path and repos_root always passed as NULL.

Since
New in 1.3.
Deprecated:
Provided for backward compatibility with the 1.7 API.
svn_error_t* svn_repos_authz_read2 ( svn_authz_t **  authz_p,
const char *  path,
const char *  groups_path,
svn_boolean_t  must_exist,
apr_pool_t *  pool 
)

Read authz configuration data from path (a dirent, an absolute file url or a registry path) into *authz_p, allocated in pool.

If groups_path (a dirent, an absolute file url, or a registry path) is set, use the global groups parsed from it.

If path or groups_path is not a valid authz rule file, then return SVN_ERR_AUTHZ_INVALID_CONFIG. The contents of *authz_p is then undefined. If must_exist is TRUE, a missing authz or groups file is also an error other than SVN_ERR_AUTHZ_INVALID_CONFIG (exact error depends on the access type).

Since
New in 1.8.
svn_error_t* svn_repos_begin_report ( void **  report_baton,
svn_revnum_t  revnum,
const char *  username,
svn_repos_t repos,
const char *  fs_base,
const char *  target,
const char *  tgt_path,
svn_boolean_t  text_deltas,
svn_boolean_t  recurse,
svn_boolean_t  ignore_ancestry,
const svn_delta_editor_t editor,
void *  edit_baton,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
apr_pool_t *  pool 
)

The same as svn_repos_begin_report2(), but taking a boolean recurse flag, and sending FALSE for send_copyfrom_args.

If recurse is TRUE, the editor driver will drive the editor with a depth of svn_depth_infinity; if FALSE, then with a depth of svn_depth_files.

Note
username is ignored, and has been removed in a revised version of this API.
Deprecated:
Provided for backward compatibility with the 1.4 API.
svn_error_t* svn_repos_begin_report2 ( void **  report_baton,
svn_revnum_t  revnum,
svn_repos_t repos,
const char *  fs_base,
const char *  target,
const char *  tgt_path,
svn_boolean_t  text_deltas,
svn_depth_t  depth,
svn_boolean_t  ignore_ancestry,
svn_boolean_t  send_copyfrom_args,
const svn_delta_editor_t editor,
void *  edit_baton,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
apr_pool_t *  pool 
)

The same as svn_repos_begin_report3(), but with zero_copy_limit always passed as 0.

Since
New in 1.5.
Deprecated:
Provided for backward compatibility with the 1.7 API.
svn_error_t* svn_repos_begin_report3 ( void **  report_baton,
svn_revnum_t  revnum,
svn_repos_t repos,
const char *  fs_base,
const char *  target,
const char *  tgt_path,
svn_boolean_t  text_deltas,
svn_depth_t  depth,
svn_boolean_t  ignore_ancestry,
svn_boolean_t  send_copyfrom_args,
const svn_delta_editor_t editor,
void *  edit_baton,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
apr_size_t  zero_copy_limit,
apr_pool_t *  pool 
)

Construct and return a report_baton that will be passed to the other functions in this section to describe the state of a pre-existing tree (typically, a working copy).

When the report is finished, editor/edit_baton will be driven in such a way as to transform the existing tree to revnum and, if tgt_path is non-NULL, switch the reported hierarchy to tgt_path.

fs_base is the absolute path of the node in the filesystem at which the comparison should be rooted. target is a single path component, used to limit the scope of the report to a single entry of fs_base, or "" if all of fs_base itself is the main subject of the report.

tgt_path and revnum is the fs path/revision pair that is the "target" of the delta. tgt_path should be provided only when the source and target paths of the report differ. That is, tgt_path should only be specified when specifying that the resultant editor drive be one that transforms the reported hierarchy into a pristine tree of tgt_path at revision revnum. A NULL value for tgt_path will indicate that the editor should be driven in such a way as to transform the reported hierarchy to revision revnum, preserving the reported hierarchy.

text_deltas instructs the driver of the editor to enable the generation of text deltas.

ignore_ancestry instructs the driver to ignore node ancestry when determining how to transmit differences.

send_copyfrom_args instructs the driver to send 'copyfrom' arguments to the editor's add_file() and add_directory() methods, whenever it deems feasible.

Use authz_read_func and authz_read_baton (if not NULL) to avoid sending data through editor/edit_baton which is not authorized for transmission.

zero_copy_limit controls the maximum size (in bytes) at which data blocks may be sent using the zero-copy code path. On that path, a number of in-memory copy operations have been eliminated to maximize throughput. However, until the whole block has been pushed to the network stack, other clients block, so be careful when using larger values here. Pass 0 for zero_copy_limit to disable this optimization altogether.

note Never activate this optimization if editor might access any FSFS data structures (and, hence, caches). So, it is basically safe for networked editors only.

All allocation for the context and collected state will occur in pool.

depth is the requested depth of the editor drive.

If depth is svn_depth_unknown, the editor will affect only the paths reported by the individual calls to svn_repos_set_path3() and svn_repos_link_path3().

For example, if the reported tree is the A subdir of the Greek Tree (see Subversion's test suite), at depth svn_depth_empty, but the A/B subdir is reported at depth svn_depth_infinity, then repository-side changes to A/mu, or underneath A/C and A/D, would not be reflected in the editor drive, but changes underneath A/B would be.

Additionally, the editor driver will call add_directory and and add_file for directories with an appropriate depth. For example, a directory reported at svn_depth_files will receive file (but not directory) additions. A directory at svn_depth_empty will receive neither.

If depth is svn_depth_files, svn_depth_immediates or svn_depth_infinity and depth is greater than the reported depth of the working copy, then the editor driver will emit editor operations so as to upgrade the working copy to this depth.

If depth is svn_depth_empty, svn_depth_files, svn_depth_immediates and depth is lower than or equal to the depth of the working copy, then the editor operations will affect only paths at or above depth.

Since
New in 1.8.
svn_error_t* svn_repos_check_revision_access ( svn_repos_revision_access_level_t access_level,
svn_repos_t repos,
svn_revnum_t  revision,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
apr_pool_t *  pool 
)

Set access to the access level granted for revision in repos, as determined by consulting the authz_read_func callback function and its associated authz_read_baton.

authz_read_func may be NULL, in which case access will be set to svn_repos_revision_access_full.

Since
New in 1.5.
const char* svn_repos_conf_dir ( svn_repos_t repos,
apr_pool_t *  pool 
)

Return path to repos's config directory, allocated in pool.

svn_error_t* svn_repos_create ( svn_repos_t **  repos_p,
const char *  path,
const char *  unused_1,
const char *  unused_2,
apr_hash_t *  config,
apr_hash_t *  fs_config,
apr_pool_t *  pool 
)

Create a new Subversion repository at path, building the necessary directory structure, creating the filesystem, and so on.

Return the repository object in *repos_p, allocated in pool.

config is a client configuration hash of svn_config_t * items keyed on config category names, and may be NULL.

fs_config is passed to the filesystem, and may be NULL.

unused_1 and unused_2 are not used and should be NULL.

const char* svn_repos_db_lockfile ( svn_repos_t repos,
apr_pool_t *  pool 
)

Return path to repos's db lockfile, allocated in pool.

svn_error_t* svn_repos_db_logfiles ( apr_array_header_t **  logfiles,
const char *  path,
svn_boolean_t  only_unused,
apr_pool_t *  pool 
)

This function is a wrapper around svn_fs_berkeley_logfiles(), returning log file paths relative to the root of the repository.

Set *logfiles to an array of const char * log file names of Berkeley DB-based Subversion filesystem. If only_unused is TRUE, set *logfiles to an array which contains only the names of Berkeley DB log files no longer in use by the filesystem. Otherwise, all log files (used and unused) are returned.

This function wraps the Berkeley DB 'log_archive' function called by the db_archive binary. Repository administrators may want to run this function periodically and delete the unused log files, as a way of reclaiming disk space.

const char* svn_repos_db_logs_lockfile ( svn_repos_t repos,
apr_pool_t *  pool 
)

Return path to repos's db logs lockfile, allocated in pool.

svn_error_t* svn_repos_delete_path ( void *  report_baton,
const char *  path,
apr_pool_t *  pool 
)

Given a report_baton constructed by svn_repos_begin_report3(), record the non-existence of path in the current tree.

path may not be underneath a path on which svn_repos_set_path3() was previously called with svn_depth_exclude in this report.

(This allows the reporter's driver to describe missing pieces of a working copy, so that 'svn up' can recreate them.)

All temporary allocations are done in pool.

svn_error_t* svn_repos_deleted_rev ( svn_fs_t fs,
const char *  path,
svn_revnum_t  start,
svn_revnum_t  end,
svn_revnum_t deleted,
apr_pool_t *  pool 
)

Given path which exists at revision start in fs, set *deleted to the revision path was first deleted, within the inclusive revision range bounded by start and end.

If path does not exist at revision start or was not deleted within the specified range, then set *deleted to SVN_INVALID_REVNUM. Use pool for memory allocation.

Since
New in 1.5.
svn_error_t* svn_repos_dir_delta ( svn_fs_root_t src_root,
const char *  src_parent_dir,
const char *  src_entry,
svn_fs_root_t tgt_root,
const char *  tgt_path,
const svn_delta_editor_t editor,
void *  edit_baton,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
svn_boolean_t  text_deltas,
svn_boolean_t  recurse,
svn_boolean_t  entry_props,
svn_boolean_t  ignore_ancestry,
apr_pool_t *  pool 
)

Similar to svn_repos_dir_delta2(), but if recurse is TRUE, pass svn_depth_infinity for depth, and if recurse is FALSE, pass svn_depth_files for depth.

Deprecated:
Provided for backward compatibility with the 1.4 API.
svn_error_t* svn_repos_dir_delta2 ( svn_fs_root_t src_root,
const char *  src_parent_dir,
const char *  src_entry,
svn_fs_root_t tgt_root,
const char *  tgt_path,
const svn_delta_editor_t editor,
void *  edit_baton,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
svn_boolean_t  text_deltas,
svn_depth_t  depth,
svn_boolean_t  entry_props,
svn_boolean_t  ignore_ancestry,
apr_pool_t *  pool 
)

Use the provided editor and edit_baton to describe the changes necessary for making a given node (and its descendants, if it is a directory) under src_root look exactly like tgt_path under tgt_root.

src_entry is the node to update. If src_entry is empty, then compute the difference between the entire tree anchored at src_parent_dir under src_root and tgt_path under tgt_root. Else, describe the changes needed to update only that entry in src_parent_dir. Typically, callers of this function will use a tgt_path that is the concatenation of src_parent_dir and src_entry.

src_root and tgt_root can both be either revision or transaction roots. If tgt_root is a revision, editor's set_target_revision() will be called with the tgt_root's revision number, else it will not be called at all.

If authz_read_func is non-NULL, invoke it before any call to

editor->open_root editor->add_directory editor->open_directory editor->add_file editor->open_file

passing tgt_root, the same path that would be passed to the editor function in question, and authz_read_baton. If the *allowed parameter comes back TRUE, then proceed with the planned editor call; else if FALSE, then invoke editor->absent_file or editor->absent_directory as appropriate, except if the planned editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.

If text_deltas is FALSE, send a single NULL txdelta window to the window handler returned by editor->apply_textdelta().

If depth is svn_depth_empty, invoke editor calls only on src_entry (or src_parent_dir, if src_entry is empty). If depth is svn_depth_files, also invoke the editor on file children, if any; if svn_depth_immediates, invoke it on immediate subdirectories as well as files; if svn_depth_infinity, recurse fully.

If entry_props is TRUE, accompany each opened/added entry with propchange editor calls that relay special "entry props" (this is typically used only for working copy updates).

ignore_ancestry instructs the function to ignore node ancestry when determining how to transmit differences.

Before completing successfully, this function calls editor's close_edit(), so the caller should expect its edit_baton to be invalid after its use with this function.

Do any allocation necessary for the delta computation in pool. This function's maximum memory consumption is at most roughly proportional to the greatest depth of the tree under tgt_root, not the total size of the delta.

svn_repos_dir_delta2 is mostly superseded by the reporter

functionality (svn_repos_begin_report3 and friends).

svn_repos_dir_delta2 does allow the roots to be transaction

roots rather than just revision roots, and it has the

entry_props flag. Almost all of Subversion's own code uses the

reporter instead; there are some stray references to the

svn_repos_dir_delta[2] in comments which should probably

actually refer to the reporter.

Since
New in 1.5.
const char* svn_repos_find_root_path ( const char *  path,
apr_pool_t *  pool 
)

Find the root path of the repository that contains path.

If a repository was found, the path to the root of the repository is returned, else NULL. The pointer to the returned path may be equal to path.

svn_error_t* svn_repos_finish_report ( void *  report_baton,
apr_pool_t *  pool 
)

Given a report_baton constructed by svn_repos_begin_report3(), finish the report and drive the editor as specified when the report baton was constructed.

If an error occurs during the driving of the editor, do NOT abort the edit; that responsibility belongs to the caller of this function, if it happens at all.

After the call to this function, report_baton is no longer valid; it should not be passed to any other reporting functions, including svn_repos_abort_report(), even if this function returns an error.

svn_error_t* svn_repos_freeze ( apr_array_header_t *  paths,
svn_repos_freeze_func_t  freeze_func,
void *  freeze_baton,
apr_pool_t *  pool 
)

Take an exclusive lock on each of the repositories in paths to prevent commits and then while holding all the locks invoke freeze_func passing freeze_baton.

Each repository may be readable by Subversion while frozen, or may be unreadable, depending on which FS backend the repository uses. Repositories are locked in the order in which they are specified in the array.

Note
On some platforms the exclusive lock does not exclude other threads in the same process so this function should only be called by a single threaded process, or by a multi-threaded process when no other threads are accessing the repositories.
Since
New in 1.8.
svn_fs_t* svn_repos_fs ( svn_repos_t repos)

Return the filesystem associated with repository object repos.

svn_error_t* svn_repos_fs_change_node_prop ( svn_fs_root_t root,
const char *  path,
const char *  name,
const svn_string_t value,
apr_pool_t *  pool 
)

Validating wrapper for svn_fs_change_node_prop() (which see for argument descriptions).

If name's kind is not svn_prop_regular_kind, return SVN_ERR_REPOS_BAD_ARGS. If name is an "svn:" property, validate its value and return SVN_ERR_BAD_PROPERTY_VALUE if it is invalid for the property.

Note
Currently, the only properties validated are the "svn:" properties SVN_PROP_REVISION_LOG and SVN_PROP_REVISION_DATE. This may change in future releases.
svn_error_t* svn_repos_fs_change_rev_prop ( svn_repos_t repos,
svn_revnum_t  rev,
const char *  author,
const char *  name,
const svn_string_t new_value,
apr_pool_t *  pool 
)

Similar to svn_repos_fs_change_rev_prop2(), but with the authz_read_func parameter always NULL.

Deprecated:
Provided for backward compatibility with the 1.0 API.
svn_error_t* svn_repos_fs_change_rev_prop2 ( svn_repos_t repos,
svn_revnum_t  rev,
const char *  author,
const char *  name,
const svn_string_t new_value,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
apr_pool_t *  pool 
)

Similar to svn_repos_fs_change_rev_prop3(), but with the use_pre_revprop_change_hook and use_post_revprop_change_hook always set to TRUE.

Deprecated:
Provided for backward compatibility with the 1.4 API.
svn_error_t* svn_repos_fs_change_rev_prop3 ( svn_repos_t repos,
svn_revnum_t  rev,
const char *  author,
const char *  name,
const svn_string_t new_value,
svn_boolean_t  use_pre_revprop_change_hook,
svn_boolean_t  use_post_revprop_change_hook,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
apr_pool_t *  pool 
)

Similar to svn_repos_fs_change_rev_prop4(), but with old_value_p always set to NULL.

(In other words, it is similar to svn_fs_change_rev_prop().)

Deprecated:
Provided for backward compatibility with the 1.6 API.
Since
New in 1.5.
svn_error_t* svn_repos_fs_change_rev_prop4 ( svn_repos_t repos,
svn_revnum_t  rev,
const char *  author,
const char *  name,
const svn_string_t *const *  old_value_p,
const svn_string_t new_value,
svn_boolean_t  use_pre_revprop_change_hook,
svn_boolean_t  use_post_revprop_change_hook,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
apr_pool_t *  pool 
)

Like svn_fs_change_rev_prop2(), but validate the name and value of the property and invoke the repos's pre- and post-revprop-change hooks around the change as specified by use_pre_revprop_change_hook and use_post_revprop_change_hook (respectively).

rev is the revision whose property to change, name is the name of the property, and new_value is the new value of the property. If old_value_p is not NULL, then *old_value_p is the expected current (preexisting) value of the property (or NULL for "unset"). author is the authenticated username of the person changing the property value, or NULL if not available.

If authz_read_func is non-NULL, then use it (with authz_read_baton) to validate the changed-paths associated with rev. If the revision contains any unreadable changed paths, then return SVN_ERR_AUTHZ_UNREADABLE.

Validate name and new_value like the same way svn_repos_fs_change_node_prop() does.

Use pool for temporary allocations.

Since
New in 1.7.
svn_error_t* svn_repos_fs_change_txn_prop ( svn_fs_txn_t txn,
const char *  name,
const svn_string_t value,
apr_pool_t *  pool 
)

Validating wrapper for svn_fs_change_txn_prop() (which see for argument descriptions).

See svn_repos_fs_change_txn_props() for more information.

svn_error_t* svn_repos_fs_change_txn_props ( svn_fs_txn_t txn,
const apr_array_header_t *  props,
apr_pool_t *  pool 
)

Validating wrapper for svn_fs_change_txn_props() (which see for argument descriptions).

Validate properties and their values the same way svn_repos_fs_change_node_prop() does.

Since
New in 1.5.
svn_error_t* svn_repos_fs_get_inherited_props ( apr_array_header_t **  inherited_props,
svn_fs_root_t root,
const char *  path,
const char *  propname,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Set *inherited_values to a depth-first ordered array of svn_prop_inherited_item_t * structures (the path_or_url members of which are relative filesystem paths) representing the properties inherited by path in root.

If no properties are inherited, then set *inherited_values to an empty array.

if propname is NULL then retrieve all explicit and/or inherited properties. Otherwise retrieve only the properties named propname.

If optional authz_read_func is non-NULL, then use this function (along with optional authz_read_baton) to check the readability of each parent path from which properties are inherited. Silently omit properties for unreadable parent paths.

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

Since
New in 1.8.
svn_error_t* svn_repos_fs_get_mergeinfo ( svn_mergeinfo_catalog_t *  catalog,
svn_repos_t repos,
const apr_array_header_t *  paths,
svn_revnum_t  revision,
svn_mergeinfo_inheritance_t  inherit,
svn_boolean_t  include_descendants,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
apr_pool_t *  pool 
)

Fetch the mergeinfo for paths at revision in repos, and set *catalog to a catalog of this mergeinfo.

*catalog will never be NULL but may be empty.

The paths in paths, and the keys of catalog, start with '/'.

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

If revision is SVN_INVALID_REVNUM, it defaults to youngest.

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

If optional authz_read_func is non-NULL, then use this function (along with optional authz_read_baton) to check the readability of each path which mergeinfo was requested for (from paths). Silently omit unreadable paths from the request for mergeinfo.

Use pool for all allocations.

Since
New in 1.5.
svn_error_t* svn_repos_fs_pack ( svn_repos_t repos,
svn_fs_pack_notify_t  notify_func,
void *  notify_baton,
svn_cancel_func_t  cancel_func,
void *  cancel_baton,
apr_pool_t *  pool 
)

Similar to svn_repos_fs_pack2(), but with a svn_fs_pack_notify_t instead of a svn_repos_notify_t.

Since
New in 1.6.
Deprecated:
Provided for backward compatibility with the 1.6 API.
svn_error_t* svn_repos_fs_pack2 ( svn_repos_t repos,
svn_repos_notify_func_t  notify_func,
void *  notify_baton,
svn_cancel_func_t  cancel_func,
void *  cancel_baton,
apr_pool_t *  pool 
)

Possibly update the repository, repos, to use a more efficient filesystem representation.

Use pool for allocations.

Since
New in 1.7.
svn_error_t* svn_repos_fs_revision_prop ( svn_string_t **  value_p,
svn_repos_t repos,
svn_revnum_t  rev,
const char *  propname,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
apr_pool_t *  pool 
)

Set *value_p to the value of the property named propname on revision rev in the filesystem opened in repos.

If rev has no property by that name, set *value_p to zero. Allocate the result in pool.

If authz_read_func is non-NULL, then use it (with authz_read_baton) to validate the changed-paths associated with rev. If the changed-paths are all unreadable, then set *value_p to zero unconditionally. If only some of the changed-paths are unreadable, then allow 'svn:author' and 'svn:date' propvalues to be fetched, but return 0 for any other property.

Since
New in 1.1.
svn_error_t* svn_repos_fs_revision_proplist ( apr_hash_t **  table_p,
svn_repos_t repos,
svn_revnum_t  rev,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
apr_pool_t *  pool 
)

Set *table_p to the entire property list of revision rev in filesystem opened in repos, as a hash table allocated in pool.

The table maps char * property names to svn_string_t * values; the names and values are allocated in pool.

If authz_read_func is non-NULL, then use it (with authz_read_baton) to validate the changed-paths associated with rev. If the changed-paths are all unreadable, then return an empty hash. If only some of the changed-paths are unreadable, then return an empty hash, except for 'svn:author' and 'svn:date' properties (assuming those properties exist).

Since
New in 1.1.
svn_error_t* svn_repos_get_commit_editor ( const svn_delta_editor_t **  editor,
void **  edit_baton,
svn_repos_t repos,
const char *  repos_url,
const char *  base_path,
const char *  user,
const char *  log_msg,
svn_commit_callback_t  callback,
void *  callback_baton,
apr_pool_t *  pool 
)

Similar to svn_repos_get_commit_editor2(), but with txn always set to NULL.

Deprecated:
Provided for backward compatibility with the 1.1 API.
svn_error_t* svn_repos_get_commit_editor2 ( const svn_delta_editor_t **  editor,
void **  edit_baton,
svn_repos_t repos,
svn_fs_txn_t txn,
const char *  repos_url,
const char *  base_path,
const char *  user,
const char *  log_msg,
svn_commit_callback_t  callback,
void *  callback_baton,
apr_pool_t *  pool 
)

Similar to svn_repos_get_commit_editor3(), but with authz_callback and authz_baton set to NULL.

Deprecated:
Provided for backward compatibility with the 1.2 API.
svn_error_t* svn_repos_get_commit_editor3 ( const svn_delta_editor_t **  editor,
void **  edit_baton,
svn_repos_t repos,
svn_fs_txn_t txn,
const char *  repos_url,
const char *  base_path,
const char *  user,
const char *  log_msg,
svn_commit_callback_t  callback,
void *  callback_baton,
svn_repos_authz_callback_t  authz_callback,
void *  authz_baton,
apr_pool_t *  pool 
)

Similar to svn_repos_get_commit_editor4(), but uses the svn_commit_callback_t type.

Since
New in 1.3.
Deprecated:
Provided for backward compatibility with the 1.3 API.
svn_error_t* svn_repos_get_commit_editor4 ( const svn_delta_editor_t **  editor,
void **  edit_baton,
svn_repos_t repos,
svn_fs_txn_t txn,
const char *  repos_url,
const char *  base_path,
const char *  user,
const char *  log_msg,
svn_commit_callback2_t  commit_callback,
void *  commit_baton,
svn_repos_authz_callback_t  authz_callback,
void *  authz_baton,
apr_pool_t *  pool 
)

Similar to svn_repos_get_commit_editor5(), but with revprop_table set to a hash containing user and log_msg as the SVN_PROP_REVISION_AUTHOR and SVN_PROP_REVISION_LOG properties, respectively.

user and log_msg may both be NULL.

Since
New in 1.4.
Deprecated:
Provided for backward compatibility with the 1.4 API.
svn_error_t* svn_repos_get_commit_editor5 ( const svn_delta_editor_t **  editor,
void **  edit_baton,
svn_repos_t repos,
svn_fs_txn_t txn,
const char *  repos_url,
const char *  base_path,
apr_hash_t *  revprop_table,
svn_commit_callback2_t  commit_callback,
void *  commit_baton,
svn_repos_authz_callback_t  authz_callback,
void *  authz_baton,
apr_pool_t *  pool 
)

Return an editor and edit_baton to commit changes to the filesystem of repos, beginning at location 'rev:base_path', where "rev" is the argument given to open_root().

repos is a previously opened repository. repos_url is the decoded URL to the base of the repository, and is used to check copyfrom paths. copyfrom paths passed to the editor must be full, URI-encoded, URLs. txn is a filesystem transaction object to use during the commit, or NULL to indicate that this function should create (and fully manage) a new transaction.

Store the contents of revprop_table, a hash mapping const char * property names to svn_string_t values, as properties of the commit transaction, including author and log message if present.

Note
SVN_PROP_REVISION_DATE may be present in revprop_table, but it will be overwritten when the transaction is committed.

Iff authz_callback is provided, check read/write authorizations on paths accessed by editor operations. An operation which fails due to authz will return SVN_ERR_AUTHZ_UNREADABLE or SVN_ERR_AUTHZ_UNWRITABLE.

Calling (*editor)->close_edit completes the commit.

If commit_callback is non-NULL, then before close_edit returns (but after the commit has succeeded) close_edit will invoke commit_callback with a 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 if there was a post-commit hook failure, then that error will be returned with code SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED. (Note that prior to Subversion 1.6, commit_callback cannot be NULL; if you don't need a callback, pass a dummy function.)

Calling (*editor)->abort_edit aborts the commit, and will also abort the commit transaction unless txn was supplied (not NULL). Callers who supply their own transactions are responsible for cleaning them up (either by committing them, or aborting them).

Since
New in 1.5.
Note
Yes, repos_url is a decoded URL. We realize that's sorta wonky. Sorry about that.
svn_error_t* svn_repos_get_committed_info ( svn_revnum_t committed_rev,
const char **  committed_date,
const char **  last_author,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Given a root/path within some filesystem, return three pieces of information allocated in pool:

  • set *committed_rev to the revision in which the object was last modified. (In fs parlance, this is the revision in which the particular node-rev-id was 'created'.)
  • set *committed_date to the date of said revision, or NULL if not available.
  • set *last_author to the author of said revision, or NULL if not available.
svn_error_t* svn_repos_get_file_revs ( svn_repos_t repos,
const char *  path,
svn_revnum_t  start,
svn_revnum_t  end,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
svn_repos_file_rev_handler_t  handler,
void *  handler_baton,
apr_pool_t *  pool 
)

Similar to svn_repos_get_file_revs2(), with include_merged_revisions set to FALSE.

Deprecated:
Provided for backward compatibility with the 1.4 API.
Since
New in 1.1.
svn_error_t* svn_repos_get_file_revs2 ( svn_repos_t repos,
const char *  path,
svn_revnum_t  start,
svn_revnum_t  end,
svn_boolean_t  include_merged_revisions,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
svn_file_rev_handler_t  handler,
void *  handler_baton,
apr_pool_t *  pool 
)

Retrieve a subset of the interesting revisions of a file path in repos as seen in revision end.

Invoke handler with handler_baton as its first argument for each such revision. pool is used for all allocations. See svn_fs_history_prev() for a discussion of interesting revisions.

If optional authz_read_func is non-NULL, then use this function (along with optional authz_read_baton) to check the readability of the rev-path in each interesting revision encountered.

Revision discovery happens from end to start, and if an unreadable revision is encountered before start is reached, then revision discovery stops and only the revisions from end to the oldest readable revision are returned (So it will appear that path was added without history in the latter revision).

If there is an interesting revision of the file that is less than or equal to start, the iteration will start at that revision. Else, the iteration will start 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, 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 contents for the previous call.

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

Since Subversion 1.8 this function has been enabled to support reversion the revision range for include_merged_revision FALSE reporting by switching start with end.

Since
New in 1.5.
svn_error_t* svn_repos_get_logs ( svn_repos_t repos,
const apr_array_header_t *  paths,
svn_revnum_t  start,
svn_revnum_t  end,
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 
)

Same as svn_repos_get_logs2(), but with authz_read_func and authz_read_baton always set to NULL.

Deprecated:
Provided for backward compatibility with the 1.0 API.
svn_error_t* svn_repos_get_logs2 ( svn_repos_t repos,
const apr_array_header_t *  paths,
svn_revnum_t  start,
svn_revnum_t  end,
svn_boolean_t  discover_changed_paths,
svn_boolean_t  strict_node_history,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
svn_log_message_receiver_t  receiver,
void *  receiver_baton,
apr_pool_t *  pool 
)

Same as svn_repos_get_logs3(), but with limit always set to 0.

Deprecated:
Provided for backward compatibility with the 1.1 API.
svn_error_t* svn_repos_get_logs3 ( svn_repos_t repos,
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_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
svn_log_message_receiver_t  receiver,
void *  receiver_baton,
apr_pool_t *  pool 
)

Same as svn_repos_get_logs4(), but with receiver being 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. If paths is empty, nothing is returned.

Since
New in 1.2.
Deprecated:
Provided for backward compatibility with the 1.4 API.
svn_error_t* svn_repos_get_logs4 ( svn_repos_t repos,
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_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
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 in repos's filesystem.

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 or entries changed or any node changed below it). Each path is a const char * representing an absolute path in the repository. If paths is NULL or empty, show all revisions regardless of what paths were changed in those revisions.

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

If discover_changed_paths, then each call to receiver passes a hash mapping paths committed in that revision to information about them as the receiver's changed_paths argument. Otherwise, each call to receiver passes NULL for changed_paths.

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

If include_merged_revisions is set, log information for revisions which have been merged to paths will also be returned, unless these revisions are already part of start to end in repos's filesystem, as limited by paths. In the latter case those revisions are skipped and receiver is not invoked.

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.

If optional authz_read_func is non-NULL, then use this function (along with optional authz_read_baton) to check the readability of each changed-path in each revision about to be "pushed" at receiver. If a revision has some changed-paths readable and others unreadable, unreadable paths are omitted from the changed_paths field and only svn:author and svn:date will be available in the revprops field. If a revision has no changed-paths readable at all, then all paths are omitted and no revprops are available.

See also the documentation for svn_log_entry_receiver_t.

Use pool for temporary allocations.

Since
New in 1.5.
svn_error_t* svn_repos_has_capability ( svn_repos_t repos,
svn_boolean_t has,
const char *  capability,
apr_pool_t *  pool 
)

Set *has to TRUE if repos has capability (one of the capabilities beginning with "SVN_REPOS_CAPABILITY_"), else set *has to FALSE.

If capability isn't recognized, throw SVN_ERR_UNKNOWN_CAPABILITY, with the effect on *has undefined.

Use pool for all allocation.

Since
New in 1.5.
svn_error_t* svn_repos_history ( svn_fs_t fs,
const char *  path,
svn_repos_history_func_t  history_func,
void *  history_baton,
svn_revnum_t  start,
svn_revnum_t  end,
svn_boolean_t  cross_copies,
apr_pool_t *  pool 
)

Similar to svn_repos_history2(), but with authz_read_func and authz_read_baton always set to NULL.

Deprecated:
Provided for backward compatibility with the 1.0 API.
svn_error_t* svn_repos_history2 ( svn_fs_t fs,
const char *  path,
svn_repos_history_func_t  history_func,
void *  history_baton,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
svn_revnum_t  start,
svn_revnum_t  end,
svn_boolean_t  cross_copies,
apr_pool_t *  pool 
)

Call history_func (with history_baton) for each interesting history location in the lifetime of path in fs, from the youngest of end and start to the oldest.

Stop processing if history_func returns SVN_ERR_CEASE_INVOCATION. Only cross filesystem copy history if cross_copies is TRUE. And do all of this in pool.

If authz_read_func is non-NULL, then use it (and authz_read_baton) to verify that path in end is readable; if not, return SVN_ERR_AUTHZ_UNREADABLE. Also verify the readability of every ancestral path/revision pair before pushing them at history_func. If a pair is deemed unreadable, then do not send them; instead, immediately stop traversing history and return SVN_NO_ERROR.

Since
New in 1.1.
Note
SVN_ERR_CEASE_INVOCATION is new in 1.5.
const char* svn_repos_hook_dir ( svn_repos_t repos,
apr_pool_t *  pool 
)

Return the path to repos's hook directory, allocated in pool.

svn_error_t* svn_repos_hotcopy ( const char *  src_path,
const char *  dst_path,
svn_boolean_t  clean_logs,
apr_pool_t *  pool 
)

Like svn_repos_hotcopy2(), but with incremental always passed as FALSE and without cancellation support.

Deprecated:
Provided for backward compatibility with the 1.6 API.
svn_error_t* svn_repos_hotcopy2 ( const char *  src_path,
const char *  dst_path,
svn_boolean_t  clean_logs,
svn_boolean_t  incremental,
svn_cancel_func_t  cancel_func,
void *  cancel_baton,
apr_pool_t *  pool 
)

Make a hot copy of the Subversion repository found at src_path to dst_path.

Copy a possibly live Subversion repository from src_path to dst_path. If clean_logs is TRUE, perform cleanup on the source filesystem as part of the copy operation; currently, this means deleting copied, unused logfiles for a Berkeley DB source repository.

If incremental is TRUE, make an effort to not re-copy information already present in the destination. If incremental hotcopy is not implemented by the filesystem backend, raise SVN_ERR_UNSUPPORTED_FEATURE.

Since
New in 1.8.
svn_error_t* svn_repos_link_path ( void *  report_baton,
const char *  path,
const char *  link_path,
svn_revnum_t  revision,
svn_boolean_t  start_empty,
apr_pool_t *  pool 
)

Similar to svn_repos_link_path2(), but with lock_token set to NULL.

Deprecated:
Provided for backward compatibility with the 1.1 API.
svn_error_t* svn_repos_link_path2 ( void *  report_baton,
const char *  path,
const char *  link_path,
svn_revnum_t  revision,
svn_boolean_t  start_empty,
const char *  lock_token,
apr_pool_t *  pool 
)

Similar to svn_repos_link_path3(), but with depth set to svn_depth_infinity.

Deprecated:
Provided for backward compatibility with the 1.4 API.
svn_error_t* svn_repos_link_path3 ( void *  report_baton,
const char *  path,
const char *  link_path,
svn_revnum_t  revision,
svn_depth_t  depth,
svn_boolean_t  start_empty,
const char *  lock_token,
apr_pool_t *  pool 
)

Given a report_baton constructed by svn_repos_begin_report3(), record the presence of path in the current tree, containing the contents of link_path at revision with depth depth.

A depth of svn_depth_unknown is not allowed, and results in an error.

path may not be underneath a path on which svn_repos_set_path3() was previously called with svn_depth_exclude in this report.

Note that while path is relative to the anchor/target used in the creation of the report_baton, link_path is an absolute filesystem path!

If start_empty is TRUE and path is a directory, then require the caller to explicitly provide all the children of path - do not assume that the tree also contains all the children of link_path at revision. This is for 'low confidence' client reporting.

If the caller has a lock token for link_path, then lock_token should be set to that token. Else, lock_token should be NULL.

All temporary allocations are done in pool.

Since
New in 1.5.
const char* svn_repos_lock_dir ( svn_repos_t repos,
apr_pool_t *  pool 
)

Return path to repos's lock directory, allocated in pool.

svn_error_t* svn_repos_node_location_segments ( svn_repos_t repos,
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,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
apr_pool_t *  pool 
)

Call receiver and receiver_baton to report successive location segments in revisions between start_rev and end_rev (inclusive) for the line of history identified by the peg-object path in peg_revision (and in repos).

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.

If optional authz_read_func is not NULL, then use it (and authz_read_baton) to verify that the peg-object is readable. If not, return SVN_ERR_AUTHZ_UNREADABLE. Also use the authz_read_func to check that every path reported in a location segment is readable. If an unreadable path is encountered, report a final (possibly truncated) location segment (if any), stop tracing history, and return SVN_NO_ERROR.

pool is used for all allocations.

Since
New in 1.5.
svn_repos_notify_t* svn_repos_notify_create ( svn_repos_notify_action_t  action,
apr_pool_t *  result_pool 
)

Allocate an svn_repos_notify_t structure in result_pool, initialize and return it.

Since
New in 1.7.
svn_error_t* svn_repos_open ( svn_repos_t **  repos_p,
const char *  path,
apr_pool_t *  pool 
)

Similar to svn_repos_open2() with fs_config set to NULL.

Deprecated:
Provided for backward compatibility with 1.6 API.
svn_error_t* svn_repos_open2 ( svn_repos_t **  repos_p,
const char *  path,
apr_hash_t *  fs_config,
apr_pool_t *  pool 
)

Set *repos_p to a repository object for the repository at path.

Allocate *repos_p in pool.

Acquires a shared lock on the repository, and attaches a cleanup function to pool to remove the lock. If no lock can be acquired, returns error, with undefined effect on *repos_p. If an exclusive lock is present, this blocks until it's gone. fs_config will be passed to the filesystem initialization function and may be NULL.

Since
New in 1.7.
const char* svn_repos_path ( svn_repos_t repos,
apr_pool_t *  pool 
)

Return the top-level repository path allocated in pool.

const char* svn_repos_post_commit_hook ( svn_repos_t repos,
apr_pool_t *  pool 
)

Return the path to repos's post-commit hook, allocated in pool.

const char* svn_repos_pre_commit_hook ( svn_repos_t repos,
apr_pool_t *  pool 
)

Return the path to repos's pre-commit hook, allocated in pool.

svn_error_t* svn_repos_recover ( const char *  path,
apr_pool_t *  pool 
)

Similar to svn_repos_recover2(), but with nonblocking set to FALSE, and with no callbacks provided.

Deprecated:
Provided for backward compatibility with the 1.0 API.
svn_error_t* svn_repos_recover2 ( const char *  path,
svn_boolean_t  nonblocking,
svn_error_t *(*)(void *baton)  start_callback,
void *  start_callback_baton,
apr_pool_t *  pool 
)

Similar to svn_repos_recover3(), but without cancellation support.

Deprecated:
Provided for backward compatibility with the 1.4 API.
svn_error_t* svn_repos_recover3 ( const char *  path,
svn_boolean_t  nonblocking,
svn_error_t *(*)(void *baton)  start_callback,
void *  start_callback_baton,
svn_cancel_func_t  cancel_func,
void *  cancel_baton,
apr_pool_t *  pool 
)

Similar to svn_repos_recover4(), but with start callback in place of the notify_func / baton.

Since
New in 1.5.
Deprecated:
Provided for backward compatibility with the 1.6 API.
svn_error_t* svn_repos_recover4 ( const char *  path,
svn_boolean_t  nonblocking,
svn_repos_notify_func_t  notify_func,
void *  notify_baton,
svn_cancel_func_t  cancel_func,
void *  cancel_baton,
apr_pool_t *  pool 
)

Run database recovery procedures on the repository at path, returning the database to a consistent state.

Use pool for all allocation.

Acquires an exclusive lock on the repository, recovers the database, and releases the lock. If an exclusive lock can't be acquired, returns error.

If nonblocking is TRUE, an error of type EWOULDBLOCK is returned if the lock is not immediately available.

If notify_func is not NULL, it will be called with notify_baton as argument before the recovery starts, but after the exclusive lock has been acquired.

If cancel_func is not NULL, it is called periodically with cancel_baton as argument to see if the client wishes to cancel the recovery.

Note
On some platforms the exclusive lock does not exclude other threads in the same process so this function should only be called by a single threaded process, or by a multi-threaded process when no other threads are accessing the repository.
Since
New in 1.7.
svn_error_t* svn_repos_remember_client_capabilities ( svn_repos_t repos,
const apr_array_header_t *  capabilities 
)

Capabilities.

Store in repos the client-reported capabilities capabilities, which must be allocated in memory at least as long-lived as repos.

The elements of capabilities are 'const char *', a subset of the constants beginning with SVN_RA_CAPABILITY_. capabilities is not copied, so changing it later will affect what is remembered by repos.

Note
The capabilities are passed along to the start-commit hook; see that hook's template for details.
As of Subversion 1.5, there are no error conditions defined, so this always returns SVN_NO_ERROR. In future releases it may return error, however, so callers should check.
Since
New in 1.5.
svn_error_t* svn_repos_replay ( svn_fs_root_t root,
const svn_delta_editor_t editor,
void *  edit_baton,
apr_pool_t *  pool 
)

Similar to svn_repos_replay2(), but with base_dir set to "", low_water_mark set to SVN_INVALID_REVNUM, send_deltas set to FALSE, and authz_read_func and authz_read_baton set to NULL.

Deprecated:
Provided for backward compatibility with the 1.3 API.
svn_error_t* svn_repos_replay2 ( svn_fs_root_t root,
const char *  base_dir,
svn_revnum_t  low_water_mark,
svn_boolean_t  send_deltas,
const svn_delta_editor_t editor,
void *  edit_baton,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
apr_pool_t *  pool 
)

Use the provided editor and edit_baton to describe the skeletal changes made in a particular filesystem root (revision or transaction).

Changes will be limited to those within base_dir, and if low_water_mark is set to something other than SVN_INVALID_REVNUM it is assumed that the client has no knowledge of revisions prior to low_water_mark. Together, these two arguments define the portion of the tree that the client is assumed to have 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.

The editor passed to this function should be aware of the fact that, if send_deltas is FALSE, calls to its change_dir_prop(), change_file_prop(), and apply_textdelta() functions will not contain meaningful data, and merely serve as indications that properties or textual contents were changed.

If send_deltas is TRUE, the text and property deltas for changes will be sent, otherwise NULL text deltas and empty prop changes will be used.

If authz_read_func is non-NULL, it will be used to determine if the user has read access to the data being accessed. Data that the user cannot access will be skipped.

Note
This editor driver passes SVN_INVALID_REVNUM for all revision parameters in the editor interface except the copyfrom parameter of the add_file() and add_directory() editor functions.
Since
New in 1.4.
svn_error_t* svn_repos_set_path ( void *  report_baton,
const char *  path,
svn_revnum_t  revision,
svn_boolean_t  start_empty,
apr_pool_t *  pool 
)

Similar to svn_repos_set_path2(), but with lock_token set to NULL.

Deprecated:
Provided for backward compatibility with the 1.1 API.
svn_error_t* svn_repos_set_path2 ( void *  report_baton,
const char *  path,
svn_revnum_t  revision,
svn_boolean_t  start_empty,
const char *  lock_token,
apr_pool_t *  pool 
)

Similar to svn_repos_set_path3(), but with depth set to svn_depth_infinity.

Deprecated:
Provided for backward compatibility with the 1.4 API.
svn_error_t* svn_repos_set_path3 ( void *  report_baton,
const char *  path,
svn_revnum_t  revision,
svn_depth_t  depth,
svn_boolean_t  start_empty,
const char *  lock_token,
apr_pool_t *  pool 
)

Given a report_baton constructed by svn_repos_begin_report3(), record the presence of path, at revision with depth depth, in the current tree.

path is relative to the anchor/target used in the creation of the report_baton.

revision may be SVN_INVALID_REVNUM if (for example) path represents a locally-added path with no revision number, or depth is svn_depth_exclude.

path may not be underneath a path on which svn_repos_set_path3() was previously called with svn_depth_exclude in this report.

The first call of this in a given report usually passes an empty path; this is used to set up the correct root revision for the editor drive.

A depth of svn_depth_unknown is not allowed, and results in an error.

If start_empty is TRUE and path is a directory, then require the caller to explicitly provide all the children of path - do not assume that the tree also contains all the children of path at revision. This is for 'low confidence' client reporting.

If the caller has a lock token for path, then lock_token should be set to that token. Else, lock_token should be NULL.

All temporary allocations are done in pool.

Since
New in 1.5.
const char* svn_repos_start_commit_hook ( svn_repos_t repos,
apr_pool_t *  pool 
)

Return the path to repos's start-commit hook, allocated in pool.

svn_error_t* svn_repos_stat ( svn_dirent_t **  dirent,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Set *dirent to an svn_dirent_t associated with path in root.

If path does not exist in root, set *dirent to NULL. Use pool for memory allocation.

Since
New in 1.2.
const char* svn_repos_svnserve_conf ( svn_repos_t repos,
apr_pool_t *  pool 
)

Return path to repos's svnserve.conf, allocated in pool.

svn_error_t* svn_repos_trace_node_locations ( svn_fs_t fs,
apr_hash_t **  locations,
const char *  fs_path,
svn_revnum_t  peg_revision,
const apr_array_header_t *  location_revisions,
svn_repos_authz_func_t  authz_read_func,
void *  authz_read_baton,
apr_pool_t *  pool 
)

Set *locations to be a mapping of the revisions to the paths of the file fs_path present at the repository in revision peg_revision, where the revisions are taken out of the array location_revisions.

location_revisions is an array of svn_revnum_t's and *locations maps 'svn_revnum_t *' to 'const char *'.

If optional authz_read_func is non-NULL, then use it (and authz_read_baton) to verify that the peg-object is readable. If not, return SVN_ERR_AUTHZ_UNREADABLE. Also use the authz_read_func to check that every path returned in the hash is readable. If an unreadable path is encountered, stop tracing and return SVN_NO_ERROR.

pool is used for all allocations.

Since
New in 1.1.
svn_error_t* svn_repos_upgrade ( const char *  path,
svn_boolean_t  nonblocking,
svn_error_t *(*)(void *baton)  start_callback,
void *  start_callback_baton,
apr_pool_t *  pool 
)

Similar to svn_repos_upgrade2(), but with start_callback and baton, rather than a notify_callback / baton.

Since
New in 1.5.
Deprecated:
Provided for backward compatibility with the 1.6 API.
svn_error_t* svn_repos_upgrade2 ( const char *  path,
svn_boolean_t  nonblocking,
svn_repos_notify_func_t  notify_func,
void *  notify_baton,
apr_pool_t *  pool 
)

Upgrade the Subversion repository (and its underlying versioned filesystem) located in the directory path to the latest version supported by this library.

If the requested upgrade is not supported due to the current state of the repository or it underlying filesystem, return SVN_ERR_REPOS_UNSUPPORTED_UPGRADE or SVN_ERR_FS_UNSUPPORTED_UPGRADE (respectively) and make no changes to the repository or filesystem.

Acquires an exclusive lock on the repository, upgrades the repository, and releases the lock. If an exclusive lock can't be acquired, returns error.

If nonblocking is TRUE, an error of type EWOULDBLOCK is returned if the lock is not immediately available.

If start_callback is not NULL, it will be called with start_callback_baton as argument before the upgrade starts, but after the exclusive lock has been acquired.

Use pool for necessary allocations.

Note
This functionality is provided as a convenience for administrators wishing to make use of new Subversion functionality without a potentially costly full repository dump/load. As such, the operation performs only the minimum amount of work needed to accomplish this while maintaining the integrity of the repository. It does not guarantee the most optimized repository state as a dump and subsequent load would.
On some platforms the exclusive lock does not exclude other threads in the same process so this function should only be called by a single threaded process, or by a multi-threaded process when no other threads are accessing the repository.
Since
New in 1.7.
const svn_version_t* svn_repos_version ( void  )

Get libsvn_repos version information.

Since
New in 1.1.