Main Page | Modules | Data Structures | File List | Data Fields | Globals

svn_repos.h File Reference

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

#include <apr_pools.h>
#include <apr_hash.h>
#include "svn_fs.h"
#include "svn_delta.h"
#include "svn_types.h"
#include "svn_error.h"

Go to the source code of this file.

Data Structures

struct  svn_repos_node_t
 A node in the repository. More...

struct  svn_repos_parse_fns_t
 A vtable that is driven by svn_repos_parse_dumpstream. More...


Defines

#define SVN_REPOS_DUMPFILE_MAGIC_HEADER   "SVN-fs-dump-format-version"
#define SVN_REPOS_DUMPFILE_FORMAT_VERSION   2
#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_CHECKSUM   "Text-copy-source-md5"
#define SVN_REPOS_DUMPFILE_TEXT_CONTENT_CHECKSUM   "Text-content-md5"
#define SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH   "Prop-content-length"
#define SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH   "Text-content-length"

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

typedef svn_repos_t svn_repos_t
 The repository object.

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

typedef svn_repos_node_t svn_repos_node_t
 A node in the repository.

typedef svn_repos_parse_fns_t svn_repos_parser_fns_t
 A vtable that is driven by svn_repos_parse_dumpstream.


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.

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.


Functions

const char * svn_repos_find_root_path (const char *path, apr_pool_t *pool)
 Find the root path of the repository that contains path.

svn_error_tsvn_repos_open (svn_repos_t **repos_p, const char *path, apr_pool_t *pool)
 Set *repos_p to a repository object for the repository at path.

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 Berkeley DB filesystem environment, and so on.

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_fs_tsvn_repos_fs (svn_repos_t *repos)
 Return the filesystem associated with repository object repos.

svn_error_tsvn_repos_hotcopy (const char *src_path, const char *dst_path, svn_boolean_t clean_logs, apr_pool_t *pool)
 Make a hot copy of the Subversion repository found at src_path to dst_path.

svn_error_tsvn_repos_recover (const char *path, apr_pool_t *pool)
 Run database recovery procedures on the repository at path, returning the database to a consistent state.

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.

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_db_env (svn_repos_t *repos, apr_pool_t *pool)
 Return the path to repos's Berkeley DB environment, 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.

const char * svn_repos_svnserve_conf (svn_repos_t *repos, apr_pool_t *pool)
 Return path to repos's svnserve.conf, allocated in pool.

const char * svn_repos_lock_dir (svn_repos_t *repos, apr_pool_t *pool)
 Return path to repos's lock directory, allocated in pool.

const char * svn_repos_db_lockfile (svn_repos_t *repos, apr_pool_t *pool)
 Return path to repos's db lockfile, allocated in pool.

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.

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.

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.

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.

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

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)
 Construct and return a report_baton that will be paired with some svn_ra_reporter_t table.

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)
 Given a report_baton constructed by svn_repos_begin_report(), this routine will build revision:path into the current transaction.

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)
 Given a report_baton constructed by svn_repos_begin_report(), this routine will build revision:link_path into the current transaction at path.

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_report(), this routine will remove path from the current fs transaction.

svn_error_tsvn_repos_finish_report (void *report_baton, apr_pool_t *pool)
 Make the filesystem compare the transaction to a revision and have it drive an update editor (using svn_repos_delta_dirs()), then abort the transaction.

svn_error_tsvn_repos_abort_report (void *report_baton, apr_pool_t *pool)
 The report-driver is bailing, so abort the fs transaction.

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

svn_error_tsvn_repos_replay (svn_fs_root_t *root, const svn_delta_editor_t *editor, void *edit_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).

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)
 Return an editor and edit_baton to commit changes to session->fs, beginning at location 'rev:base_path', where "rev" is the argument given to open_root().

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

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

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)
 Invoke receiver with receiver_baton on each log message from start to end in repos's filesystem.

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's pre- and post-commit hooks around the commit.

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)
 Like svn_fs_begin_txn(), but use author and log_msg to set the corresponding properties on transaction *txn_p.

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.

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)
 Like svn_fs_change_rev_prop(), but invoke the repos's pre- and post-revprop-change hooks around the change.

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

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

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 svn_repos_dir_delta(), builds an svn_repos_node_t * tree representing the delta from base_root to root in repos's filesystem.

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 created by svn_repos_node_editor() with svn_repos_dir_delta(), which is stored in edit_baton.

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)
 Dump the contents of the filesystem within already-open repos into writable dumpstream.

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)
 Read and parse dumpfile-formatted dumpstream, reconstructing filesystem revisions in already-open repos, handling uuids in accordance with uuid_action.

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)
 Read and parse dumpfile-formatted stream, calling callbacks in parse_fns/parse_baton, and using pool for allocations.

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)
 Set *parser and *parse_baton to a vtable parser which commits new revisions to the fs in repos.


