Subversion
Modules | Data Structures | Typedefs | Enumerations | Functions
Filesystem interaction subsystem

Modules

 Built-in back-ends
 Constants defining the currently supported built-in filesystem backends.
 
 Berkeley DB filesystems
 Subversion filesystems based on Berkeley DB.
 
 Filesystem access contexts
 Filesystem Access Contexts.
 
 Filesystem nodes
 Filesystem Nodes and Node-Revisions.
 
 Filesystem transactions
 Filesystem Transactions.
 
 Filesystem roots
 Roots.
 
 Filesystem directories
 Directory entry names and directory paths.
 
 Filesystem locks
 

Data Structures

struct  svn_fs_dirent_t
 The type of a Subversion directory entry. More...
 

Typedefs

typedef struct svn_fs_t svn_fs_t
 An object representing a Subversion filesystem. More...
 
typedef void(* svn_fs_warning_callback_t) (void *baton, svn_error_t *err)
 The type of a warning callback function. More...
 
typedef enum svn_fs_upgrade_notify_action_t svn_fs_upgrade_notify_action_t
 The kind of action being taken by 'upgrade'. More...
 
typedef svn_error_t *(* svn_fs_upgrade_notify_t) (void *baton, apr_uint64_t number, svn_fs_upgrade_notify_action_t action, apr_pool_t *scratch_pool)
 The type of an upgrade notification function. More...
 
typedef void(* svn_fs_progress_notify_func_t) (svn_revnum_t revision, void *baton, apr_pool_t *pool)
 Callback function type for progress notification. More...
 
typedef void(* svn_fs_hotcopy_notify_t) (void *baton, svn_revnum_t start_revision, svn_revnum_t end_revision, apr_pool_t *scratch_pool)
 The type of a hotcopy notification function. More...
 
typedef svn_error_t *(* svn_fs_freeze_func_t) (void *baton, apr_pool_t *pool)
 Callback for svn_fs_freeze(). More...
 
typedef struct svn_fs_history_t svn_fs_history_t
 An opaque node history object. More...
 
typedef svn_error_t *(* svn_fs_mergeinfo_receiver_t) (const char *path, svn_mergeinfo_t mergeinfo, void *baton, apr_pool_t *scratch_pool)
 Receives parsed mergeinfo for the file system path path. More...
 
typedef struct svn_fs_dirent_t svn_fs_dirent_t
 The type of a Subversion directory entry. More...
 
typedef svn_error_t *(* svn_fs_process_contents_func_t) (const unsigned char *contents, apr_size_t len, void *baton, apr_pool_t *scratch_pool)
 Callback function type used with svn_fs_try_process_file_contents() that delivers the immutable, non-NULL contents of len bytes. More...
 
typedef enum svn_fs_pack_notify_action_t svn_fs_pack_notify_action_t
 The kind of action being taken by 'pack'. More...
 
typedef svn_error_t *(* svn_fs_pack_notify_t) (void *baton, apr_int64_t shard, svn_fs_pack_notify_action_t action, apr_pool_t *pool)
 The type of a pack notification function. More...
 

Enumerations

enum  svn_fs_upgrade_notify_action_t {
  svn_fs_upgrade_pack_revprops = 0,
  svn_fs_upgrade_cleanup_revprops,
  svn_fs_upgrade_format_bumped
}
 The kind of action being taken by 'upgrade'. More...
 
enum  svn_fs_pack_notify_action_t {
  svn_fs_pack_notify_start = 0,
  svn_fs_pack_notify_end,
  svn_fs_pack_notify_start_revprop,
  svn_fs_pack_notify_end_revprop,
  svn_fs_pack_notify_noop
}
 The kind of action being taken by 'pack'. More...
 

Functions

svn_error_tsvn_fs_initialize (apr_pool_t *pool)
 Callers should invoke this function to initialize global state in the FS library before creating FS objects. More...
 
void svn_fs_set_warning_func (svn_fs_t *fs, svn_fs_warning_callback_t warning, void *warning_baton)
 Provide a callback function, warning, that fs should use to report (non-fatal) errors. More...
 
