Checkout
Julian Foad
committed
on 12 Oct 17
Issue SVN-4729: Add '--include' and '--exclude' options to 'svnadmin dump'.

* include/svn_repos.h
(svn_repos_dump_filter_func_t): New.
Show more
Issue SVN-4729: Add '--include' and '--exclude' options to 'svnadmin dump'.

* include/svn_repos.h

 (svn_repos_dump_filter_func_t): New.

 (svn_repos_dump_fs4): Update function signature and comment.

 (svn_repos_dump_fs3): Update comment.

* libsvn_repos/deprecated.c

 (svn_repos_dump_fs3): Update caller.

* libsvn_repos/dump.c

 (write_revision_record): Call to svn_repos_fs_revision_proplist() (with

  AUTHZ_FUNC) instead of svn_fs_revision_proplist2() to filter revision

  properties as well as revisions. Update comment.

 (dump_filter_baton_t,

  dump_filter_authz_func): New.

 (svn_repos_dump_fs4): Initialize and pass AUTHZ_FUNC and AUTHZ_BATON to

  the repos layer API if FILTER_FUNC is specified by caller.

* subversion/svnadmin/svnadmin.c

 (svnadmin__cmdline_options_t): Add enum values for new options.

 (options_table): Add new options.

 (cmd_table): Add new options to 'dump' subcommand.

 (svnadmin_opt_state): Add new fields to represent new options.

 (ary_prefix_match): New. Copied from svndumpfilter.

 (dump_filter_baton_t,

  dump_filter_func): New.

 (subcommand_dump): Initialize FILTER_BATON.  Pass DUMP_FILTER_FUNC and a

  pointer to FILTER_BATON to svn_repos_dump_fs() if any filtering prefixes

  specified.

 (sub_main): Handle new options.

* subversion/tests/cmdline/svnadmin_tests.py

 (dump_exclude,

  dump_exclude_copysource,

  dump_include,

  dump_not_include_copysource,

  dump_exclude_by_pattern,

  dump_include_by_pattern,

  dump_exclude_all_rev_changes,

  dump_invalid_filtering_option): New.

 (test_list): Add new tests to table.

* subversion/tests/libsvn_repos/dump-load-test.c

 (test_dump_bad_props): Update caller.

Patch by: sergey.raevskiy{_AT_}visualsvn.com

Show less