Dumping, loading and verifying filesystem data

The filesystem 'dump' format contains nothing but the abstract structure of the filesystem – independent of any internal node-id schema or database back-end. More...

## Data Structures

struct | svn_repos_parse_fns3_t
| A vtable that is driven by svn_repos_parse_dumpstream3(). More...
struct | svn_repos_parse_fns2_t
| A vtable that is driven by svn_repos_parse_dumpstream2(). More...
struct | svn_repos_parse_fns_t
| A vtable that is driven by svn_repos_parse_dumpstream(). More...

## Macros

#define | SVN_REPOS_DUMPFILE_MAGIC_HEADER "SVN-fs-dump-format-version"
#define | SVN_REPOS_DUMPFILE_FORMAT_VERSION 3
#define | SVN_REPOS_DUMPFILE_FORMAT_VERSION_DELTAS 3
#define | SVN_REPOS_DUMPFILE_UUID "UUID"
#define | SVN_REPOS_DUMPFILE_CONTENT_LENGTH "Content-length"
#define | SVN_REPOS_DUMPFILE_REVISION_NUMBER "Revision-number"
#define | SVN_REPOS_DUMPFILE_NODE_PATH "Node-path"
#define | SVN_REPOS_DUMPFILE_NODE_KIND "Node-kind"
#define | SVN_REPOS_DUMPFILE_NODE_ACTION "Node-action"
#define | SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH "Node-copyfrom-path"
#define | SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV "Node-copyfrom-rev"
#define | SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5 "Text-copy-source-md5"
#define | SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_SHA1 "Text-copy-source-sha1"
#define | SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_CHECKSUM SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5
#define | SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5 "Text-content-md5"
#define | SVN_REPOS_DUMPFILE_TEXT_CONTENT_SHA1 "Text-content-sha1"
#define | SVN_REPOS_DUMPFILE_TEXT_CONTENT_CHECKSUM SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5
#define | SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH "Prop-content-length"
#define | SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH "Text-content-length"
#define | SVN_REPOS_DUMPFILE_PROP_DELTA "Prop-delta"
#define | SVN_REPOS_DUMPFILE_TEXT_DELTA "Text-delta"
#define | SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5 "Text-delta-base-md5"
#define | SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_SHA1 "Text-delta-base-sha1"
#define | SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_CHECKSUM SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5

## Typedefs

typedef svn_error_t *(* | svn_repos_verify_callback_t) (void *baton, svn_revnum_t revision, svn_error_t *verify_err, apr_pool_t *scratch_pool)
| Callback type for use with svn_repos_verify_fs3(). More...
typedef struct svn_repos_parse_fns3_t | svn_repos_parse_fns3_t
| A vtable that is driven by svn_repos_parse_dumpstream3(). More...
typedef struct svn_repos_parse_fns2_t | svn_repos_parse_fns2_t
| A vtable that is driven by svn_repos_parse_dumpstream2(). More...
typedef svn_repos_parse_fns2_t | svn_repos_parser_fns2_t
typedef struct svn_repos_parse_fns_t | svn_repos_parser_fns_t
| A vtable that is driven by svn_repos_parse_dumpstream(). More...

## Enumerations

enum | svn_repos_load_uuid { svn_repos_load_uuid_default , svn_repos_load_uuid_ignore , svn_repos_load_uuid_force }
| The different policies for processing the UUID in the dumpfile. More...

## Functions

