Checkout
C. Michael Pilato
committed
on 19 Oct 11
Finish issue #3734 ('Add revision-based filtering to the dumpstream
load functionality'). Add support for the --revision (-r) option for
's… Show more
Finish issue #3734 ('Add revision-based filtering to the dumpstream

load functionality').  Add support for the --revision (-r) option for

'svnadmin load' to facilitate incremental loads.

* subversion/include/svn_repos.h

 (svn_repos_notify_action_t): Add 'svn_repos_notify_load_skipped_rev'

   enum value.

 (svn_repos_load_fs4, svn_repos_get_fs_build_parser4): New versions

   of these APIs which add 'start_rev' and 'end_rev' parameters.

 (svn_repos_load_fs3, svn_repos_get_fs_build_parser3): Deprecate.

* subversion/libsvn_repos/load-fs-vtable.c

 (struct parse_baton): Add 'start_rev' and 'end_rev' members.

 (struct revision_baton): Add 'skipped' member.

 (new_revision_record): Don't create a transaction when skipping

   revisions, but do notify about the skip.

 (new_node_record, set_revision_property, set_node_property,

   delete_node_property, remove_node_props, apply_textdelta,

   set_fulltext, close_node, close_revision): Don't make any real FS

   changes if we're skipping the current revision.

 (svn_repos_load_fs4): Was svn_repos_load_fs3().  Add 'start_rev' and

   'end_rev' parameters.  Update call to svn_repos_get_fs_build_parser4().

 (svn_repos_get_fs_build_parser4): Was svn_repos_get_fs_build_parser3().

   Add 'start_rev' and 'end_rev' parameters, which are validated and

   then stuff into the parse_baton.

* subversion/libsvn_repos/deprecated.c

 (svn_repos_load_fs3): New wrapper around svn_repos_load_fs4().

 (svn_repos_get_fs_build_parser3): New wrapper around

   svn_repos_get_fs_build_parser4().

* subversion/svnadmin/main.c

 (cmd_table): Cause the 'load' command to also accept the --revision (-r)

   option.

 (repos_notify_handler): Handle the svn_repos_notify_load_skipped_rev

   notification, too.

 (optrev_to_revnum): New helper function.

 (subcommand_load): Handle revision options now with an updated call

   to svn_fs_load_fs4().

* subversion/tests/cmdline/svnadmin_tests.py

 (load_ranges): New test.

 (test_list): Add reference to new test.

Show less