Detailed Description

tools built on top of the filesystem.

Definition in file svn_repos.h.


Typedef Documentation

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

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

Definition at line 519 of file svn_repos.h.


Function Documentation

svn_error_t* svn_repos_abort_report void *  report_baton,
apr_pool_t *  pool
 

The report-driver is bailing, so abort the fs transaction.

This function can be called anytime before svn_repos_finish_report() is called. No other reporting functions should be called after calling this function.

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
 

Construct and return a report_baton that will be paired with some svn_ra_reporter_t table.

The table and baton are used to build a transaction in the system; when the report is finished, svn_repos_dir_delta is called on the transaction, driving editor/edit_baton.

Specifically, the report will create a transaction made by username, relative to fs_base in the filesystem. 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 dir_delta. In other words, a tree delta will be returned that transforms the transaction into tgt_path/revnum. tgt_path may (indeed, should) be NULL when the source and target paths of the report are the same. 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. Else, 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.

recurse instructs the driver of the editor to send a recursive delta (or not.)

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

The authz_read_func and authz_read_baton are passed along to svn_repos_dir_delta(); see that function for how they are used.

All allocation for the context and collected state will occur 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 Berkeley DB filesystem environment, and so on.

Return the (open) 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.

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.

If only_unused is used is TRUE, *logfiles will contain only the names of Berkeley DB log files still 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.

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_report(), this routine will remove path from the current fs transaction.

(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_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
 

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

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

svn_error_t* svn_repos_finish_report void *  report_baton,
apr_pool_t *  pool
 

Make the filesystem compare the transaction to a revision and have it drive an update editor (using svn_repos_delta_dirs()), then abort the transaction.

If an error occurs during the driving of the editor, we do NOT abort the edit; that responsibility belongs to the caller, if it happens at all. The fs transaction will be aborted even if the editor drive fails, so the caller does not need to clean up.

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
 

Return an editor and edit_baton to commit changes to session->fs, beginning at location 'rev:base_path', where "rev" is the argument given to open_root().

Store user as the author of the commit and log_msg as the commit message.

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.

Calling (*editor)->close_edit completes the commit. Before close_edit returns, but after the commit has succeeded, it will invoke callback with the new revision number, the commit date (as a const char *), commit author (as a const char *), and callback_baton as arguments. If callback returns an error, that error will be returned from close_edit, otherwise if there was a post-commit hook failure, then that error will be returned and will have code SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED.

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_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
 

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 changed or an entry was added or deleted). Each path is an const char * representing an absolute path in the repository.

### todo: need to consider whether the above directory behavior is most useful, or if we should actually treat _any_ node change in a directory as a visible change for purposes of log... i.e., show bubble-up. The reason this might be useful is so that running log on a directory would give a msg for every change under that dir, no matter how far down. See the thread started on the dev list by Lars Kellogg-Stedman <lars@larsshack.org> with the subject "Single repository, multiple projects?" for more. We may simple need to offer a few different semantics for paths.

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

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

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

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

See also the documentation for svn_log_message_receiver_t.

Use pool for temporary allocations.

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
 

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.

Only cross filesystem copy history if cross_copies is TRUE. And do all of this 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
 

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

If clean_logs is used is TRUE, delete copied, unused log files from source repository at src_path Using pool for any necessary memory allocations.

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
 

Given a report_baton constructed by svn_repos_begin_report(), this routine will build revision:link_path into the current transaction at path.

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 set and path is a directory, then remove all children and props of the freshly-linked directory. This is for 'low confidence' client reporting.

All temporary allocations are done in pool.

svn_error_t* svn_repos_open svn_repos_t **  repos_p,
const char *  path,
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.

svn_error_t* svn_repos_recover const char *  path,
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.

svn_error_t* svn_repos_replay svn_fs_root_t root,
const svn_delta_editor_t editor,
void *  edit_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).

The editor passed to this function should be aware of the fact that 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.

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.

### TODO: This ought to take an svn_repos_authz_func_t too. The only reason it doesn't yet is the difficulty of implementing that correctly, plus lack of strong present need -- it's currently only used in creating a DAV MERGE response, in 'svnadmin dump', and in svnlook.

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
 

Given a report_baton constructed by svn_repos_begin_report(), this routine will build revision:path into the current transaction.

This routine is called multiple times to create a transaction that is a "mirror" of a working copy.

The first call of this in a given report usually passes an empty path; that allows the reporter to set up the correct root revision (useful when creating a txn, for example).

If start_empty is set and path is a directory, then remove all children and props of the freshly-linked directory. This is for 'low confidence' client reporting.

All temporary allocations are done in pool.


Generated on Mon Oct 18 17:33:14 2004 for Subversion by doxygen 1.3.5