svn_error_t * | svn_repos_verify_fs3 (svn_repos_t *repos, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_boolean_t check_normalization, svn_boolean_t metadata_only, svn_repos_notify_func_t notify_func, void *notify_baton, svn_repos_verify_callback_t verify_callback, void *verify_baton, svn_cancel_func_t cancel, void *cancel_baton, apr_pool_t *scratch_pool)
| Verify the contents of the file system in repos. More...
svn_error_t * | svn_repos_verify_fs2 (svn_repos_t *repos, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_repos_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel, void *cancel_baton, apr_pool_t *scratch_pool)
| Like svn_repos_verify_fs3(), but with verify_callback and verify_baton set to `NULL` and with check_normalization and metadata_only set to `FALSE`. More...
svn_error_t * | svn_repos_verify_fs (svn_repos_t *repos, svn_stream_t *feedback_stream, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
| Similar to svn_repos_verify_fs2(), but with a feedback_stream instead of handling feedback via the notify_func handler. More...

svn_error_t *

svn_repos_dump_fs4 (svn_repos_t *repos, svn_stream_t *stream, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_boolean_t incremental, svn_boolean_t use_deltas, svn_boolean_t include_revprops, svn_boolean_t include_changes, svn_repos_notify_func_t notify_func, void *notify_baton, svn_repos_dump_filter_func_t filter_func, void *filter_baton, 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. More...
svn_error_t * | svn_repos_dump_fs3 (svn_repos_t *repos, svn_stream_t *dumpstream, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_boolean_t incremental, svn_boolean_t use_deltas, svn_repos_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *scratch_pool)
| Similar to svn_repos_dump_fs4(), but with include_revprops and include_changes both set to `TRUE` and filter_func and filter_baton set to `NULL`. More...
svn_error_t * | svn_repos_dump_fs2 (svn_repos_t *repos, svn_stream_t *dumpstream, svn_stream_t *feedback_stream, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_boolean_t incremental, svn_boolean_t use_deltas, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
| Similar to svn_repos_dump_fs3(), but with a feedback_stream instead of handling feedback via the notify_func handler. More...
svn_error_t * | svn_repos_dump_fs (svn_repos_t *repos, svn_stream_t *dumpstream, svn_stream_t *feedback_stream, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_boolean_t incremental, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
| Similar to svn_repos_dump_fs2(), but with the use_deltas parameter always set to `FALSE`. More...

svn_error_t *

svn_repos_load_fs6 (svn_repos_t *repos, svn_stream_t *dumpstream, svn_revnum_t start_rev, svn_revnum_t end_rev, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_boolean_t use_pre_commit_hook, svn_boolean_t use_post_commit_hook, svn_boolean_t validate_props, svn_boolean_t ignore_dates, svn_boolean_t normalize_props, svn_repos_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)

| Read and parse dumpfile-formatted dumpstream, reconstructing filesystem revisions in already-open repos, handling uuids in accordance with uuid_action. More...

svn_error_t *

svn_repos_load_fs5 (svn_repos_t *repos, svn_stream_t *dumpstream, svn_revnum_t start_rev, svn_revnum_t end_rev, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_boolean_t use_pre_commit_hook, svn_boolean_t use_post_commit_hook, svn_boolean_t validate_props, svn_boolean_t ignore_dates, svn_repos_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)

| Similar to svn_repos_load_fs6(), but with the normalize_props parameter always set to `FALSE`. More...

svn_error_t *

svn_repos_load_fs4 (svn_repos_t *repos, svn_stream_t *dumpstream, svn_revnum_t start_rev, svn_revnum_t end_rev, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_boolean_t use_pre_commit_hook, svn_boolean_t use_post_commit_hook, svn_boolean_t validate_props, svn_repos_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)

| Similar to svn_repos_load_fs5(), but with ignore_dates always passed as FALSE. More...
svn_error_t * | svn_repos_load_fs3 (svn_repos_t *repos, svn_stream_t *dumpstream, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_boolean_t use_pre_commit_hook, svn_boolean_t use_post_commit_hook, svn_boolean_t validate_props, svn_repos_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
| Similar to svn_repos_load_fs4(), but with start_rev and end_rev always passed as SVN_INVALID_REVNUM. More...
svn_error_t * | svn_repos_load_fs2 (svn_repos_t *repos, svn_stream_t *dumpstream, svn_stream_t *feedback_stream, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_boolean_t use_pre_commit_hook, svn_boolean_t use_post_commit_hook, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
| Similar to svn_repos_load_fs3(), but with feedback_stream in place of the svn_repos_notify_func_t and baton and with validate_props always FALSE. More...
svn_error_t * | svn_repos_load_fs (svn_repos_t *repos, svn_stream_t *dumpstream, svn_stream_t *feedback_stream, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
| Similar to svn_repos_load_fs2(), but with use_pre_commit_hook and use_post_commit_hook always `FALSE`. More...
svn_error_t * | svn_repos_load_fs_revprops (svn_repos_t *repos, svn_stream_t *dumpstream, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_boolean_t validate_props, svn_boolean_t ignore_dates, svn_boolean_t normalize_props, svn_repos_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *scratch_pool)
| Read and parse dumpfile-formatted dumpstream, extracting the revision properties from it and apply them to the already-open repos. More...
svn_error_t * | svn_repos_parse_dumpstream3 (svn_stream_t *stream, const svn_repos_parse_fns3_t *parse_fns, void *parse_baton, svn_boolean_t deltas_are_text, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
| Read and parse dumpfile-formatted stream, calling callbacks in parse_fns/parse_baton, and using pool for allocations. More...

svn_error_t *

svn_repos_get_fs_build_parser6 (const svn_repos_parse_fns3_t **parser, void **parse_baton, svn_repos_t *repos, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_boolean_t use_history, svn_boolean_t validate_props, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_boolean_t use_pre_commit_hook, svn_boolean_t use_post_commit_hook, svn_boolean_t ignore_dates, svn_boolean_t normalize_props, svn_repos_notify_func_t notify_func, void *notify_baton, apr_pool_t *pool)

| Set *parser and *parse_baton to a vtable parser which commits new revisions to the fs in repos. More...

svn_error_t *

svn_repos_get_fs_build_parser5 (const svn_repos_parse_fns3_t **parser, void **parse_baton, svn_repos_t *repos, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_boolean_t use_history, svn_boolean_t validate_props, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_boolean_t use_pre_commit_hook, svn_boolean_t use_post_commit_hook, svn_boolean_t ignore_dates, svn_repos_notify_func_t notify_func, void *notify_baton, apr_pool_t *pool)

| Similar to svn_repos_get_fs_build_parser6(), but with the normalize_props parameter always set to `FALSE`. More...
svn_error_t * | svn_repos_get_fs_build_parser4 (const svn_repos_parse_fns3_t **parser, void **parse_baton, svn_repos_t *repos, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_boolean_t use_history, svn_boolean_t validate_props, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_repos_notify_func_t notify_func, void *notify_baton, apr_pool_t *pool)
| Similar to svn_repos_get_fs_build_parser5(), but with the `use_pre_commit_hook`, `use_post_commit_hook` and `ignore_dates` arguments all false. More...
svn_error_t * | svn_repos_parse_dumpstream2 (svn_stream_t *stream, const svn_repos_parser_fns2_t *parse_fns, void *parse_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
| Similar to svn_repos_parse_dumpstream3(), but uses the more limited svn_repos_parser_fns2_t vtable type. More...
svn_error_t * | svn_repos_parse_dumpstream (svn_stream_t *stream, const svn_repos_parser_fns_t *parse_fns, void *parse_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
| Similar to svn_repos_parse_dumpstream2(), but uses the more limited svn_repos_parser_fns_t vtable type. More...
svn_error_t * | svn_repos_get_fs_build_parser3 (const svn_repos_parse_fns2_t **parser, void **parse_baton, svn_repos_t *repos, svn_boolean_t use_history, svn_boolean_t validate_props, enum svn_repos_load_uuid uuid_action, const char *parent_dir, svn_repos_notify_func_t notify_func, void *notify_baton, apr_pool_t *pool)
| Similar to svn_repos_get_fs_build_parser4(), but with start_rev and end_rev always passed as SVN_INVALID_REVNUM, and yielding the more limited svn_repos_parse_fns2_t. More...
svn_error_t * | svn_repos_get_fs_build_parser2 (const svn_repos_parse_fns2_t **parser, void **parse_baton, svn_repos_t *repos, svn_boolean_t use_history, enum svn_repos_load_uuid uuid_action, svn_stream_t *outstream, const char *parent_dir, apr_pool_t *pool)
| Similar to svn_repos_get_fs_build_parser3(), but with outstream in place if a svn_repos_notify_func_t and baton and with validate_props always FALSE. More...
svn_error_t * | svn_repos_get_fs_build_parser (const svn_repos_parser_fns_t **parser, void **parse_baton, svn_repos_t *repos, svn_boolean_t use_history, enum svn_repos_load_uuid uuid_action, svn_stream_t *outstream, const char *parent_dir, apr_pool_t *pool)
| Similar to svn_repos_get_fs_build_parser2(), but yields the more limited svn_repos_parser_fns_t vtable type. More...

## Detailed Description

The filesystem 'dump' format contains nothing but the abstract structure of the filesystem – independent of any internal node-id schema or database back-end.

All of the data in the dumpfile is acquired by public function calls into svn_fs.h. Similarly, the parser which reads the dumpfile is able to reconstruct the filesystem using only public svn_fs.h routines.

Thus the dump/load feature's main purpose is for migrating data from one svn filesystem to another – presumably two filesystems which have different internal implementations.

If you simply want to backup your filesystem, you're probably better off using the built-in facilities of the DB backend (using Berkeley DB's hot-backup feature, for example.)

For a description of the dumpfile format, see /trunk/notes/fs_dumprestore.txt.

## Macro Definition Documentation

## SVN_REPOS_DUMPFILE_PROP_DELTA

#define SVN_REPOS_DUMPFILE_PROP_DELTA "Prop-delta"

Since
  New in 1.1.

Definition at line 3115 of file svn_repos.h.

## SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5

#define SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5 "Text-content-md5"

Since
  New in 1.6.

Definition at line 3105 of file svn_repos.h.

## SVN_REPOS_DUMPFILE_TEXT_CONTENT_SHA1

#define SVN_REPOS_DUMPFILE_TEXT_CONTENT_SHA1 "Text-content-sha1"

Since
  New in 1.6.

Definition at line 3107 of file svn_repos.h.

## SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5

#define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5 "Text-copy-source-md5"

Since
  New in 1.6.

Definition at line 3099 of file svn_repos.h.

## SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_SHA1

#define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_SHA1 "Text-copy-source-sha1"

Since
  New in 1.6.

Definition at line 3101 of file svn_repos.h.

## SVN_REPOS_DUMPFILE_TEXT_DELTA

#define SVN_REPOS_DUMPFILE_TEXT_DELTA "Text-delta"

Since
  New in 1.1.

Definition at line 3117 of file svn_repos.h.

## SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_CHECKSUM

#define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_CHECKSUM SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5

Since
  New in 1.5.

Definition at line 3123 of file svn_repos.h.

## SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5

#define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5 "Text-delta-base-md5"

Since
  New in 1.6.

Definition at line 3119 of file svn_repos.h.

## SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_SHA1

#define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_SHA1 "Text-delta-base-sha1"

Since
  New in 1.6.

Definition at line 3121 of file svn_repos.h.

## Typedef Documentation

## svn_repos_parse_fns2_t

typedef struct svn_repos_parse_fns2_t svn_repos_parse_fns2_t

A vtable that is driven by svn_repos_parse_dumpstream2().

Similar to svn_repos_parse_fns3_t except that it lacks the magic_header_record callback.

Deprecated:
  Provided for backward compatibility with the 1.7 API.

## svn_repos_parse_fns3_t

typedef struct svn_repos_parse_fns3_t svn_repos_parse_fns3_t

A vtable that is driven by svn_repos_parse_dumpstream3().

Since
  New in 1.8.

## svn_repos_parser_fns2_t

typedef svn_repos_parse_fns2_t svn_repos_parser_fns2_t

Deprecated:
  Provided for backward compatibility with the 1.7 API.

Definition at line 3996 of file svn_repos.h.

## svn_repos_parser_fns_t

typedef struct svn_repos_parse_fns_t svn_repos_parser_fns_t

A vtable that is driven by svn_repos_parse_dumpstream().

Similar to svn_repos_parse_fns2_t except that it lacks the delete_node_property and apply_textdelta callbacks.

Deprecated:
  Provided for backward compatibility with the 1.0 API.

## svn_repos_verify_callback_t

typedef svn_error_t*(* svn_repos_verify_callback_t) (void *baton, svn_revnum_t revision, svn_error_t *verify_err, apr_pool_t *scratch_pool)

Callback type for use with svn_repos_verify_fs3().

revision and verify_err are the details of a single verification failure that occurred during the svn_repos_verify_fs3() call. baton is the same baton given to svn_repos_verify_fs3(). scratch_pool is provided for the convenience of the implementor, who should not expect it to live longer than a single callback call.

verify_err will be cleared and becomes invalid after the callback returns, use svn_error_dup() to preserve the error. If a callback uses verify_err as the return value or as a part of the return value, it should also call svn_error_dup() for verify_err. Implementors of this callback are forbidden to call svn_error_clear() for verify_err.

See also
  svn_repos_verify_fs3

Since
  New in 1.9.

Definition at line 3154 of file svn_repos.h.

## Enumeration Type Documentation

## svn_repos_load_uuid

enum svn_repos_load_uuid

The different policies for processing the UUID in the dumpfile.

Enumerator
svn_repos_load_uuid_default | only update uuid if the repos has no revisions.
svn_repos_load_uuid_ignore | never update uuid.
svn_repos_load_uuid_force | always update uuid.

Definition at line 3127 of file svn_repos.h.

## Function Documentation

## svn_repos_dump_fs()

svn_error_t* svn_repos_dump_fs | ( | svn_repos_t * | repos,
|  | svn_stream_t * | dumpstream,
|  | svn_stream_t * | feedback_stream,
|  | svn_revnum_t | start_rev,
|  | svn_revnum_t | end_rev,
|  | svn_boolean_t | incremental,
|  | svn_cancel_func_t | cancel_func,
|  | void * | cancel_baton,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_repos_dump_fs2(), but with the use_deltas parameter always set to `FALSE`.

Deprecated:
  Provided for backward compatibility with the 1.0 API.

## svn_repos_dump_fs2()

svn_error_t* svn_repos_dump_fs2 | ( | svn_repos_t * | repos,
|  | svn_stream_t * | dumpstream,
|  | svn_stream_t * | feedback_stream,
|  | svn_revnum_t | start_rev,
|  | svn_revnum_t | end_rev,
|  | svn_boolean_t | incremental,
|  | svn_boolean_t | use_deltas,
|  | svn_cancel_func_t | cancel_func,
|  | void * | cancel_baton,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_repos_dump_fs3(), but with a feedback_stream instead of handling feedback via the notify_func handler.

Since
  New in 1.1.

Deprecated:
  Provided for backward compatibility with the 1.6 API.

## svn_repos_dump_fs3()

svn_error_t* svn_repos_dump_fs3 | ( | svn_repos_t * | repos,
|  | svn_stream_t * | dumpstream,
|  | svn_revnum_t | start_rev,
|  | svn_revnum_t | end_rev,
|  | svn_boolean_t | incremental,
|  | svn_boolean_t | use_deltas,
|  | svn_repos_notify_func_t | notify_func,
|  | void * | notify_baton,
|  | svn_cancel_func_t | cancel_func,
|  | void * | cancel_baton,
|  | apr_pool_t * | scratch_pool
| ) |  |

Similar to svn_repos_dump_fs4(), but with include_revprops and include_changes both set to `TRUE` and filter_func and filter_baton set to `NULL`.

Since
  New in 1.7.

Deprecated:
  Provided for backward compatibility with the 1.9 API.

## svn_repos_dump_fs4()

svn_error_t* svn_repos_dump_fs4 | ( | svn_repos_t * | repos,
|  | svn_stream_t * | stream,
|  | svn_revnum_t | start_rev,
|  | svn_revnum_t | end_rev,
|  | svn_boolean_t | incremental,
|  | svn_boolean_t | use_deltas,
|  | svn_boolean_t | include_revprops,
|  | svn_boolean_t | include_changes,
|  | svn_repos_notify_func_t | notify_func,
|  | void * | notify_baton,
|  | svn_repos_dump_filter_func_t | filter_func,
|  | void * | filter_baton,
|  | 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.

If dumpstream is `NULL`, this is effectively a primitive verify. It is not complete, however; see instead svn_repos_verify_fs3().

Begin at revision start_rev, and dump every revision up through end_rev. If start_rev is SVN_INVALID_REVNUM, start at revision 0. If end_rev is SVN_INVALID_REVNUM, end at the head revision.

If incremental is `TRUE`, the first revision dumped will be a diff against the previous revision (usually it looks like a full dump of the tree).

If use_deltas is `TRUE`, output only node properties which have changed relative to the previous contents, and output text contents as svndiff data against the previous contents. Regardless of how this flag is set, the first revision of a non-incremental dump will be done with full plain text. A dump with use_deltas set cannot be loaded by Subversion 1.0.x.

If include_revprops is `TRUE`, output the revision properties as well, otherwise omit them.

If include_changes is `TRUE`, output the revision contents, i.e. tree and node changes.

If notify_func is not null, then call it with notify_baton and with a notification structure in which the fields are set as follows. (For a warning or error notification that does not apply to a specific revision, the revision number is SVN_INVALID_REVNUM.)

For each warning: `action` = svn_repos_notify_warning `warning` and `warning_str` fields set accordingly

### TODO: Set @c revision = the revision or #SVN_INVALID_REVNUM?

For each successfully dumped revision: `action` = svn_repos_notify_dump_rev_end `revision` = the revision

At the end: `action` = svn_repos_notify_verify_end

### Do we really need a callback to tell us the function we

called has reached its end and is about to return?

At the end, if there were certain warnings previously: `action` = svn_repos_notify_warning `warning` and `warning_str` fields set accordingly, reiterating the existence of previous warnings

### This is a presentation issue. Caller could do this itself.

If filter_func is not `NULL`, it is called for each node being dumped, allowing the caller to exclude it from dump.

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

Use scratch_pool for temporary allocation.

Since
  New in 1.10.

## svn_repos_get_fs_build_parser()

svn_error_t* svn_repos_get_fs_build_parser | ( | const svn_repos_parser_fns_t ** | parser,
|  | void ** | parse_baton,
|  | svn_repos_t * | repos,
|  | svn_boolean_t | use_history,
|  | enum svn_repos_load_uuid | uuid_action,
|  | svn_stream_t * | outstream,
|  | const char * | parent_dir,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_repos_get_fs_build_parser2(), but yields the more limited svn_repos_parser_fns_t vtable type.

Deprecated:
  Provided for backward compatibility with the 1.0 API.

## svn_repos_get_fs_build_parser2()

svn_error_t* svn_repos_get_fs_build_parser2 | ( | const svn_repos_parse_fns2_t ** | parser,
|  | void ** | parse_baton,
|  | svn_repos_t * | repos,
|  | svn_boolean_t | use_history,
|  | enum svn_repos_load_uuid | uuid_action,
|  | svn_stream_t * | outstream,
|  | const char * | parent_dir,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_repos_get_fs_build_parser3(), but with outstream in place if a svn_repos_notify_func_t and baton and with validate_props always FALSE.

Since
  New in 1.1.

Deprecated:
  Provided for backward compatibility with the 1.6 API.

## svn_repos_get_fs_build_parser3()

svn_error_t* svn_repos_get_fs_build_parser3 | ( | const svn_repos_parse_fns2_t ** | parser,
|  | void ** | parse_baton,
|  | svn_repos_t * | repos,
|  | svn_boolean_t | use_history,
|  | svn_boolean_t | validate_props,
|  | enum svn_repos_load_uuid | uuid_action,
|  | const char * | parent_dir,
|  | svn_repos_notify_func_t | notify_func,
|  | void * | notify_baton,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_repos_get_fs_build_parser4(), but with start_rev and end_rev always passed as SVN_INVALID_REVNUM, and yielding the more limited svn_repos_parse_fns2_t.

Since
  New in 1.7.

Deprecated:
  Provided for backward compatibility with the 1.7 API.

## svn_repos_get_fs_build_parser4()

svn_error_t* svn_repos_get_fs_build_parser4 | ( | const svn_repos_parse_fns3_t ** | parser,
|  | void ** | parse_baton,
|  | svn_repos_t * | repos,
|  | svn_revnum_t | start_rev,
|  | svn_revnum_t | end_rev,
|  | svn_boolean_t | use_history,
|  | svn_boolean_t | validate_props,
|  | enum svn_repos_load_uuid | uuid_action,
|  | const char * | parent_dir,
|  | svn_repos_notify_func_t | notify_func,
|  | void * | notify_baton,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_repos_get_fs_build_parser5(), but with the `use_pre_commit_hook`, `use_post_commit_hook` and `ignore_dates` arguments all false.

Since
  New in 1.8.

Deprecated:
  Provided for backward compatibility with the 1.8 API.

## svn_repos_get_fs_build_parser5()

svn_error_t* svn_repos_get_fs_build_parser5 | ( | const svn_repos_parse_fns3_t ** | parser,
|  | void ** | parse_baton,
|  | svn_repos_t * | repos,
|  | svn_revnum_t | start_rev,
|  | svn_revnum_t | end_rev,
|  | svn_boolean_t | use_history,
|  | svn_boolean_t | validate_props,
|  | enum svn_repos_load_uuid | uuid_action,
|  | const char * | parent_dir,
|  | svn_boolean_t | use_pre_commit_hook,
|  | svn_boolean_t | use_post_commit_hook,
|  | svn_boolean_t | ignore_dates,
|  | svn_repos_notify_func_t | notify_func,
|  | void * | notify_baton,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_repos_get_fs_build_parser6(), but with the normalize_props parameter always set to `FALSE`.

Since
  New in 1.9.

Deprecated:
  Provided for backward compatibility with the 1.9 API.

## svn_repos_get_fs_build_parser6()

svn_error_t* svn_repos_get_fs_build_parser6 | ( | const svn_repos_parse_fns3_t ** | parser,
|  | void ** | parse_baton,
|  | svn_repos_t * | repos,
|  | svn_revnum_t | start_rev,
|  | svn_revnum_t | end_rev,
|  | svn_boolean_t | use_history,
|  | svn_boolean_t | validate_props,
|  | enum svn_repos_load_uuid | uuid_action,
|  | const char * | parent_dir,
|  | svn_boolean_t | use_pre_commit_hook,
|  | svn_boolean_t | use_post_commit_hook,
|  | svn_boolean_t | ignore_dates,
|  | svn_boolean_t | normalize_props,
|  | svn_repos_notify_func_t | notify_func,
|  | void * | notify_baton,
|  | apr_pool_t * | pool
| ) |  |

Set *parser and *parse_baton to a vtable parser which commits new revisions to the fs in repos.

The constructed parser will treat UUID records in a manner consistent with uuid_action. Use pool to operate on the fs.

start_rev and end_rev act as filters, the lower and upper (inclusive) range values of revisions which will be loaded. Either both of these values are SVN_INVALID_REVNUM (in which case no revision-based filtering occurs at all), or both are valid revisions (where start_rev is older than or equivalent to end_rev). They refer to dump stream revision numbers rather than committed revision numbers.

If use_history is true, then when the parser encounters a node that is added-with-history, it will require 'copy-from' history to exist in the repository at the relative (adjusted) copy-from revision and path. It will perform a copy from that source location, and will fail if no suitable source exists there. If use_history is false, then it will instead convert every copy to a plain add.

### The 'use_history=FALSE' case is unused and untested in Subversion.

It seems to me it would not work with a deltas dumpfile (a driver that calls the `apply_textdelta` method), as it would not have access to the delta base text.

If use_pre_commit_hook is set, call the repository's pre-commit hook before committing each loaded revision.

If use_post_commit_hook is set, call the repository's post-commit hook after committing each loaded revision.

If validate_props is set, then validate Subversion revision and node properties (those in the svn: namespace) against established rules for those things.

If ignore_dates is set, ignore any revision datestamps found in dumpstream, allowing the revisions created by the load process to be stamped as if they were newly created via the normal commit process.

If normalize_props is set, attempt to normalize invalid Subversion revision and node properties (those in the svn: namespace) so that their values would follow the established rules for them. For example, for such properties, typically the value must be in UTF-8 with LF line endings.

Note
  The details or the performed normalizations are deliberately left unspecified and may change in the future.

If parent_dir is not NULL, then the parser will reparent all the loaded nodes, from root to parent_dir. The directory parent_dir must be an existing directory in the repository.

Since
  New in 1.10.

## svn_repos_load_fs()

svn_error_t* svn_repos_load_fs | ( | svn_repos_t * | repos,
|  | svn_stream_t * | dumpstream,
|  | svn_stream_t * | feedback_stream,
|  | enum svn_repos_load_uuid | uuid_action,
|  | const char * | parent_dir,
|  | svn_cancel_func_t | cancel_func,
|  | void * | cancel_baton,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_repos_load_fs2(), but with use_pre_commit_hook and use_post_commit_hook always `FALSE`.

Deprecated:
  Provided for backward compatibility with the 1.1 API.

## svn_repos_load_fs2()

svn_error_t* svn_repos_load_fs2 | ( | svn_repos_t * | repos,
|  | svn_stream_t * | dumpstream,
|  | svn_stream_t * | feedback_stream,
|  | enum svn_repos_load_uuid | uuid_action,
|  | const char * | parent_dir,
|  | svn_boolean_t | use_pre_commit_hook,
|  | svn_boolean_t | use_post_commit_hook,
|  | svn_cancel_func_t | cancel_func,
|  | void * | cancel_baton,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_repos_load_fs3(), but with feedback_stream in place of the svn_repos_notify_func_t and baton and with validate_props always FALSE.

Since
  New in 1.2.

Deprecated:
  Provided for backward compatibility with the 1.6 API.

## svn_repos_load_fs3()

svn_error_t* svn_repos_load_fs3 | ( | svn_repos_t * | repos,
|  | svn_stream_t * | dumpstream,
|  | enum svn_repos_load_uuid | uuid_action,
|  | const char * | parent_dir,
|  | svn_boolean_t | use_pre_commit_hook,
|  | svn_boolean_t | use_post_commit_hook,
|  | svn_boolean_t | validate_props,
|  | svn_repos_notify_func_t | notify_func,
|  | void * | notify_baton,
|  | svn_cancel_func_t | cancel_func,
|  | void * | cancel_baton,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_repos_load_fs4(), but with start_rev and end_rev always passed as SVN_INVALID_REVNUM.

Since
  New in 1.7.

Deprecated:
  Provided for backward compatibility with the 1.7 API.

## svn_repos_load_fs4()

svn_error_t* svn_repos_load_fs4 | ( | svn_repos_t * | repos,
|  | svn_stream_t * | dumpstream,
|  | svn_revnum_t | start_rev,
|  | svn_revnum_t | end_rev,
|  | enum svn_repos_load_uuid | uuid_action,
|  | const char * | parent_dir,
|  | svn_boolean_t | use_pre_commit_hook,
|  | svn_boolean_t | use_post_commit_hook,
|  | svn_boolean_t | validate_props,
|  | svn_repos_notify_func_t | notify_func,
|  | void * | notify_baton,
|  | svn_cancel_func_t | cancel_func,
|  | void * | cancel_baton,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_repos_load_fs5(), but with ignore_dates always passed as FALSE.

Since
  New in 1.8.

Deprecated:
  Provided for backward compatibility with the 1.8 API.

## svn_repos_load_fs5()

svn_error_t* svn_repos_load_fs5 | ( | svn_repos_t * | repos,
|  | svn_stream_t * | dumpstream,
|  | svn_revnum_t | start_rev,
|  | svn_revnum_t | end_rev,
|  | enum svn_repos_load_uuid | uuid_action,
|  | const char * | parent_dir,
|  | svn_boolean_t | use_pre_commit_hook,
|  | svn_boolean_t | use_post_commit_hook,
|  | svn_boolean_t | validate_props,
|  | svn_boolean_t | ignore_dates,
|  | svn_repos_notify_func_t | notify_func,
|  | void * | notify_baton,
|  | svn_cancel_func_t | cancel_func,
|  | void * | cancel_baton,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_repos_load_fs6(), but with the normalize_props parameter always set to `FALSE`.

Since
  New in 1.9.

Deprecated:
  Provided for backward compatibility with the 1.9 API.

## svn_repos_load_fs6()

svn_error_t* svn_repos_load_fs6 | ( | svn_repos_t * | repos,
|  | svn_stream_t * | dumpstream,
|  | svn_revnum_t | start_rev,
|  | svn_revnum_t | end_rev,
|  | enum svn_repos_load_uuid | uuid_action,
|  | const char * | parent_dir,
|  | svn_boolean_t | use_pre_commit_hook,
|  | svn_boolean_t | use_post_commit_hook,
|  | svn_boolean_t | validate_props,
|  | svn_boolean_t | ignore_dates,
|  | svn_boolean_t | normalize_props,
|  | svn_repos_notify_func_t | notify_func,
|  | void * | notify_baton,
|  | svn_cancel_func_t | cancel_func,
|  | void * | cancel_baton,
|  | apr_pool_t * | pool
| ) |  |

Read and parse dumpfile-formatted dumpstream, reconstructing filesystem revisions in already-open repos, handling uuids in accordance with uuid_action.

Use pool for all allocation.

If the dumpstream contains copy history that is unavailable in the repository, an error will be thrown.

The repository's UUID will be updated iff the dumpstream contains a UUID and uuid_action is not equal to svn_repos_load_uuid_ignore and either the repository contains no revisions or uuid_action is equal to svn_repos_load_uuid_force.

If the dumpstream contains no UUID, then uuid_action is ignored and the repository UUID is not touched.

start_rev and end_rev act as filters, the lower and upper (inclusive) range values of revisions in dumpstream which will be loaded. Either both of these values are SVN_INVALID_REVNUM (in which case no revision-based filtering occurs at all), or both are valid revisions (where start_rev is older than or equivalent to end_rev).

If parent_dir is not NULL, then the parser will reparent all the loaded nodes, from root to parent_dir. The directory parent_dir must be an existing directory in the repository.

If use_pre_commit_hook is set, call the repository's pre-commit hook before committing each loaded revision.

If use_post_commit_hook is set, call the repository's post-commit hook after committing each loaded revision.

If validate_props is set, then validate Subversion revision and node properties (those in the svn: namespace) against established rules for those things.

If ignore_dates is set, ignore any revision datestamps found in dumpstream, allowing the revisions created by the load process to be stamped as if they were newly created via the normal commit process.

If normalize_props is set, attempt to normalize invalid Subversion revision and node properties (those in the svn: namespace) so that their values would follow the established rules for them. For example, for such properties, typically the value must be in UTF-8 with LF line endings.

Note
  The details or the performed normalizations are deliberately left unspecified and may change in the future.

If non-NULL, use notify_func and notify_baton to send notification of events to the caller.

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

Since
  New in 1.10.

## svn_repos_load_fs_revprops()

svn_error_t* svn_repos_load_fs_revprops | ( | svn_repos_t * | repos,
|  | svn_stream_t * | dumpstream,
|  | svn_revnum_t | start_rev,
|  | svn_revnum_t | end_rev,
|  | svn_boolean_t | validate_props,
|  | svn_boolean_t | ignore_dates,
|  | svn_boolean_t | normalize_props,
|  | svn_repos_notify_func_t | notify_func,
|  | void * | notify_baton,
|  | svn_cancel_func_t | cancel_func,
|  | void * | cancel_baton,
|  | apr_pool_t * | scratch_pool
| ) |  |

Read and parse dumpfile-formatted dumpstream, extracting the revision properties from it and apply them to the already-open repos.

Use scratch_pool for temporary allocations.

If, after filtering by the start_rev and end_rev, the dumpstream contains revisions missing in repos, an error will be thrown.

start_rev and end_rev act as filters, the lower and upper (inclusive) range values of revisions in dumpstream which will be loaded. Either both of these values are SVN_INVALID_REVNUM (in which case no revision-based filtering occurs at all), or both are valid revisions (where start_rev is older than or equivalent to end_rev).

If validate_props is set, then validate Subversion revision properties (those in the svn: namespace) against established rules for those things.

If ignore_dates is set, ignore any revision datestamps found in dumpstream, keeping whatever timestamps the revisions currently have.

If normalize_props is set, attempt to normalize invalid Subversion revision and node properties (those in the svn: namespace) so that their values would follow the established rules for them. For example, for such properties, typically the value must be in UTF-8 with LF line endings.

Note
  The details or the performed normalizations are deliberately left unspecified and may change in the future.

If non-NULL, use notify_func and notify_baton to send notification of events to the caller.

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

Remarks
  No repository hooks will be triggered.

Since
  New in 1.10.

## svn_repos_parse_dumpstream()

svn_error_t* svn_repos_parse_dumpstream | ( | svn_stream_t * | stream,
|  | const svn_repos_parser_fns_t * | parse_fns,
|  | void * | parse_baton,
|  | svn_cancel_func_t | cancel_func,
|  | void * | cancel_baton,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_repos_parse_dumpstream2(), but uses the more limited svn_repos_parser_fns_t vtable type.

Deprecated:
  Provided for backward compatibility with the 1.0 API.

## svn_repos_parse_dumpstream2()

svn_error_t* svn_repos_parse_dumpstream2 | ( | svn_stream_t * | stream,
|  | const svn_repos_parser_fns2_t * | parse_fns,
|  | void * | parse_baton,
|  | svn_cancel_func_t | cancel_func,
|  | void * | cancel_baton,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_repos_parse_dumpstream3(), but uses the more limited svn_repos_parser_fns2_t vtable type.

Deprecated:
  Provided for backward compatibility with the 1.7 API.

## svn_repos_parse_dumpstream3()

svn_error_t* svn_repos_parse_dumpstream3 | ( | svn_stream_t * | stream,
|  | const svn_repos_parse_fns3_t * | parse_fns,
|  | void * | parse_baton,
|  | svn_boolean_t | deltas_are_text,
|  | svn_cancel_func_t | cancel_func,
|  | void * | cancel_baton,
|  | apr_pool_t * | pool
| ) |  |

Read and parse dumpfile-formatted stream, calling callbacks in parse_fns/parse_baton, and using pool for allocations.

If deltas_are_text is `TRUE`, handle text-deltas with the set_fulltext callback. This is useful when manipulating a dump stream without loading it. Otherwise handle text-deltas with the apply_textdelta callback.

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

This parser has built-in knowledge of the dumpfile format, but only in a limited sense:

- it recognizes the "magic" format-version header.
- it recognizes the UUID header.
- it recognizes revision and node records by looking for either a REVISION_NUMBER or NODE_PATH headers.
- it recognizes the CONTENT-LENGTH headers, so it knows if and how to suck up the content body.
- it knows how to parse a content body into two parts: props and text, and pass the pieces to the vtable.

This is enough knowledge to make it easy on vtable implementors, but still allow expansion of the format: most headers do not have to be handled explicitly.

### [JAF] Wouldn't it be more efficient to support a start/end rev

range here than only supporting it in receivers such as svn_repos_get_fs_build_parser4()? This parser could then skip over chunks of the input stream before the oldest required rev, and could stop reading entirely after the youngest required rev.

Since
  New in 1.8.
  Starting in 1.10, parse_fns may contain NULL pointers for those callbacks that the caller is not interested in.

## svn_repos_verify_fs()

svn_error_t* svn_repos_verify_fs | ( | svn_repos_t * | repos,
|  | svn_stream_t * | feedback_stream,
|  | svn_revnum_t | start_rev,
|  | svn_revnum_t | end_rev,
|  | svn_cancel_func_t | cancel_func,
|  | void * | cancel_baton,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_repos_verify_fs2(), but with a feedback_stream instead of handling feedback via the notify_func handler.

If feedback_stream is not `NULL`, write feedback to it (lines of the form "* Verified revision %ld\n").

Since
  New in 1.5.

Deprecated:
  Provided for backward compatibility with the 1.6 API.

## svn_repos_verify_fs2()

svn_error_t* svn_repos_verify_fs2 | ( | svn_repos_t * | repos,
|  | svn_revnum_t | start_rev,
|  | svn_revnum_t | end_rev,
|  | svn_repos_notify_func_t | notify_func,
|  | void * | notify_baton,
|  | svn_cancel_func_t | cancel,
|  | void * | cancel_baton,
|  | apr_pool_t * | scratch_pool
| ) |  |

Like svn_repos_verify_fs3(), but with verify_callback and verify_baton set to `NULL` and with check_normalization and metadata_only set to `FALSE`.

Since
  New in 1.7.

Deprecated:
  Provided for backward compatibility with the 1.8 API.

## svn_repos_verify_fs3()

svn_error_t* svn_repos_verify_fs3 | ( | svn_repos_t * | repos,
|  | svn_revnum_t | start_rev,
|  | svn_revnum_t | end_rev,
|  | svn_boolean_t | check_normalization,
|  | svn_boolean_t | metadata_only,
|  | svn_repos_notify_func_t | notify_func,
|  | void * | notify_baton,
|  | svn_repos_verify_callback_t | verify_callback,
|  | void * | verify_baton,
|  | svn_cancel_func_t | cancel,
|  | void * | cancel_baton,
|  | apr_pool_t * | scratch_pool
| ) |  |

Verify the contents of the file system in repos.

Verify the revisions from start_rev to end_rev inclusive. If start_rev is SVN_INVALID_REVNUM, start at revision 0; if end_rev is SVN_INVALID_REVNUM, end at the head revision. start_rev must be older than or equal to end_rev. If revision 0 is included in the range, then also verify "global invariants" of the repository, as described in svn_fs_verify().

If check_normalization is `TRUE`, report any name collisions within the same directory or svn:mergeinfo property where the names differ only in character representation, but are otherwise identical.

If metadata_only is `TRUE`, backends that have a concept of separate metadata verification will only perform that and skip the more expensive file context reconstruction and verification. For FSFS format 7+ and FSX, this allows for a very fast check against external corruption.

If verify_callback is not `NULL`, call it with verify_baton upon receiving an FS-specific structure failure or a revision verification failure. Set `revision` callback argument to SVN_INVALID_REVNUM or to the revision number respectively. Set `verify_err` to svn_error_t describing the reason of the failure. `verify_err` will be cleared after the callback returns, use svn_error_dup() to preserve the error. If verify_callback returns an error different from SVN_NO_ERROR, stop verifying the repository and immediately return the error from verify_callback.

If verify_callback is `NULL`, this function returns the first encountered verification error or SVN_NO_ERROR if there were no failures during the verification. Errors that prevent the verification process from continuing, such as SVN_ERR_CANCELLED, are returned immediately and do not trigger an invocation of verify_callback.

If notify_func is not null, then call it with notify_baton and with a notification structure in which the fields are set as follows. (For a warning that does not apply to a specific revision, the revision number is SVN_INVALID_REVNUM.)

For each FS-specific structure warning: `action` = svn_repos_notify_verify_rev_structure `revision` = the revision or SVN_INVALID_REVNUM

For each revision verification warning: `action` = svn_repos_notify_warning `warning` and `warning_str` fields set accordingly

### TODO: Set @c revision = the revision?

For each successfully verified revision: `action` = svn_repos_notify_verify_rev_end `revision` = the revision

At the end: `action` = svn_repos_notify_verify_end

### Do we really need a callback to tell us the function we

called has reached its end and is about to return?

### Not sent, currently, if a FS structure error is found.

If cancel_func is not `NULL`, call it periodically with cancel_baton as argument to see if the caller wishes to cancel the verification.

Use scratch_pool for temporary allocation.

See also
  svn_repos_verify_callback_t

Since
  New in 1.9.