svn_error_tsvn_fs_create2 (svn_fs_t **fs_p, const char *path, apr_hash_t *fs_config, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Create a new, empty Subversion filesystem, stored in the directory path, and return a pointer to it in *fs_p. More...
 
svn_error_tsvn_fs_create (svn_fs_t **fs_p, const char *path, apr_hash_t *fs_config, apr_pool_t *pool)
 Like svn_fs_create2(), but without scratch_pool. More...
 
svn_error_tsvn_fs_open2 (svn_fs_t **fs_p, const char *path, apr_hash_t *fs_config, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Open a Subversion filesystem located in the directory path, and return a pointer to it in *fs_p. More...
 
svn_error_tsvn_fs_open (svn_fs_t **fs_p, const char *path, apr_hash_t *fs_config, apr_pool_t *pool)
 Like svn_fs_open2(), but without scratch_pool. More...
 
svn_error_tsvn_fs_upgrade2 (const char *path, svn_fs_upgrade_notify_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *scratch_pool)
 Upgrade the Subversion filesystem located in the directory path to the latest version supported by this library. More...
 
svn_error_tsvn_fs_upgrade (const char *path, apr_pool_t *pool)
 Like svn_fs_upgrade2 but with notify_func, notify_baton, cancel_func and cancel_baton being set to NULL. More...
 
svn_error_tsvn_fs_type (const char **fs_type, const char *path, apr_pool_t *pool)
 Return, in *fs_type, a string identifying the back-end type of the Subversion filesystem located in path. More...
 
const char * svn_fs_path (svn_fs_t *fs, apr_pool_t *pool)
 Return the path to fs's repository, allocated in pool. More...
 
apr_hash_t * svn_fs_config (svn_fs_t *fs, apr_pool_t *pool)
 Return a shallow copy of the configuration parameters used to open fs, allocated in pool. More...
 
svn_error_tsvn_fs_delete_fs (const char *path, apr_pool_t *pool)
 Delete the filesystem at path. More...
 
svn_error_tsvn_fs_hotcopy3 (const char *src_path, const char *dest_path, svn_boolean_t clean, svn_boolean_t incremental, svn_fs_hotcopy_notify_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *scratch_pool)
 Copy a possibly live Subversion filesystem from src_path to dest_path. More...
 
svn_error_tsvn_fs_hotcopy2 (const char *src_path, const char *dest_path, svn_boolean_t clean, svn_boolean_t incremental, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *scratch_pool)
 Like svn_fs_hotcopy3(), but with notify_func and notify_baton always passed as NULL. More...
 
svn_error_tsvn_fs_hotcopy (const char *src_path, const char *dest_path, svn_boolean_t clean, apr_pool_t *pool)
 Like svn_fs_hotcopy2(), but with incremental always passed as TRUE and without cancellation support. More...
 
svn_error_tsvn_fs_recover (const char *path, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Perform any necessary non-catastrophic recovery on the Subversion filesystem located at path. More...
 
svn_error_tsvn_fs_freeze (svn_fs_t *fs, svn_fs_freeze_func_t freeze_func, void *freeze_baton, apr_pool_t *pool)
 Take an exclusive lock on fs to prevent commits and then invoke freeze_func passing freeze_baton. More...
 
svn_error_tsvn_fs_check_path (svn_node_kind_t *kind_p, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Set *kind_p to the type of node present at path under root. More...
 
svn_error_tsvn_fs_node_history2 (svn_fs_history_t **history_p, svn_fs_root_t *root, const char *path, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Set *history_p to an opaque node history object which represents path under root. More...
 
svn_error_tsvn_fs_node_history (svn_fs_history_t **history_p, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Same as svn_fs_node_history2() but using a single pool for all allocations. More...
 
svn_error_tsvn_fs_history_prev2 (svn_fs_history_t **prev_history_p, svn_fs_history_t *history, svn_boolean_t cross_copies, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Set *prev_history_p to an opaque node history object which represents the previous (or "next oldest") interesting history location for the filesystem node represented by history, or NULL if no such previous history exists. More...
 
svn_error_tsvn_fs_history_prev (svn_fs_history_t **prev_history_p, svn_fs_history_t *history, svn_boolean_t cross_copies, apr_pool_t *pool)
 Same as svn_fs_history_prev2() but using a single pool for all allocations. More...
 
svn_error_tsvn_fs_history_location (const char **path, svn_revnum_t *revision, svn_fs_history_t *history, apr_pool_t *pool)
 Set *path and *revision to the path and revision, respectively, of the history object. More...
 
svn_error_tsvn_fs_is_dir (svn_boolean_t *is_dir, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Set *is_dir to TRUE iff path in root is a directory. More...
 
svn_error_tsvn_fs_is_file (svn_boolean_t *is_file, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Set *is_file to TRUE iff path in root is a file. More...
 
svn_error_tsvn_fs_node_id (const svn_fs_id_t **id_p, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Get the id of a node. More...
 
svn_error_tsvn_fs_node_relation (svn_fs_node_relation_t *relation, svn_fs_root_t *root_a, const char *path_a, svn_fs_root_t *root_b, const char *path_b, apr_pool_t *scratch_pool)
 Determine how path_a under root_a and path_b under root_b are related and return the result in relation. More...
 
svn_error_tsvn_fs_node_created_rev (svn_revnum_t *revision, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Set *revision to the revision in which the node-revision identified by path under root was created; that is, to the revision in which path under root was last modified. More...
 
svn_error_tsvn_fs_node_origin_rev (svn_revnum_t *revision, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Set *revision to the revision in which the line of history represented by path under root originated. More...
 
svn_error_tsvn_fs_node_created_path (const char **created_path, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Set *created_path to the path at which path under root was created. More...
 
svn_error_tsvn_fs_node_prop (svn_string_t **value_p, svn_fs_root_t *root, const char *path, const char *propname, apr_pool_t *pool)
 Set *value_p to the value of the property named propname of path in root. More...
 
svn_error_tsvn_fs_node_proplist (apr_hash_t **table_p, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Set *table_p to the entire property list of path in root, as an APR hash table allocated in pool. More...
 
svn_error_tsvn_fs_node_has_props (svn_boolean_t *has_props, svn_fs_root_t *root, const char *path, apr_pool_t *scratch_pool)
 Set *has_props to TRUE if the node path in root has properties and to FALSE if it doesn't have properties. More...
 
svn_error_tsvn_fs_change_node_prop (svn_fs_root_t *root, const char *path, const char *name, const svn_string_t *value, apr_pool_t *pool)
 Change a node's property's value, or add/delete a property. More...
 
svn_error_tsvn_fs_props_different (svn_boolean_t *different_p, svn_fs_root_t *root1, const char *path1, svn_fs_root_t *root2, const char *path2, apr_pool_t *scratch_pool)
 Determine if the properties of two path/root combinations are different. More...
 
svn_error_tsvn_fs_props_changed (svn_boolean_t *changed_p, svn_fs_root_t *root1, const char *path1, svn_fs_root_t *root2, const char *path2, apr_pool_t *pool)
 Determine if the properties of two path/root combinations have changed. More...
 
svn_error_tsvn_fs_copied_from (svn_revnum_t *rev_p, const char **path_p, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Discover a node's copy ancestry, if any. More...
 
svn_error_tsvn_fs_closest_copy (svn_fs_root_t **root_p, const char **path_p, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Set *root_p and *path_p to the revision root and path of the destination of the most recent copy event that caused path to exist where it does in root, or to NULL if no such copy exists. More...
 
svn_error_tsvn_fs_get_mergeinfo3 (svn_fs_root_t *root, const apr_array_header_t *paths, svn_mergeinfo_inheritance_t inherit, svn_boolean_t include_descendants, svn_boolean_t adjust_inherited_mergeinfo, svn_fs_mergeinfo_receiver_t receiver, void *baton, apr_pool_t *scratch_pool)
 Retrieve mergeinfo for multiple nodes. More...
 
svn_error_tsvn_fs_get_mergeinfo2 (svn_mergeinfo_catalog_t *catalog, svn_fs_root_t *root, const apr_array_header_t *paths, svn_mergeinfo_inheritance_t inherit, svn_boolean_t include_descendants, svn_boolean_t adjust_inherited_mergeinfo, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Same as svn_fs_get_mergeinfo3(), but all mergeinfo is being collected and returned in *catalog. More...
 
svn_error_tsvn_fs_get_mergeinfo (svn_mergeinfo_catalog_t *catalog, svn_fs_root_t *root, const apr_array_header_t *paths, svn_mergeinfo_inheritance_t inherit, svn_boolean_t include_descendants, apr_pool_t *pool)
 Same as svn_fs_get_mergeinfo2(), but with adjust_inherited_mergeinfo set always set to TRUE and with only one pool. More...
 
svn_error_tsvn_fs_merge (const char **conflict_p, svn_fs_root_t *source_root, const char *source_path, svn_fs_root_t *target_root, const char *target_path, svn_fs_root_t *ancestor_root, const char *ancestor_path, apr_pool_t *pool)
 Merge changes between two nodes into a third node. More...
 
svn_error_tsvn_fs_dir_entries (apr_hash_t **entries_p, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Set *entries_p to a newly allocated APR hash table containing the entries of the directory at path in root. More...
 
svn_error_tsvn_fs_dir_optimal_order (apr_array_header_t **ordered_p, svn_fs_root_t *root, apr_hash_t *entries, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Take the svn_fs_dirent_t structures in entries as returned by svn_fs_dir_entries for root and determine an optimized ordering in which data access would most likely be efficient. More...
 
svn_error_tsvn_fs_make_dir (svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Create a new directory named path in root. More...
 
svn_error_tsvn_fs_delete (svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Delete the node named path in root. More...
 
svn_error_tsvn_fs_copy (svn_fs_root_t *from_root, const char *from_path, svn_fs_root_t *to_root, const char *to_path, apr_pool_t *pool)
 Create a copy of from_path in from_root named to_path in to_root. More...
 
svn_error_tsvn_fs_revision_link (svn_fs_root_t *from_root, svn_fs_root_t *to_root, const char *path, apr_pool_t *pool)
 Like svn_fs_copy(), but doesn't record copy history, and preserves the PATH. More...
 
svn_error_tsvn_fs_file_length (svn_filesize_t *length_p, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Set *length_p to the length of the file path in root, in bytes. More...
 
svn_error_tsvn_fs_file_checksum (svn_checksum_t **checksum, svn_checksum_kind_t kind, svn_fs_root_t *root, const char *path, svn_boolean_t force, apr_pool_t *pool)
 Set *checksum to the checksum of type kind for the file path. More...
 
svn_error_tsvn_fs_file_md5_checksum (unsigned char digest[], svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Same as svn_fs_file_checksum(), only always put the MD5 checksum of file path into digest, which should point to APR_MD5_DIGESTSIZE bytes of storage. More...
 
svn_error_tsvn_fs_file_contents (svn_stream_t **contents, svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Set *contents to a readable generic stream that will yield the contents of the file path in root. More...
 
svn_error_tsvn_fs_try_process_file_contents (svn_boolean_t *success, svn_fs_root_t *root, const char *path, svn_fs_process_contents_func_t processor, void *baton, apr_pool_t *pool)
 Efficiently deliver the contents of the file path in root via processor (with baton), setting *success to TRUE upon doing so. More...
 
svn_error_tsvn_fs_make_file (svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 Create a new file named path in root. More...
 
svn_error_tsvn_fs_apply_textdelta (svn_txdelta_window_handler_t *contents_p, void **contents_baton_p, svn_fs_root_t *root, const char *path, const char *base_checksum, const char *result_checksum, apr_pool_t *pool)
 Apply a text delta to the file path in root. More...
 
svn_error_tsvn_fs_apply_text (svn_stream_t **contents_p, svn_fs_root_t *root, const char *path, const char *result_checksum, apr_pool_t *pool)
 Write data directly to the file path in root. More...
 
svn_error_tsvn_fs_contents_different (svn_boolean_t *different_p, svn_fs_root_t *root1, const char *path1, svn_fs_root_t *root2, const char *path2, apr_pool_t *scratch_pool)
 Check if the contents of two root/path combos are different. More...
 
svn_error_tsvn_fs_contents_changed (svn_boolean_t *changed_p, svn_fs_root_t *root1, const char *path1, svn_fs_root_t *root2, const char *path2, apr_pool_t *pool)
 Check if the contents of two root/path combos have changed. More...
 
svn_error_tsvn_fs_youngest_rev (svn_revnum_t *youngest_p, svn_fs_t *fs, apr_pool_t *pool)
 Set *youngest_p to the number of the youngest revision in filesystem fs. More...
 
svn_error_tsvn_fs_info_format (int *fs_format, svn_version_t **supports_version, svn_fs_t *fs, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Return filesystem format information for fs. More...
 
svn_error_tsvn_fs_info_config_files (apr_array_header_t **files, svn_fs_t *fs, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Return a list of admin-serviceable config files for fs. More...
 
svn_error_tsvn_fs_deltify_revision (svn_fs_t *fs, svn_revnum_t revision, apr_pool_t *pool)
 Provide filesystem fs the opportunity to compress storage relating to associated with revision in filesystem fs. More...
 
svn_error_tsvn_fs_refresh_revision_props (svn_fs_t *fs, apr_pool_t *scratch_pool)
 Make sure that all completed revision property changes to the filesystem underlying fs are actually visible through fs. More...
 
svn_error_tsvn_fs_revision_prop2 (svn_string_t **value_p, svn_fs_t *fs, svn_revnum_t rev, const char *propname, svn_boolean_t refresh, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Set *value_p to the value of the property named propname on revision rev in the filesystem fs. More...
 
svn_error_tsvn_fs_revision_prop (svn_string_t **value_p, svn_fs_t *fs, svn_revnum_t rev, const char *propname, apr_pool_t *pool)
 Like svn_fs_revision_prop2 but using pool for scratch_pool as well as result_pool and setting refresh to TRUE. More...
 
svn_error_tsvn_fs_revision_proplist2 (apr_hash_t **table_p, svn_fs_t *fs, svn_revnum_t rev, svn_boolean_t refresh, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Set *table_p to the entire property list of revision rev in filesystem fs, as an APR hash table allocated in pool. More...
 
svn_error_tsvn_fs_revision_proplist (apr_hash_t **table_p, svn_fs_t *fs, svn_revnum_t rev, apr_pool_t *pool)
 Like svn_fs_revision_proplist2 but using pool for scratch_pool as well as result_pool and setting refresh to TRUE. More...
 
svn_error_tsvn_fs_change_rev_prop2 (svn_fs_t *fs, svn_revnum_t rev, const char *name, const svn_string_t *const *old_value_p, const svn_string_t *value, apr_pool_t *pool)
 Change a revision's property's value, or add/delete a property. More...
 
svn_error_tsvn_fs_change_rev_prop (svn_fs_t *fs, svn_revnum_t rev, const char *name, const svn_string_t *value, apr_pool_t *pool)
 Similar to svn_fs_change_rev_prop2(), but with old_value_p passed as NULL. More...
 
svn_error_tsvn_fs_get_file_delta_stream (svn_txdelta_stream_t **stream_p, svn_fs_root_t *source_root, const char *source_path, svn_fs_root_t *target_root, const char *target_path, apr_pool_t *pool)
 Set *stream_p to a pointer to a delta stream that will turn the contents of the file source into the contents of the file target. More...
 
svn_error_tsvn_fs_get_uuid (svn_fs_t *fs, const char **uuid, apr_pool_t *pool)
 Populate *uuid with the UUID associated with fs. More...
 
svn_error_tsvn_fs_set_uuid (svn_fs_t *fs, const char *uuid, apr_pool_t *pool)
 If not NULL, associate *uuid with fs. More...
 
svn_error_tsvn_fs_print_modules (svn_stringbuf_t *output, apr_pool_t *pool)
 Append a textual list of all available FS modules to the stringbuf output. More...
 
svn_error_tsvn_fs_pack (const char *db_path, svn_fs_pack_notify_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
 Possibly update the filesystem located in the directory path to use disk space more efficiently. More...
 
svn_error_tsvn_fs_verify (const char *path, apr_hash_t *fs_config, svn_revnum_t start, svn_revnum_t end, svn_fs_progress_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *scratch_pool)
 Perform backend-specific data consistency and correctness validations to the Subversion filesystem (mainly the meta-data) located in the directory path. More...
 
svn_error_tsvn_fs_verify_root (svn_fs_root_t *root, apr_pool_t *scratch_pool)
 Perform backend-specific data consistency and correctness validations of root in the Subversion filesystem fs. More...
 

Filesystem configuration options

#define SVN_FS_CONFIG_BDB_TXN_NOSYNC   "bdb-txn-nosync"
 
#define SVN_FS_CONFIG_BDB_LOG_AUTOREMOVE   "bdb-log-autoremove"
 
#define SVN_FS_CONFIG_FSFS_CACHE_DELTAS   "fsfs-cache-deltas"
 Enable / disable text delta caching for a FSFS repository. More...
 
#define SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS   "fsfs-cache-fulltexts"
 Enable / disable full-text caching for a FSFS repository. More...
 
#define SVN_FS_CONFIG_FSFS_CACHE_REVPROPS   "fsfs-cache-revprops"
 Enable / disable revprop caching for a FSFS repository. More...
 
#define SVN_FS_CONFIG_FSFS_CACHE_NS   "fsfs-cache-namespace"
 Select the cache namespace. More...
 
#define SVN_FS_CONFIG_FSFS_CACHE_NODEPROPS   "fsfs-cache-nodeprops"
 Enable / disable caching of node properties for a FSFS repository. More...
 
#define SVN_FS_CONFIG_FSFS_BLOCK_READ   "fsfs-block-read"
 Enable / disable the FSFS format 7 "block read" feature. More...
 
#define SVN_FS_CONFIG_FSFS_SHARD_SIZE   "fsfs-shard-size"
 String with a decimal representation of the FSFS format shard size. More...
 
#define SVN_FS_CONFIG_FSFS_LOG_ADDRESSING   "fsfs-log-addressing"
 Enable / disable the FSFS format 7 logical addressing feature for a newly created repository. More...
 
#define SVN_FS_CONFIG_FS_TYPE   "fs-type"
 Select the filesystem type. More...
 
#define SVN_FS_CONFIG_PRE_1_4_COMPATIBLE   "pre-1.4-compatible"
 Create repository format compatible with Subversion versions earlier than 1.4. More...
 
#define SVN_FS_CONFIG_PRE_1_5_COMPATIBLE   "pre-1.5-compatible"
 Create repository format compatible with Subversion versions earlier than 1.5. More...
 
#define SVN_FS_CONFIG_PRE_1_6_COMPATIBLE   "pre-1.6-compatible"
 Create repository format compatible with Subversion versions earlier than 1.6. More...
 
#define SVN_FS_CONFIG_PRE_1_8_COMPATIBLE   "pre-1.8-compatible"
 Create repository format compatible with Subversion versions earlier than 1.8. More...
 
#define SVN_FS_CONFIG_COMPATIBLE_VERSION   "compatible-version"
 Create repository format compatible with the specified Subversion release. More...
 
#define SVN_FS_CONFIG_NO_FLUSH_TO_DISK   "no-flush-to-disk"
 Specifies whether the filesystem should be forcing a physical write of the data to disk. More...
 

Detailed Description

Macro Definition Documentation

#define SVN_FS_CONFIG_COMPATIBLE_VERSION   "compatible-version"

Create repository format compatible with the specified Subversion release.

The value must be a version in the same format as SVN_VER_NUMBER and cannot exceed the current version.

Note
The patch component would often be ignored, due to our forward compatibility promises within minor release lines. It should therefore usually be set to 0.
Since
New in 1.9.

Definition at line 215 of file svn_fs.h.

#define SVN_FS_CONFIG_FS_TYPE   "fs-type"

Select the filesystem type.

See also svn_fs_type().

Since
New in 1.1.

Definition at line 175 of file svn_fs.h.

#define SVN_FS_CONFIG_FSFS_BLOCK_READ   "fsfs-block-read"

Enable / disable the FSFS format 7 "block read" feature.

Since
New in 1.9.

Definition at line 147 of file svn_fs.h.

#define SVN_FS_CONFIG_FSFS_CACHE_DELTAS   "fsfs-cache-deltas"

Enable / disable text delta caching for a FSFS repository.

Since
New in 1.7.

Definition at line 104 of file svn_fs.h.

#define SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS   "fsfs-cache-fulltexts"

Enable / disable full-text caching for a FSFS repository.

Since
New in 1.7.

Definition at line 110 of file svn_fs.h.

#define SVN_FS_CONFIG_FSFS_CACHE_NODEPROPS   "fsfs-cache-nodeprops"

Enable / disable caching of node properties for a FSFS repository.

Since
New in 1.10.

Definition at line 141 of file svn_fs.h.

#define SVN_FS_CONFIG_FSFS_CACHE_NS   "fsfs-cache-namespace"

Select the cache namespace.

If you potentially share the cache with another FS object for the same repository, objects read through one FS will not need to be read again for the other. In most cases, that is a very desirable behavior and the default is, therefore, an empty namespace.

If you want to be sure that your FS instance will actually read all requested data at least once, you need to specify a separate namespace for it. All repository verification code, for instance, should use some GUID here that is different each time you open an FS instance.

Since
New in 1.8.

Definition at line 135 of file svn_fs.h.

#define SVN_FS_CONFIG_FSFS_CACHE_REVPROPS   "fsfs-cache-revprops"

Enable / disable revprop caching for a FSFS repository.

"2" is allowed, too and means "enable if efficient", i.e. this will not create warning at runtime if there is no efficient support for revprop caching.

Since
New in 1.8.

Definition at line 120 of file svn_fs.h.

#define SVN_FS_CONFIG_FSFS_LOG_ADDRESSING   "fsfs-log-addressing"

Enable / disable the FSFS format 7 logical addressing feature for a newly created repository.

This option will only be used during the creation of new repositories and is otherwise ignored.

Since
New in 1.9.

Definition at line 167 of file svn_fs.h.

#define SVN_FS_CONFIG_FSFS_SHARD_SIZE   "fsfs-shard-size"

String with a decimal representation of the FSFS format shard size.

Zero ("0") means that a repository with linear layout should be created.

This option will only be used during the creation of new repositories and is otherwise ignored.

Since
New in 1.9.

Definition at line 157 of file svn_fs.h.

#define SVN_FS_CONFIG_NO_FLUSH_TO_DISK   "no-flush-to-disk"

Specifies whether the filesystem should be forcing a physical write of the data to disk.

Enabling the option allows the filesystem to return from the API calls without forcing the write to disk. If this option is disabled, the changes are always written to disk.

Note
Avoiding the forced write to disk usually is more efficient, but doesn't guarantee data integrity after a system crash or power failure and should be used with caution.
Since
New in 1.10.

Definition at line 228 of file svn_fs.h.

#define SVN_FS_CONFIG_PRE_1_4_COMPATIBLE   "pre-1.4-compatible"

Create repository format compatible with Subversion versions earlier than 1.4.

Since
New in 1.4.

Definition at line 182 of file svn_fs.h.

#define SVN_FS_CONFIG_PRE_1_5_COMPATIBLE   "pre-1.5-compatible"

Create repository format compatible with Subversion versions earlier than 1.5.

Since
New in 1.5.

Definition at line 189 of file svn_fs.h.

#define SVN_FS_CONFIG_PRE_1_6_COMPATIBLE   "pre-1.6-compatible"

Create repository format compatible with Subversion versions earlier than 1.6.

Since
New in 1.6.

Definition at line 196 of file svn_fs.h.

#define SVN_FS_CONFIG_PRE_1_8_COMPATIBLE   "pre-1.8-compatible"

Create repository format compatible with Subversion versions earlier than 1.8.

Since
New in 1.8.

Definition at line 203 of file svn_fs.h.

Typedef Documentation

The type of a Subversion directory entry.

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

Callback for svn_fs_freeze().

Since
New in 1.8.

Definition at line 649 of file svn_fs.h.

An opaque node history object.

Definition at line 1789 of file svn_fs.h.

typedef void(* svn_fs_hotcopy_notify_t) (void *baton, svn_revnum_t start_revision, svn_revnum_t end_revision, apr_pool_t *scratch_pool)

The type of a hotcopy notification function.

start_revision and end_revision indicate the copied revision range. baton is the corresponding baton for the notification function, and scratch_pool can be used for temporary allocations, but will be cleared between invocations.

Definition at line 529 of file svn_fs.h.

typedef svn_error_t*(* svn_fs_mergeinfo_receiver_t) (const char *path, svn_mergeinfo_t mergeinfo, void *baton, apr_pool_t *scratch_pool)

Receives parsed mergeinfo for the file system path path.

The user-provided baton is being passed through by the retrieval function and scratch_pool will be cleared between invocations.

Since
New in 1.10.

Definition at line 2173 of file svn_fs.h.

The kind of action being taken by 'pack'.

typedef svn_error_t*(* svn_fs_pack_notify_t) (void *baton, apr_int64_t shard, svn_fs_pack_notify_action_t action, apr_pool_t *pool)

The type of a pack notification function.

shard is the shard being acted upon; action is the type of action being performed. baton is the corresponding baton for the notification function, and pool can be used for temporary allocations, but will be cleared between invocations.

Definition at line 3298 of file svn_fs.h.

typedef svn_error_t*(* svn_fs_process_contents_func_t) (const unsigned char *contents, apr_size_t len, void *baton, apr_pool_t *scratch_pool)

Callback function type used with svn_fs_try_process_file_contents() that delivers the immutable, non-NULL contents of len bytes.

baton is an implementation-specific closure.

Use scratch_pool for allocations.

Since
New in 1.8.

Definition at line 2515 of file svn_fs.h.

typedef void(* svn_fs_progress_notify_func_t) (svn_revnum_t revision, void *baton, apr_pool_t *pool)

Callback function type for progress notification.

revision is the number of the revision currently being processed, SVN_INVALID_REVNUM if the current stage is not linked to any specific revision. baton is the callback baton.

Since
New in 1.8.

Definition at line 461 of file svn_fs.h.

typedef struct svn_fs_t svn_fs_t

An object representing a Subversion filesystem.

Definition at line 66 of file svn_fs.h.

The kind of action being taken by 'upgrade'.

Since
New in 1.9.
typedef svn_error_t*(* svn_fs_upgrade_notify_t) (void *baton, apr_uint64_t number, svn_fs_upgrade_notify_action_t action, apr_pool_t *scratch_pool)

The type of an upgrade notification function.

number is specifc to action (see svn_fs_upgrade_notify_action_t); action is the type of action being performed. baton is the corresponding baton for the notification function, and scratch_pool can be used for temporary allocations, but will be cleared between invocations.

Since
New in 1.9.

Definition at line 405 of file svn_fs.h.

typedef void(* svn_fs_warning_callback_t) (void *baton, svn_error_t *err)

The type of a warning callback function.

baton is the value specified in the call to svn_fs_set_warning_func(); the filesystem passes it through to the callback. err contains the warning message.

The callback function should not clear the error that is passed to it; its caller should do that.

Definition at line 266 of file svn_fs.h.

Enumeration Type Documentation

The kind of action being taken by 'pack'.

Enumerator
svn_fs_pack_notify_start 

packing of the shard has commenced

svn_fs_pack_notify_end 

packing of the shard is completed

svn_fs_pack_notify_start_revprop 

packing of the shard revprops has commenced

Since
New in 1.7.
svn_fs_pack_notify_end_revprop 

packing of the shard revprops has completed

Since
New in 1.7.
svn_fs_pack_notify_noop 

pack has been a no-op for this repository.

The next / future packable shard will be given. If the shard is -1, then the repository does not support packing at all.

Since
New in 1.10.

Definition at line 3269 of file svn_fs.h.

The kind of action being taken by 'upgrade'.

Since
New in 1.9.
Enumerator
svn_fs_upgrade_pack_revprops 

Packing of the revprop shard has completed.

The number parameter is the shard being processed.

svn_fs_upgrade_cleanup_revprops 

Removal of the non-packed revprop shard is completed.

The number parameter is the shard being processed

svn_fs_upgrade_format_bumped 

DB format has been set to the new value.

The number parameter is the new format number.

Definition at line 382 of file svn_fs.h.

Function Documentation

svn_error_t* svn_fs_apply_text ( svn_stream_t **  contents_p,
svn_fs_root_t root,
const char *  path,
const char *  result_checksum,
apr_pool_t *  pool 
)

Write data directly to the file path in root.

root must be the root of a transaction, not a revision.

Set *contents_p to a stream ready to receive full textual data. When the caller closes this stream, the data replaces the previous contents of the file. The caller must write all file data and close the stream before making further changes to the transaction.

If path does not exist in root, return an error. (You cannot use this routine to create new files; use svn_fs_make_file() to create an empty file first.)

result_checksum is the hex MD5 digest for the final fulltext written to the stream. It is ignored if NULL, but if not null, it must match the checksum of the result; if it does not, then the *contents_p call which detects the mismatch will return the error SVN_ERR_CHECKSUM_MISMATCH.

Do any necessary temporary allocation in pool.

Note
This is like svn_fs_apply_textdelta(), but takes the text straight.
svn_error_t* svn_fs_apply_textdelta ( svn_txdelta_window_handler_t contents_p,
void **  contents_baton_p,
svn_fs_root_t root,
const char *  path,
const char *  base_checksum,
const char *  result_checksum,
apr_pool_t *  pool 
)

Apply a text delta to the file path in root.

root must be the root of a transaction, not a revision.

Set *contents_p to a function ready to receive text delta windows describing how to change the file's contents, relative to its current contents. Set *contents_baton_p to a baton to pass to *contents_p.

If path does not exist in root, return an error. (You cannot use this routine to create new files; use svn_fs_make_file() to create an empty file first.)

base_checksum is the hex MD5 digest for the base text against which the delta is to be applied; it is ignored if NULL, and may be ignored even if not NULL. If it is not ignored, it must match the checksum of the base text against which svndiff data is being applied; if not, svn_fs_apply_textdelta() or the *contents_p call which detects the mismatch will return the error SVN_ERR_CHECKSUM_MISMATCH (if there is no base text, there may still be an error if base_checksum is neither NULL nor the checksum of the empty string).

result_checksum is the hex MD5 digest for the fulltext that results from this delta application. It is ignored if NULL, but if not NULL, it must match the checksum of the result; if it does not, then the *contents_p call which detects the mismatch will return the error SVN_ERR_CHECKSUM_MISMATCH.

The caller must send all delta windows including the terminating NULL window to *contents_p before making further changes to the transaction.

Do temporary allocation in pool.

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

Change a node's property's value, or add/delete a property.

  • root and path indicate the node whose property should change. root must be the root of a transaction, not the root of a revision.
  • name is the name of the property to change.
  • value is the new value of the property, or zero if the property should be removed altogether. Do any necessary temporary allocation in pool.
svn_error_t* svn_fs_change_rev_prop ( svn_fs_t fs,
svn_revnum_t  rev,
const char *  name,
const svn_string_t value,
apr_pool_t *  pool 
)

Similar to svn_fs_change_rev_prop2(), but with old_value_p passed as NULL.

Deprecated:
Provided for backward compatibility with the 1.6 API.
svn_error_t* svn_fs_change_rev_prop2 ( svn_fs_t fs,
svn_revnum_t  rev,
const char *  name,
const svn_string_t *const *  old_value_p,
const svn_string_t value,
apr_pool_t *  pool 
)

Change a revision's property's value, or add/delete a property.

  • fs is a filesystem, and rev is the revision in that filesystem whose property should change.
  • name is the name of the property to change.
  • if old_value_p is not NULL, then changing the property will fail with error SVN_ERR_FS_PROP_BASEVALUE_MISMATCH if the present value of the property is not *old_value_p. (This is an atomic test-and-set). *old_value_p may be NULL, representing that the property must be not already set.
  • value is the new value of the property, or zero if the property should be removed altogether.

Note that revision properties are non-historied — you can change them after the revision has been committed. They are not protected via transactions.

Do any necessary temporary allocation in pool.

Since
New in 1.7.
svn_error_t* svn_fs_check_path ( svn_node_kind_t kind_p,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Set *kind_p to the type of node present at path under root.

If path does not exist under root, set *kind_p to svn_node_none. Use pool for temporary allocation.

svn_error_t* svn_fs_closest_copy ( svn_fs_root_t **  root_p,
const char **  path_p,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Set *root_p and *path_p to the revision root and path of the destination of the most recent copy event that caused path to exist where it does in root, or to NULL if no such copy exists.

*path_p might be a parent of path, rather than path itself. However, it will always be the deepest relevant path. That is, if a copy occurs underneath another copy in the same txn, this function makes sure to set *path_p to the longest copy destination path that is still a parent of or equal to path.

Values returned in *root_p and *path_p will be allocated from pool.

Since
New in 1.3.
apr_hash_t* svn_fs_config ( svn_fs_t fs,
apr_pool_t *  pool 
)

Return a shallow copy of the configuration parameters used to open fs, allocated in pool.

It may be NULL. The contents of the hash contents remains valid only for fs's lifetime.

Note
This is just what was passed to svn_fs_create() or svn_fs_open(). You may not modify it.
Since
New in 1.8.
svn_error_t* svn_fs_contents_changed ( svn_boolean_t changed_p,
svn_fs_root_t root1,
const char *  path1,
svn_fs_root_t root2,
const char *  path2,
apr_pool_t *  pool 
)

Check if the contents of two root/path combos have changed.

Set *changed_p to TRUE if the file contents at path1 under root1 differ from those at path2 under root2, or set it to FALSE if they are the same. Both paths must exist under their respective roots, and both roots must be in the same filesystem. Do any necessary temporary allocation in pool.

Note
svn_fs_contents_changed() was not designed to be used to detect when two files have different content, but really to detect when the contents of a given file have changed across two points in its history. For the purposes of preserving accurate history, certain bits of code (such as the repository dump code) need to care about this distinction. For example, it's not an error from the FS API point of view to call svn_fs_apply_textdelta() and explicitly set a file's contents to exactly what they were before the edit was made. We have a pair of functions that can answer both of these questions, svn_fs_contents_changed() and svn_fs_contents_different(). See issue 4598 for more details.
See also
svn_fs_contents_different
svn_error_t* svn_fs_contents_different ( svn_boolean_t different_p,
svn_fs_root_t root1,
const char *  path1,
svn_fs_root_t root2,
const char *  path2,
apr_pool_t *  scratch_pool 
)

Check if the contents of two root/path combos are different.

Set *different_p to TRUE if the file contents at path1 under root1 differ from those at path2 under root2, or set it to FALSE if they are the same. Both paths must exist under their respective roots, and both roots must be in the same filesystem. Do any necessary temporary allocation in scratch_pool.

Note
For the purposes of preserving accurate history, certain bits of code (such as the repository dump code) need to care about the distinction between situations when two files have "different" content and when the contents of a given file "have changed" across two points in its history. We have a pair of functions that can answer both of these questions, svn_fs_contents_different() and svn_fs_contents_changed(). See issue 4598 for more details.
See also
svn_fs_contents_changed
Since
New in 1.9.
svn_error_t* svn_fs_copied_from ( svn_revnum_t rev_p,
const char **  path_p,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Discover a node's copy ancestry, if any.

If the node at path in root was copied from some other node, set *rev_p and *path_p to the revision and path (expressed as an absolute filesystem path) of the other node, allocating *path_p in pool.

Else if there is no copy ancestry for the node, set *rev_p to SVN_INVALID_REVNUM and *path_p to NULL.

If an error is returned, the values of *rev_p and *path_p are undefined, but otherwise, if one of them is set as described above, you may assume the other is set correspondingly.

root may be a revision root or a transaction root.

Notes:

  • Copy ancestry does not descend. After copying directory D to E, E will have copy ancestry referring to D, but E's children may not. See also svn_fs_copy().
  • Copy ancestry under a copy is preserved. That is, if you copy /A/D/G/pi to /A/D/G/pi2, and then copy /A/D/G to /G, then /G/pi2 will still have copy ancestry pointing to /A/D/G/pi. We don't know if this is a feature or a bug yet; if it turns out to be a bug, then the fix is to make svn_fs_copied_from() observe the following logic, which currently callers may choose to follow themselves: if node X has copy history, but its ancestor A also has copy history, then you may ignore X's history if X's revision-of-origin is earlier than A's – because that would mean that X's copy history was preserved in a copy-under-a-copy scenario. If X's revision-of-origin is the same as A's, then it was copied under A during the same transaction that created A. (X's revision-of-origin cannot be greater than A's, if X has copy history.)
    Todo:
    See how people like this, it can always be hidden behind the curtain if necessary.
  • Copy ancestry is not stored as a regular subversion property because it is not inherited. Copying foo to bar results in a revision of bar with copy ancestry; but committing a text change to bar right after that results in a new revision of bar without copy ancestry.
svn_error_t* svn_fs_copy ( svn_fs_root_t from_root,
const char *  from_path,
svn_fs_root_t to_root,
const char *  to_path,
apr_pool_t *  pool 
)

Create a copy of from_path in from_root named to_path in to_root.

If from_path in from_root is a directory, copy the tree it refers to recursively.

The copy will remember its source; use svn_fs_copied_from() to access this information.

to_root must be the root of a transaction; from_root must be the root of a revision. (Requiring from_root to be the root of a revision makes the implementation trivial: there is no detectable difference (modulo node revision ID's) between copying from and simply adding a reference to it. So the operation takes place in constant time. However, there's no reason not to extend this to mutable nodes — it's just more code.) Further, to_root and from_root must represent the same filesystem.

Note
To do a copy without preserving copy history, use svn_fs_revision_link().

Do any necessary temporary allocation in pool.

svn_error_t* svn_fs_create ( svn_fs_t **  fs_p,
const char *  path,
apr_hash_t *  fs_config,
apr_pool_t *  pool 
)

Like svn_fs_create2(), but without scratch_pool.

Deprecated:
Provided for backward compatibility with the 1.9 API.
Since
New in 1.1.
svn_error_t* svn_fs_create2 ( svn_fs_t **  fs_p,
const char *  path,
apr_hash_t *  fs_config,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Create a new, empty Subversion filesystem, stored in the directory path, and return a pointer to it in *fs_p.

path must not currently exist, but its parent must exist. If fs_config is not NULL, the options it contains modify the behavior of the filesystem. The interpretation of fs_config is specific to the filesystem back-end. The new filesystem may be closed by destroying result_pool.

Use scratch_pool for temporary allocations.

Note
The lifetime of fs_config must not be shorter than result_pool's. It's a good idea to allocate fs_config from result_pool or one of its ancestors.

If fs_config contains a value for SVN_FS_CONFIG_FS_TYPE, that value determines the filesystem type for the new filesystem. Currently defined values are:

SVN_FS_TYPE_BDB Berkeley-DB implementation SVN_FS_TYPE_FSFS Native-filesystem implementation SVN_FS_TYPE_FSX Experimental filesystem implementation

If fs_config is NULL or does not contain a value for SVN_FS_CONFIG_FS_TYPE then the default filesystem type will be used. This will typically be BDB for version 1.1 and FSFS for later versions, though the caller should not rely upon any particular default if they wish to ensure that a filesystem of a specific type is created.

Since
New in 1.10.
svn_error_t* svn_fs_delete ( svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Delete the node named path in root.

If the node being deleted is a directory, its contents will be deleted recursively. root must be the root of a transaction, not of a revision. Use pool for temporary allocation.

If return SVN_ERR_FS_NO_SUCH_ENTRY, then the basename of path is missing from its parent, that is, the final target of the deletion is missing.

Attempting to remove the root dir also results in an error, SVN_ERR_FS_ROOT_DIR, even if the dir is empty.

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

Delete the filesystem at path.

Note
: Deleting a filesystem that has an open svn_fs_t is not supported. Clear/destroy all pools used to create/open path. See issue 4264.
Since
New in 1.1.
svn_error_t* svn_fs_deltify_revision ( svn_fs_t fs,
svn_revnum_t  revision,
apr_pool_t *  pool 
)

Provide filesystem fs the opportunity to compress storage relating to associated with revision in filesystem fs.

Use pool for all allocations.

Note
This can be a time-consuming process, depending the breadth of the changes made in revision, and the depth of the history of those changed paths. This may also be a no op.
svn_error_t* svn_fs_dir_entries ( apr_hash_t **  entries_p,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Set *entries_p to a newly allocated APR hash table containing the entries of the directory at path in root.

The keys of the table are entry names, as byte strings, excluding the final NULL character; the table's values are pointers to svn_fs_dirent_t structures. Allocate the table and its contents in pool.

svn_error_t* svn_fs_dir_optimal_order ( apr_array_header_t **  ordered_p,
svn_fs_root_t root,
apr_hash_t *  entries,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Take the svn_fs_dirent_t structures in entries as returned by svn_fs_dir_entries for root and determine an optimized ordering in which data access would most likely be efficient.

Set *ordered_p to a newly allocated APR array of pointers to these svn_fs_dirent_t structures. Allocate the array (but not its contents) in result_pool and use scratch_pool for temporaries.

Since
New in 1.9.
svn_error_t* svn_fs_file_checksum ( svn_checksum_t **  checksum,
svn_checksum_kind_t  kind,
svn_fs_root_t root,
const char *  path,
svn_boolean_t  force,
apr_pool_t *  pool 
)

Set *checksum to the checksum of type kind for the file path.

*checksum will be allocated out of pool, which will also be used for temporary allocations.

If the filesystem does not have a prerecorded checksum of kind for path, and force is not TRUE, do not calculate a checksum dynamically, just put NULL into checksum. (By convention, the NULL checksum is considered to match any checksum.)

Notes:

You might wonder, why do we only provide this interface for file contents, and not for properties or directories?

The answer is that property lists and directory entry lists are essentially data structures, not text. We serialize them for transmission, but there is no guarantee that the consumer will parse them into the same form, or even the same order, as the producer. It's difficult to find a checksumming method that reaches the same result given such variation in input. (I suppose we could calculate an independent MD5 sum for each propname and value, and XOR them together; same with directory entry names. Maybe that's the solution?) Anyway, for now we punt. The most important data, and the only data that goes through svndiff processing, is file contents, so that's what we provide checksumming for.

Internally, of course, the filesystem checksums everything, because it has access to the lowest level storage forms: strings behind representations.

Since
New in 1.6.
svn_error_t* svn_fs_file_contents ( svn_stream_t **  contents,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Set *contents to a readable generic stream that will yield the contents of the file path in root.

Allocate the stream in pool. You can only use *contents for as long as the underlying filesystem is open. If path is not a file, return SVN_ERR_FS_NOT_FILE.

If root is the root of a transaction, it is possible that the contents of the file path will change between calls to svn_fs_file_contents(). In that case, the result of reading from *contents is undefined.

Todo:
kff: I am worried about lifetime issues with this pool vs the trail created farther down the call stack. Trace this function to investigate...
svn_error_t* svn_fs_file_length ( svn_filesize_t length_p,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Set *length_p to the length of the file path in root, in bytes.

Do any necessary temporary allocation in pool.

svn_error_t* svn_fs_file_md5_checksum ( unsigned char  digest[],
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Same as svn_fs_file_checksum(), only always put the MD5 checksum of file path into digest, which should point to APR_MD5_DIGESTSIZE bytes of storage.

If the checksum doesn't exist, put all 0's into digest.

Deprecated:
Provided for backward compatibility with the 1.5 API.
svn_error_t* svn_fs_freeze ( svn_fs_t fs,
svn_fs_freeze_func_t  freeze_func,
void *  freeze_baton,
apr_pool_t *  pool 
)

Take an exclusive lock on fs to prevent commits and then invoke freeze_func passing freeze_baton.

Note
freeze_func must not, directly or indirectly, call any function that attempts to take out a lock on the underlying repository. These include functions for packing, hotcopying, setting revprops and commits. Attempts to do so may result in a deadlock.
The BDB backend doesn't implement this feature so most callers should not call this function directly but should use the higher level svn_repos_freeze() instead.
See also
svn_repos_freeze()
Since
New in 1.8.
svn_error_t* svn_fs_get_file_delta_stream ( svn_txdelta_stream_t **  stream_p,
svn_fs_root_t source_root,
const char *  source_path,
svn_fs_root_t target_root,
const char *  target_path,
apr_pool_t *  pool 
)

Set *stream_p to a pointer to a delta stream that will turn the contents of the file source into the contents of the file target.

If source_root is zero, use a file with zero length as the source.

This function does not compare the two files' properties.

Allocate *stream_p, and do any necessary temporary allocation, in pool.

svn_error_t* svn_fs_get_mergeinfo ( svn_mergeinfo_catalog_t catalog,
svn_fs_root_t root,
const apr_array_header_t *  paths,
svn_mergeinfo_inheritance_t  inherit,
svn_boolean_t  include_descendants,
apr_pool_t *  pool 
)

Same as svn_fs_get_mergeinfo2(), but with adjust_inherited_mergeinfo set always set to TRUE and with only one pool.

Deprecated:
Provided for backward compatibility with the 1.5 API.
svn_error_t* svn_fs_get_mergeinfo2 ( svn_mergeinfo_catalog_t catalog,
svn_fs_root_t root,
const apr_array_header_t *  paths,
svn_mergeinfo_inheritance_t  inherit,
svn_boolean_t  include_descendants,
svn_boolean_t  adjust_inherited_mergeinfo,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Same as svn_fs_get_mergeinfo3(), but all mergeinfo is being collected and returned in *catalog.

It will never be NULL, but may be empty.

Since
New in 1.8.
Deprecated:
Provided for backward compatibility with the 1.9 API.
svn_error_t* svn_fs_get_mergeinfo3 ( svn_fs_root_t root,
const apr_array_header_t *  paths,
svn_mergeinfo_inheritance_t  inherit,
svn_boolean_t  include_descendants,
svn_boolean_t  adjust_inherited_mergeinfo,
svn_fs_mergeinfo_receiver_t  receiver,
void *  baton,
apr_pool_t *  scratch_pool 
)

Retrieve mergeinfo for multiple nodes.

For each node found with mergeinfo on it, invoke receiver with the provided baton.

root is revision root to use when looking up paths.

paths are the paths you are requesting information for.

inherit indicates whether to retrieve explicit, explicit-or-inherited, or only inherited mergeinfo.

If adjust_inherited_mergeinfo is TRUE, then any inherited mergeinfo reported to *receiver is normalized to represent the inherited mergeinfo on the path which inherits it. This adjusted mergeinfo is keyed by the path which inherits it. If adjust_inherited_mergeinfo is FALSE, then any inherited mergeinfo is the raw explicit mergeinfo from the nearest parent of the path with explicit mergeinfo, unadjusted for the path-wise difference between the path and its parent. This may include non-inheritable mergeinfo. This unadjusted mergeinfo is keyed by the path at which it was found.

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 reported to receiver.)

Do any necessary temporary allocations in scratch_pool.

Since
New in 1.10.
svn_error_t* svn_fs_get_uuid ( svn_fs_t fs,
const char **  uuid,
apr_pool_t *  pool 
)

Populate *uuid with the UUID associated with fs.

Allocate *uuid in pool.

svn_error_t* svn_fs_history_location ( const char **  path,
svn_revnum_t revision,
svn_fs_history_t history,
apr_pool_t *  pool 
)

Set *path and *revision to the path and revision, respectively, of the history object.

Use pool for all allocations.

svn_error_t* svn_fs_history_prev ( svn_fs_history_t **  prev_history_p,
svn_fs_history_t history,
svn_boolean_t  cross_copies,
apr_pool_t *  pool 
)

Same as svn_fs_history_prev2() but using a single pool for all allocations.

Deprecated:
Provided for backward compatibility with the 1.8 API.
svn_error_t* svn_fs_history_prev2 ( svn_fs_history_t **  prev_history_p,
svn_fs_history_t history,
svn_boolean_t  cross_copies,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Set *prev_history_p to an opaque node history object which represents the previous (or "next oldest") interesting history location for the filesystem node represented by history, or NULL if no such previous history exists.

If cross_copies is FALSE, also return NULL if stepping backwards in history to *prev_history_p would cross a filesystem copy operation.

Note
If this is the first call to svn_fs_history_prev() for the history object, it could return a history object whose location is the same as the original. This will happen if the original location was an interesting one (where the node was modified, or took place in a copy event). This behavior allows looping callers to avoid the calling svn_fs_history_location() on the object returned by svn_fs_node_history(), and instead go ahead and begin calling svn_fs_history_prev().
This function uses node-id ancestry alone to determine modifiedness, and therefore does NOT claim that in any of the returned revisions file contents changed, properties changed, directory entries lists changed, etc.
The revisions returned for path will be older than or the same age as the revision of that path in root. That is, if root is a revision root based on revision X, and path was modified in some revision(s) younger than X, those revisions younger than X will not be included for path.

Allocate the result in result_pool and use scratch_pool for temporary allocations.

Since
New in 1.9.
svn_error_t* svn_fs_hotcopy ( const char *  src_path,
const char *  dest_path,
svn_boolean_t  clean,
apr_pool_t *  pool 
)

Like svn_fs_hotcopy2(), but with incremental always passed as TRUE and without cancellation support.

Deprecated:
Provided for backward compatibility with the 1.7 API.
Since
New in 1.1.
svn_error_t* svn_fs_hotcopy2 ( const char *  src_path,
const char *  dest_path,
svn_boolean_t  clean,
svn_boolean_t  incremental,
svn_cancel_func_t  cancel_func,
void *  cancel_baton,
apr_pool_t *  scratch_pool 
)

Like svn_fs_hotcopy3(), but with notify_func and notify_baton always passed as NULL.

Deprecated:
Provided for backward compatibility with the 1.8 API.
Since
New in 1.8.
svn_error_t* svn_fs_hotcopy3 ( const char *  src_path,
const char *  dest_path,
svn_boolean_t  clean,
svn_boolean_t  incremental,
svn_fs_hotcopy_notify_t  notify_func,
void *  notify_baton,
svn_cancel_func_t  cancel_func,
void *  cancel_baton,
apr_pool_t *  scratch_pool 
)

Copy a possibly live Subversion filesystem from src_path to dest_path.

If clean 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 filesystem.

If incremental is TRUE, make an effort to avoid re-copying information already present in the destination where possible. If incremental hotcopy is not implemented, raise SVN_ERR_UNSUPPORTED_FEATURE.

For each revision range copied, notify_func will be called with staring and ending revision numbers (both inclusive and not necessarily different) and with the notify_baton. Currently, this notification is not triggered by the BDB backend. notify_func may be NULL if this notification is not required.

The optional cancel_func callback will be invoked with cancel_baton as usual to allow the user to preempt this potentially lengthy operation.

Use scratch_pool for temporary allocations.

Since
New in 1.9.
svn_error_t* svn_fs_info_config_files ( apr_array_header_t **  files,
svn_fs_t fs,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Return a list of admin-serviceable config files for fs.

*files will be set to an array containing paths as C strings.

Since
New in 1.9.
svn_error_t* svn_fs_info_format ( int *  fs_format,
svn_version_t **  supports_version,
svn_fs_t fs,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Return filesystem format information for fs.

Set *fs_format to the filesystem format number of fs, which is an integer that increases when incompatible changes are made (such as by svn_fs_upgrade).

Set *supports_version to the version number of the minimum Subversion GA release that can read and write fs.

See also
svn_repos_info_format
Since
New in 1.9.
svn_error_t* svn_fs_initialize ( apr_pool_t *  pool)

Callers should invoke this function to initialize global state in the FS library before creating FS objects.

If this function is invoked, no FS objects may be created in another thread at the same time as this invocation, and the provided pool must last longer than any FS object created subsequently.

If this function is not called, the FS library will make a best effort to bootstrap a mutex for protecting data common to FS objects; however, there is a small window of failure. Also, a small amount of data will be leaked if the Subversion FS library is dynamically unloaded, and using the bdb FS can potentially segfault or invoke other undefined behavior if this function is not called with an appropriate pool (such as the pool the module was loaded into) when loaded dynamically.

If this function is called multiple times before the pool passed to the first call is destroyed or cleared, the later calls will have no effect.

Since
New in 1.2.
svn_error_t* svn_fs_is_dir ( svn_boolean_t is_dir,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Set *is_dir to TRUE iff path in root is a directory.

Do any necessary temporary allocation in pool.

svn_error_t* svn_fs_is_file ( svn_boolean_t is_file,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Set *is_file to TRUE iff path in root is a file.

Do any necessary temporary allocation in pool.

svn_error_t* svn_fs_make_dir ( svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Create a new directory named path in root.

The new directory has no entries, and no properties. root must be the root of a transaction, not a revision.

Do any necessary temporary allocation in pool.

svn_error_t* svn_fs_make_file ( svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Create a new file named path in root.

The file's initial contents are the empty string, and it has no properties. root must be the root of a transaction, not a revision.

Do any necessary temporary allocation in pool.

svn_error_t* svn_fs_merge ( const char **  conflict_p,
svn_fs_root_t source_root,
const char *  source_path,
svn_fs_root_t target_root,
const char *  target_path,
svn_fs_root_t ancestor_root,
const char *  ancestor_path,
apr_pool_t *  pool 
)

Merge changes between two nodes into a third node.

Given nodes source and target, and a common ancestor ancestor, modify target to contain all the changes made between ancestor and source, as well as the changes made between ancestor and target. target_root must be the root of a transaction, not a revision.

source, target, and ancestor are generally directories; this function recursively merges the directories' contents. If they are files, this function simply returns an error whenever source, target, and ancestor are all distinct node revisions.

If there are differences between ancestor and source that conflict with changes between ancestor and target, this function returns an SVN_ERR_FS_CONFLICT error.

If the merge is successful, target is left in the merged state, and the base root of target's txn is set to the root node of source. If an error is returned (whether for conflict or otherwise), target is left unaffected.

If conflict_p is non-NULL, then: a conflict error sets *conflict_p to the name of the node in target which couldn't be merged, otherwise, success sets *conflict_p to NULL.

Do any necessary temporary allocation in pool.

svn_error_t* svn_fs_node_created_path ( const char **  created_path,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Set *created_path to the path at which path under root was created.

Use pool for all allocations. Callers may use this function in conjunction with svn_fs_node_created_rev() to perform a reverse lookup of the mapping of (path, revision) -> node-id that svn_fs_node_id() performs.

svn_error_t* svn_fs_node_created_rev ( svn_revnum_t revision,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Set *revision to the revision in which the node-revision identified by path under root was created; that is, to the revision in which path under root was last modified.

*revision will be set to SVN_INVALID_REVNUM for uncommitted nodes (i.e. modified nodes under a transaction root). Note that the root of an unmodified transaction is not itself considered to be modified; in that case, return the revision upon which the transaction was based.

Use pool for any temporary allocations.

svn_error_t* svn_fs_node_has_props ( svn_boolean_t has_props,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  scratch_pool 
)

Set *has_props to TRUE if the node path in root has properties and to FALSE if it doesn't have properties.

Perform temporary allocations in scratch_pool.

Since
New in 1.9.
svn_error_t* svn_fs_node_history ( svn_fs_history_t **  history_p,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Same as svn_fs_node_history2() but using a single pool for all allocations.

Deprecated:
Provided for backward compatibility with the 1.8 API.
svn_error_t* svn_fs_node_history2 ( svn_fs_history_t **  history_p,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Set *history_p to an opaque node history object which represents path under root.

root must be a revision root. Allocate the result in result_pool and use scratch_pool for temporary allocations.

Since
New in 1.9.
svn_error_t* svn_fs_node_id ( const svn_fs_id_t **  id_p,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Get the id of a node.

Set *id_p to the node revision ID of path in root, allocated in pool.

If root is the root of a transaction, keep in mind that other changes to the transaction can change which node path refers to, and even whether the path exists at all.

svn_error_t* svn_fs_node_origin_rev ( svn_revnum_t revision,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Set *revision to the revision in which the line of history represented by path under root originated.

Use pool for any temporary allocations. If root is a transaction root, *revision will be set to SVN_INVALID_REVNUM for any nodes newly added in that transaction (brand new files or directories created using svn_fs_make_dir or svn_fs_make_file).

Since
New in 1.5.
svn_error_t* svn_fs_node_prop ( svn_string_t **  value_p,
svn_fs_root_t root,
const char *  path,
const char *  propname,
apr_pool_t *  pool 
)

Set *value_p to the value of the property named propname of path in root.

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

svn_error_t* svn_fs_node_proplist ( apr_hash_t **  table_p,
svn_fs_root_t root,
const char *  path,
apr_pool_t *  pool 
)

Set *table_p to the entire property list of path in root, as an APR hash table allocated in pool.

The resulting table maps property names to pointers to svn_string_t objects containing the property value.

svn_error_t* svn_fs_node_relation ( svn_fs_node_relation_t relation,
svn_fs_root_t root_a,
const char *  path_a,
svn_fs_root_t root_b,
const char *  path_b,
apr_pool_t *  scratch_pool 
)

Determine how path_a under root_a and path_b under root_b are related and return the result in relation.

There is no restriction concerning the roots: They may refer to different repositories, be in arbitrary revision order and any of them may pertain to a transaction. scratch_pool is used for temporary allocations.

Note
Paths from different svn_fs_t will be reported as unrelated even if the underlying physical repository is the same.
Since
New in 1.9.
svn_error_t* svn_fs_open ( svn_fs_t **  fs_p,
const char *  path,
apr_hash_t *  fs_config,
apr_pool_t *  pool 
)

Like svn_fs_open2(), but without scratch_pool.

Deprecated:
Provided for backward compatibility with the 1.8 API.
Since
New in 1.1.
svn_error_t* svn_fs_open2 ( svn_fs_t **  fs_p,
const char *  path,
apr_hash_t *  fs_config,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Open a Subversion filesystem located in the directory path, and return a pointer to it in *fs_p.

If fs_config is not NULL, the options it contains modify the behavior of the filesystem. The interpretation of fs_config is specific to the filesystem back-end. The opened filesystem will be allocated in result_pool may be closed by clearing or destroying that pool. Use scratch_pool for temporary allocations.

Note
The lifetime of fs_config must not be shorter than result_pool's. It's a good idea to allocate fs_config from result_pool or one of its ancestors.

Only one thread may operate on any given filesystem object at once. Two threads may access the same filesystem simultaneously only if they open separate filesystem objects.

Note
You probably don't want to use this directly. Take a look at svn_repos_open3() instead.
Since
New in 1.9.
svn_error_t* svn_fs_pack ( const char *  db_path,
svn_fs_pack_notify_t  notify_func,
void *  notify_baton,
svn_cancel_func_t  cancel_func,
void *  cancel_baton,
apr_pool_t *  pool 
)

Possibly update the filesystem located in the directory path to use disk space more efficiently.

Since
New in 1.6.
const char* svn_fs_path ( svn_fs_t fs,
apr_pool_t *  pool 
)

Return the path to fs's repository, allocated in pool.

Note
This is just what was passed to svn_fs_create() or svn_fs_open() – might be absolute, might not.
Since
New in 1.1.
svn_error_t* svn_fs_print_modules ( svn_stringbuf_t output,
apr_pool_t *  pool 
)

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

Third-party modules are only included if repository access has caused them to be loaded.

Since
New in 1.2.
svn_error_t* svn_fs_props_changed ( svn_boolean_t changed_p,
svn_fs_root_t root1,
const char *  path1,
svn_fs_root_t root2,
const char *  path2,
apr_pool_t *  pool 
)

Determine if the properties of two path/root combinations have changed.

Set *changed_p to TRUE if the properties at path1 under root1 differ from those at path2 under root2, or set it to FALSE if they are the same. Both paths must exist under their respective roots, and both roots must be in the same filesystem. Do any necessary temporary allocation in pool.

Note
For the purposes of preserving accurate history, certain bits of code (such as the repository dump code) need to care about the distinction between situations when the properties are "different" and "have changed across two points in history". We have a pair of functions that can answer both of these questions, svn_fs_props_different() and svn_fs_props_changed(). See issue 4598 for more details.
This function can currently return false negatives for FSFS: If root1 and root2 were both transaction roots and the proplists of both paths had been changed in their respective transactions, changed_p would be set to FALSE.
See also
svn_fs_props_different
svn_error_t* svn_fs_props_different ( svn_boolean_t different_p,
svn_fs_root_t root1,
const char *  path1,
svn_fs_root_t root2,
const char *  path2,
apr_pool_t *  scratch_pool 
)

Determine if the properties of two path/root combinations are different.

Set *different_p to TRUE if the properties at path1 under root1 differ from those at path2 under root2, or set it to FALSE if they are the same. Both paths must exist under their respective roots, and both roots must be in the same filesystem. Do any necessary temporary allocation in scratch_pool.

Note
For the purposes of preserving accurate history, certain bits of code (such as the repository dump code) need to care about the distinction between situations when the properties are "different" and "have changed across two points in history". We have a pair of functions that can answer both of these questions, svn_fs_props_different() and svn_fs_props_changed(). See issue 4598 for more details.
See also
svn_fs_props_changed
Since
New in 1.9.
svn_error_t* svn_fs_recover ( const char *  path,
svn_cancel_func_t  cancel_func,
void *  cancel_baton,
apr_pool_t *  pool 
)

Perform any necessary non-catastrophic recovery on the Subversion filesystem located at path.

If cancel_func is not NULL, it is called periodically with cancel_baton as argument to see if the client wishes to cancel recovery. BDB filesystems do not currently support cancellation.

Do any necessary allocation within pool.

For FSFS filesystems, recovery is currently limited to recreating the db/current file, and does not require exclusive access.

For BDB filesystems, recovery requires exclusive access, and is described in detail below.

After an unexpected server exit, due to a server crash or a system crash, a Subversion filesystem based on Berkeley DB needs to run recovery procedures to bring the database back into a consistent state and release any locks that were held by the deceased process. The recovery procedures require exclusive access to the database — while they execute, no other process or thread may access the database.

In a server with multiple worker processes, like Apache, if a worker process accessing the filesystem dies, you must stop the other worker processes, and run recovery. Then, the other worker processes can re-open the database and resume work.

If the server exited cleanly, there is no need to run recovery, but there is no harm in it, either, and it take very little time. So it's a fine idea to run recovery when the server process starts, before it begins handling any requests.

Since
New in 1.5.
svn_error_t* svn_fs_refresh_revision_props ( svn_fs_t fs,
apr_pool_t *  scratch_pool 
)

Make sure that all completed revision property changes to the filesystem underlying fs are actually visible through fs.

Use scratch_pool for temporary allocations.

This is an explicit synchronization barrier for revprop changes made through different svn_fs_t for the same underlying filesystem. Any revprop change through fs acts as an implicit barrier, i.e. that object will see all completed revprop changes up to an including its own. Only svn_fs_revision_prop2 and svn_fs_revision_proplist2 have an option to not synchronize with on-disk data and potentially return outdated data as old as the last barrier.

The intended use of this is implementing efficient queries in upper layers where the result only needs to include all changes up to the start of that query but does not need to pick up on changes while the query is running:

1 SVN_ERR(svn_fs_deltify_revision(fs, pool);
2 for (i = 0; i < n; i++)
3  SVN_ERR(svn_fs_revision_prop2(&authors[i], fs, revs[i], "svn:author",
4  FALSE, pool, pool));
See also
svn_fs_revision_prop2, svn_fs_revision_proplist2
Since
New in 1.10.
svn_error_t* svn_fs_revision_link ( svn_fs_root_t from_root,
svn_fs_root_t to_root,
const char *  path,
apr_pool_t *  pool 
)

Like svn_fs_copy(), but doesn't record copy history, and preserves the PATH.

You cannot use svn_fs_copied_from() later to find out where this copy came from.

Use svn_fs_revision_link() in situations where you don't care about the copy history, and where to_path and from_path are the same, because it is cheaper than svn_fs_copy().

svn_error_t* svn_fs_revision_prop ( svn_string_t **  value_p,
svn_fs_t fs,
svn_revnum_t  rev,
const char *  propname,
apr_pool_t *  pool 
)

Like svn_fs_revision_prop2 but using pool for scratch_pool as well as result_pool and setting refresh to TRUE.

See also
svn_fs_refresh_revision_props
Deprecated:
For backward compatibility with 1.9.
svn_error_t* svn_fs_revision_prop2 ( svn_string_t **  value_p,
svn_fs_t fs,
svn_revnum_t  rev,
const char *  propname,
svn_boolean_t  refresh,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

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

If rev has no property by that name, set *value_p to zero.

If refresh is set, this call acts as a read barrier and is guaranteed to return the latest value. Otherwise, it may return data as old as the last synchronization point but can be much faster to access - in particular for packed repositories.

Allocate the result in result_pool and use scratch_pool for temporary allocations.

See also
svn_fs_refresh_revision_props
Since
New in 1.10.
svn_error_t* svn_fs_revision_proplist ( apr_hash_t **  table_p,
svn_fs_t fs,
svn_revnum_t  rev,
apr_pool_t *  pool 
)

Like svn_fs_revision_proplist2 but using pool for scratch_pool as well as result_pool and setting refresh to TRUE.

See also
svn_fs_refresh_revision_props
Deprecated:
For backward compatibility with 1.9.
svn_error_t* svn_fs_revision_proplist2 ( apr_hash_t **  table_p,
svn_fs_t fs,
svn_revnum_t  rev,
svn_boolean_t  refresh,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Set *table_p to the entire property list of revision rev in filesystem fs, as an APR hash table allocated in pool.

The table maps char * property names to svn_string_t * values; the names and values are allocated in result_pool. Use scratch_pool for temporary allocations.

If refresh is set, this call acts as a read barrier and is guaranteed to return the latest value. Otherwise, it may return data as old as the last synchronization point but can be much faster to access - in particular for packed repositories.

See also
svn_fs_refresh_revision_props
Since
New in 1.10.
svn_error_t* svn_fs_set_uuid ( svn_fs_t fs,
const char *  uuid,
apr_pool_t *  pool 
)

If not NULL, associate *uuid with fs.

Otherwise (if uuid is NULL), generate a new UUID for fs. Use pool for any scratch work.

void svn_fs_set_warning_func ( svn_fs_t fs,
svn_fs_warning_callback_t  warning,
void *  warning_baton 
)

Provide a callback function, warning, that fs should use to report (non-fatal) errors.

To print an error, the filesystem will call warning, passing it warning_baton and the error.

By default, this is set to a function that will crash the process. Dumping to stderr or /dev/tty is not acceptable default behavior for server processes, since those may both be equivalent to /dev/null.

svn_error_t* svn_fs_try_process_file_contents ( svn_boolean_t success,
svn_fs_root_t root,
const char *  path,
svn_fs_process_contents_func_t  processor,
void *  baton,
apr_pool_t *  pool 
)

Efficiently deliver the contents of the file path in root via processor (with baton), setting *success to TRUE upon doing so.

Use pool for allocations.

This function is intended to support zero copy data processing. It may not be implemented for all data backends or not be applicable for certain content. In those cases, *success will always be FALSE. Also, this is a best-effort function which means that there is no guarantee that processor gets called at all.

Note
processor is expected to be a relatively simple function with a runtime of O(content size) or less.
Since
New in 1.8.
svn_error_t* svn_fs_type ( const char **  fs_type,
const char *  path,
apr_pool_t *  pool 
)

Return, in *fs_type, a string identifying the back-end type of the Subversion filesystem located in path.

Allocate *fs_type in pool.

The string should be equal to one of the SVN_FS_TYPE_* defined constants, unless the filesystem is a new back-end type added in a later version of Subversion.

In general, the type should make no difference in the filesystem's semantics, but there are a few situations (such as backups) where it might matter.

Since
New in 1.3.
svn_error_t* svn_fs_upgrade ( const char *  path,
apr_pool_t *  pool 
)

Like svn_fs_upgrade2 but with notify_func, notify_baton, cancel_func and cancel_baton being set to NULL.

Deprecated:
Provided for backward compatibility with the 1.8 API.
Since
New in 1.5.
svn_error_t* svn_fs_upgrade2 ( const char *  path,
svn_fs_upgrade_notify_t  notify_func,
void *  notify_baton,
svn_cancel_func_t  cancel_func,
void *  cancel_baton,
apr_pool_t *  scratch_pool 
)

Upgrade the Subversion filesystem located in the directory path to the latest version supported by this library.

Return SVN_ERR_FS_UNSUPPORTED_UPGRADE and make no changes to the filesystem if the requested upgrade is not supported. Use scratch_pool for temporary allocations.

The optional notify_func callback is only a general feedback that the operation is still in process but may be called in e.g. random shard order and more than once for the same shard.

The optional cancel_func callback will be invoked as usual to allow the user to preempt this potentially lengthy operation.

Note
You probably don't want to use this directly. Take a look at svn_repos_upgrade2() instead.
Canceling an upgrade is legal but may leave remnants of previous format data that may not be cleaned up automatically by later calls.
Since
New in 1.9.
svn_error_t* svn_fs_verify ( const char *  path,
apr_hash_t *  fs_config,
svn_revnum_t  start,
svn_revnum_t  end,
svn_fs_progress_notify_func_t  notify_func,
void *  notify_baton,
svn_cancel_func_t  cancel_func,
void *  cancel_baton,
apr_pool_t *  scratch_pool 
)

Perform backend-specific data consistency and correctness validations to the Subversion filesystem (mainly the meta-data) located in the directory path.

Use the backend-specific configuration fs_config when opening the filesystem. NULL is valid for all backends. Use scratch_pool for temporary allocations.

start and end define the (minimum) range of revisions to check. If start is SVN_INVALID_REVNUM, it defaults to r0. Likewise, end will default to the current youngest repository revision when given as SVN_INVALID_REVNUM. Since meta data checks may have to touch other revisions as well, you may receive notifications for revisions outside the specified range. In fact, it is perfectly legal for a FS implementation to always check all revisions.

Global invariants are only guaranteed to get verified when r0 has been included in the range of revisions to check.

The optional notify_func callback is only a general feedback that the operation is still in process but may be called in random revisions order and more than once for the same revision, i.e. r2, r1, r2 would be a valid sequence.

The optional cancel_func callback will be invoked as usual to allow the user to preempt this potentially lengthy operation.

Note
You probably don't want to use this directly. Take a look at svn_repos_verify_fs2() instead, which does non-backend-specific verifications as well.
To ensure a full verification using all tests and covering all revisions, you must call this function and svn_fs_verify_root.
Implementors, please do tests that can be done efficiently for a single revision in svn_fs_verify_root. This function is meant for global checks or tests that require an expensive context setup.
See also
svn_repos_verify_fs2()
svn_fs_verify_root()
Since
New in 1.8.
svn_error_t* svn_fs_verify_root ( svn_fs_root_t root,
apr_pool_t *  scratch_pool 
)

Perform backend-specific data consistency and correctness validations of root in the Subversion filesystem fs.

root is typically a revision root (see svn_fs_revision_root()), but may be a transaction root. Use scratch_pool for temporary allocations.

Note
You probably don't want to use this directly. Take a look at svn_repos_verify_fs2() instead, which does non-backend-specific verifications as well.
To ensure a full verification using all available tests and covering all revisions, you must call both this function and svn_fs_verify.
Implementors, please perform tests that cannot be done efficiently for a single revision in svn_fs_verify. This function is intended for local checks that don't require an expensive context setup.
See also
svn_repos_verify_fs2()
svn_fs_verify()
Since
New in 1.8.
svn_error_t* svn_fs_youngest_rev ( svn_revnum_t youngest_p,
svn_fs_t fs,
apr_pool_t *  pool 
)

Set *youngest_p to the number of the youngest revision in filesystem fs.

Use pool for all temporary allocation.

The oldest revision in any filesystem is numbered zero.