subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1846002 [32/44] - in /subversion/branches/ra-git: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ build/generator/templates/ build/generator/util/ build/win32/ contrib/client-side/ contrib/client-side/svn_load_dirs/ contr...
Date Wed, 07 Nov 2018 12:30:11 GMT
Modified: subversion/branches/ra-git/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/util.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/util.c (original)
+++ subversion/branches/ra-git/subversion/svn/util.c Wed Nov  7 12:30:06 2018
@@ -614,6 +614,7 @@ svn_cl__try(svn_error_t *err,
               if (! quiet)
                 svn_handle_warning2(stderr, err, "svn: ");
               svn_error_clear(err);
+              va_end(ap);
               return SVN_NO_ERROR;
             }
         }

Modified: subversion/branches/ra-git/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svnadmin/svnadmin.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/ra-git/subversion/svnadmin/svnadmin.c Wed Nov  7 12:30:06 2018
@@ -48,6 +48,7 @@
 #include "private/svn_sorts_private.h"
 #include "private/svn_subr_private.h"
 #include "private/svn_cmdline_private.h"
+#include "private/svn_fspath.h"
 
 #include "svn_private_config.h"
 
@@ -150,7 +151,11 @@ enum svnadmin__cmdline_options_t
     svnadmin__compatible_version,
     svnadmin__check_normalization,
     svnadmin__metadata_only,
-    svnadmin__no_flush_to_disk
+    svnadmin__no_flush_to_disk,
+    svnadmin__normalize_props,
+    svnadmin__exclude,
+    svnadmin__include,
+    svnadmin__glob
   };
 
 /* Option codes and descriptions.
@@ -273,6 +278,22 @@ static const apr_getopt_option_t options
      N_("disable flushing to disk during the operation\n"
         "                             (faster, but unsafe on power off)")},
 
+    {"normalize-props", svnadmin__normalize_props, 0,
+     N_("normalize property values found in the dumpstream\n"
+        "                             (currently, only translates non-LF line endings)")},
+
+    {"exclude", svnadmin__exclude, 1,
+     N_("filter out nodes with given prefix(es) from dump")},
+
+    {"include", svnadmin__include, 1,
+     N_("filter out nodes without given prefix(es) from dump")},
+
+    {"pattern", svnadmin__glob, 0,
+     N_("treat the path prefixes as file glob patterns.\n"
+        "                             Glob special characters are '*' '?' '[]' and '\\'.\n"
+        "                             Character '/' is not treated specially, so\n"
+        "                             pattern /*/foo matches paths /a/foo and /a/b/foo.") },
+
     {NULL}
   };
 
@@ -280,47 +301,59 @@ static const apr_getopt_option_t options
 /* Array of available subcommands.
  * The entire list must be terminated with an entry of nulls.
  */
-static const svn_opt_subcommand_desc2_t cmd_table[] =
+static const svn_opt_subcommand_desc3_t cmd_table[] =
 {
-  {"crashtest", subcommand_crashtest, {0}, N_
-   ("usage: svnadmin crashtest REPOS_PATH\n\n"
+  {"crashtest", subcommand_crashtest, {0}, {N_(
+    "usage: svnadmin crashtest REPOS_PATH\n"
+    "\n"), N_(
     "Open the repository at REPOS_PATH, then abort, thus simulating\n"
-    "a process that crashes while holding an open repository handle.\n"),
+    "a process that crashes while holding an open repository handle.\n"
+   )},
    {0} },
 
-  {"create", subcommand_create, {0}, N_
-   ("usage: svnadmin create REPOS_PATH\n\n"
-    "Create a new, empty repository at REPOS_PATH.\n"),
+  {"create", subcommand_create, {0}, {N_(
+    "usage: svnadmin create REPOS_PATH\n"
+    "\n"), N_(
+    "Create a new, empty repository at REPOS_PATH.\n"
+   )},
    {svnadmin__bdb_txn_nosync, svnadmin__bdb_log_keep,
     svnadmin__config_dir, svnadmin__fs_type, svnadmin__compatible_version,
     svnadmin__pre_1_4_compatible, svnadmin__pre_1_5_compatible,
     svnadmin__pre_1_6_compatible
     } },
 
-  {"delrevprop", subcommand_delrevprop, {0}, N_
-   ("usage: 1. svnadmin delrevprop REPOS_PATH -r REVISION NAME\n"
-    "                   2. svnadmin delrevprop REPO_PATH -t TXN NAME\n\n"
-    "1. Delete the property NAME on revision REVISION.\n\n"
+  {"delrevprop", subcommand_delrevprop, {0}, {N_(
+    "usage: 1. svnadmin delrevprop REPOS_PATH -r REVISION NAME\n"
+    "                   2. svnadmin delrevprop REPOS_PATH -t TXN NAME\n"
+    "\n"), N_(
+    "1. Delete the property NAME on revision REVISION.\n"
+    "\n"), N_(
     "Use --use-pre-revprop-change-hook/--use-post-revprop-change-hook to\n"
     "trigger the revision property-related hooks (for example, if you want\n"
-    "an email notification sent from your post-revprop-change hook).\n\n"
+    "an email notification sent from your post-revprop-change hook).\n"
+    "\n"), N_(
     "NOTE: Revision properties are not versioned, so this command will\n"
-    "irreversibly destroy the previous value of the property.\n\n"
-    "2. Delete the property NAME on transaction TXN.\n"),
+    "irreversibly destroy the previous value of the property.\n"
+    "\n"), N_(
+    "2. Delete the property NAME on transaction TXN.\n"
+   )},
    {'r', 't', svnadmin__use_pre_revprop_change_hook,
     svnadmin__use_post_revprop_change_hook} },
 
-  {"deltify", subcommand_deltify, {0}, N_
-   ("usage: svnadmin deltify [-r LOWER[:UPPER]] REPOS_PATH\n\n"
+  {"deltify", subcommand_deltify, {0}, {N_(
+    "usage: svnadmin deltify [-r LOWER[:UPPER]] REPOS_PATH\n"
+    "\n"), N_(
     "Run over the requested revision range, performing predecessor delti-\n"
     "fication on the paths changed in those revisions.  Deltification in\n"
     "essence compresses the repository by only storing the differences or\n"
     "delta from the preceding revision.  If no revisions are specified,\n"
-    "this will simply deltify the HEAD revision.\n"),
+    "this will simply deltify the HEAD revision.\n"
+   )},
    {'r', 'q', 'M'} },
 
-  {"dump", subcommand_dump, {0}, N_
-   ("usage: svnadmin dump REPOS_PATH [-r LOWER[:UPPER] [--incremental]]\n\n"
+  {"dump", subcommand_dump, {0}, {N_(
+    "usage: svnadmin dump REPOS_PATH [-r LOWER[:UPPER] [--incremental]]\n"
+    "\n"), N_(
     "Dump the contents of filesystem to stdout in a 'dumpfile'\n"
     "portable format, sending feedback to stderr.  Dump revisions\n"
     "LOWER rev through UPPER rev.  If no revisions are given, dump all\n"
@@ -329,191 +362,252 @@ static const svn_opt_subcommand_desc2_t
     "only the paths changed in that revision; otherwise it will describe\n"
     "every path present in the repository as of that revision.  (In either\n"
     "case, the second and subsequent revisions, if any, describe only paths\n"
-    "changed in those revisions.)\n"),
-  {'r', svnadmin__incremental, svnadmin__deltas, 'q', 'M', 'F'},
+    "changed in those revisions.)\n"
+    "\n"), N_(
+    "Using --exclude or --include gives results equivalent to authz-based\n"
+    "path exclusions. In particular, when the source of a copy is\n"
+    "excluded, the copy is transformed into an add (unlike in 'svndumpfilter').\n"
+   )},
+  {'r', svnadmin__incremental, svnadmin__deltas, 'q', 'M', 'F',
+   svnadmin__exclude, svnadmin__include, svnadmin__glob },
   {{'F', N_("write to file ARG instead of stdout")}} },
 
-  {"dump-revprops", subcommand_dump_revprops, {0}, N_
-   ("usage: svnadmin dump-revprops REPOS_PATH [-r LOWER[:UPPER]]\n\n"
+  {"dump-revprops", subcommand_dump_revprops, {0}, {N_(
+    "usage: svnadmin dump-revprops REPOS_PATH [-r LOWER[:UPPER]]\n"
+    "\n"), N_(
     "Dump the revision properties of filesystem to stdout in a 'dumpfile'\n"
     "portable format, sending feedback to stderr.  Dump revisions\n"
     "LOWER rev through UPPER rev.  If no revisions are given, dump the\n"
     "properties for all revisions.  If only LOWER is given, dump the\n"
-    "properties for that one revision.\n"),
+    "properties for that one revision.\n"
+   )},
   {'r', 'q', 'F'},
   {{'F', N_("write to file ARG instead of stdout")}} },
 
-  {"freeze", subcommand_freeze, {0}, N_
-   ("usage: 1. svnadmin freeze REPOS_PATH PROGRAM [ARG...]\n"
-    "               2. svnadmin freeze -F FILE PROGRAM [ARG...]\n\n"
+  {"freeze", subcommand_freeze, {0}, {N_(
+    "usage: 1. svnadmin freeze REPOS_PATH -- PROGRAM [ARG...]\n"
+    "               2. svnadmin freeze -F FILE -- PROGRAM [ARG...]\n"
+    "\n"), N_(
     "1. Run PROGRAM passing ARGS while holding a write-lock on REPOS_PATH.\n"
-    "\n"
+    "   Allows safe use of third-party backup tools on a live repository.\n"
+    "\n"), N_(
     "2. Like 1 except all repositories listed in FILE are locked. The file\n"
     "   format is repository paths separated by newlines.  Repositories are\n"
-    "   locked in the same order as they are listed in the file.\n"),
+    "   locked in the same order as they are listed in the file.\n"
+    "\n"
+    "The '--' tells svnadmin to stop looking for svnadmin options and pass\n"
+    "all later arguments to PROGRAM even if they begin with '-'.\n"
+   )},
    {'F'},
    {{'F', N_("read repository paths from file ARG")}} },
 
-  {"help", subcommand_help, {"?", "h"}, N_
-   ("usage: svnadmin help [SUBCOMMAND...]\n\n"
-    "Describe the usage of this program or its subcommands.\n"),
+  {"help", subcommand_help, {"?", "h"}, {N_(
+    "usage: svnadmin help [SUBCOMMAND...]\n"
+    "\n"), N_(
+    "Describe the usage of this program or its subcommands.\n"
+   )},
    {0} },
 
-  {"hotcopy", subcommand_hotcopy, {0}, N_
-   ("usage: svnadmin hotcopy REPOS_PATH NEW_REPOS_PATH\n\n"
+  {"hotcopy", subcommand_hotcopy, {0}, {N_(
+    "usage: svnadmin hotcopy REPOS_PATH NEW_REPOS_PATH\n"
+    "\n"), N_(
     "Make a hot copy of a repository.\n"
     "If --incremental is passed, data which already exists at the destination\n"
-    "is not copied again.  Incremental mode is implemented for FSFS repositories.\n"),
+    "is not copied again.  Incremental mode is implemented for FSFS repositories.\n"
+   )},
    {svnadmin__clean_logs, svnadmin__incremental, 'q'} },
 
-  {"info", subcommand_info, {0}, N_
-   ("usage: svnadmin info REPOS_PATH\n\n"
-    "Print information about the repository at REPOS_PATH.\n"),
+  {"info", subcommand_info, {0}, {N_(
+    "usage: svnadmin info REPOS_PATH\n"
+    "\n"), N_(
+    "Print information about the repository at REPOS_PATH.\n"
+   )},
    {0} },
 
-  {"list-dblogs", subcommand_list_dblogs, {0}, N_
-   ("usage: svnadmin list-dblogs REPOS_PATH\n\n"
-    "List all Berkeley DB log files.\n\n"
+  {"list-dblogs", subcommand_list_dblogs, {0}, {N_(
+    "usage: svnadmin list-dblogs REPOS_PATH\n"
+    "\n"), N_(
+    "List all Berkeley DB log files.\n"
+    "\n"), N_(
     "WARNING: Modifying or deleting logfiles which are still in use\n"
-    "will cause your repository to be corrupted.\n"),
+    "will cause your repository to be corrupted.\n"
+   )},
    {0} },
 
-  {"list-unused-dblogs", subcommand_list_unused_dblogs, {0}, N_
-   ("usage: svnadmin list-unused-dblogs REPOS_PATH\n\n"
-    "List unused Berkeley DB log files.\n\n"),
+  {"list-unused-dblogs", subcommand_list_unused_dblogs, {0}, {N_(
+    "usage: svnadmin list-unused-dblogs REPOS_PATH\n"
+    "\n"), N_(
+    "List unused Berkeley DB log files.\n"
+   )},
    {0} },
 
-  {"load", subcommand_load, {0}, N_
-   ("usage: svnadmin load REPOS_PATH\n\n"
+  {"load", subcommand_load, {0}, {N_(
+    "usage: svnadmin load REPOS_PATH\n"
+    "\n"), N_(
     "Read a 'dumpfile'-formatted stream from stdin, committing\n"
     "new revisions into the repository's filesystem.  If the repository\n"
     "was previously empty, its UUID will, by default, be changed to the\n"
     "one specified in the stream.  Progress feedback is sent to stdout.\n"
     "If --revision is specified, limit the loaded revisions to only those\n"
-    "in the dump stream whose revision numbers match the specified range.\n"),
+    "in the dump stream whose revision numbers match the specified range.\n"
+   )},
    {'q', 'r', svnadmin__ignore_uuid, svnadmin__force_uuid,
     svnadmin__ignore_dates,
     svnadmin__use_pre_commit_hook, svnadmin__use_post_commit_hook,
-    svnadmin__parent_dir, svnadmin__bypass_prop_validation, 'M',
+    svnadmin__parent_dir, svnadmin__normalize_props,
+    svnadmin__bypass_prop_validation, 'M',
     svnadmin__no_flush_to_disk, 'F'},
    {{'F', N_("read from file ARG instead of stdin")}} },
 
-  {"load-revprops", subcommand_load_revprops, {0}, N_
-   ("usage: svnadmin load-revprops REPOS_PATH\n\n"
+  {"load-revprops", subcommand_load_revprops, {0}, {N_(
+    "usage: svnadmin load-revprops REPOS_PATH\n"
+    "\n"), N_(
     "Read a 'dumpfile'-formatted stream from stdin, setting the revision\n"
     "properties in the repository's filesystem.  Revisions not found in the\n"
     "repository will cause an error.  Progress feedback is sent to stdout.\n"
     "If --revision is specified, limit the loaded revisions to only those\n"
-    "in the dump stream whose revision numbers match the specified range.\n"),
-   {'q', 'r', svnadmin__force_uuid, svnadmin__bypass_prop_validation,
-    svnadmin__no_flush_to_disk, 'F'},
+    "in the dump stream whose revision numbers match the specified range.\n"
+   )},
+   {'q', 'r', svnadmin__force_uuid, svnadmin__normalize_props,
+    svnadmin__bypass_prop_validation, svnadmin__no_flush_to_disk, 'F'},
    {{'F', N_("read from file ARG instead of stdin")}} },
 
-  {"lock", subcommand_lock, {0}, N_
-   ("usage: svnadmin lock REPOS_PATH PATH USERNAME COMMENT-FILE [TOKEN]\n\n"
+  {"lock", subcommand_lock, {0}, {N_(
+    "usage: svnadmin lock REPOS_PATH PATH USERNAME COMMENT-FILE [TOKEN]\n"
+    "\n"), N_(
     "Lock PATH by USERNAME setting comments from COMMENT-FILE.\n"
     "If provided, use TOKEN as lock token.  Use --bypass-hooks to avoid\n"
-    "triggering the pre-lock and post-lock hook scripts.\n"),
-  {svnadmin__bypass_hooks} },
-
-  {"lslocks", subcommand_lslocks, {0}, N_
-   ("usage: svnadmin lslocks REPOS_PATH [PATH-IN-REPOS]\n\n"
+    "triggering the pre-lock and post-lock hook scripts.\n"
+   )},
+  {svnadmin__bypass_hooks, 'q'} },
+
+  {"lslocks", subcommand_lslocks, {0}, {N_(
+    "usage: svnadmin lslocks REPOS_PATH [PATH-IN-REPOS]\n"
+    "\n"), N_(
     "Print descriptions of all locks on or under PATH-IN-REPOS (which,\n"
-    "if not provided, is the root of the repository).\n"),
+    "if not provided, is the root of the repository).\n"
+   )},
    {0} },
 
-  {"lstxns", subcommand_lstxns, {0}, N_
-   ("usage: svnadmin lstxns REPOS_PATH\n\n"
+  {"lstxns", subcommand_lstxns, {0}, {N_(
+    "usage: svnadmin lstxns REPOS_PATH\n"
+    "\n"), N_(
     "Print the names of uncommitted transactions. With -rN skip the output\n"
     "of those that have a base revision more recent than rN.  Transactions\n"
     "with base revisions much older than HEAD are likely to have been\n"
-    "abandonded and are candidates to be removed.\n"),
+    "abandonded and are candidates to be removed.\n"
+   )},
    {'r'},
    { {'r', "transaction base revision ARG"} } },
 
-  {"pack", subcommand_pack, {0}, N_
-   ("usage: svnadmin pack REPOS_PATH\n\n"
+  {"pack", subcommand_pack, {0}, {N_(
+    "usage: svnadmin pack REPOS_PATH\n"
+    "\n"), N_(
     "Possibly compact the repository into a more efficient storage model.\n"
-    "This may not apply to all repositories, in which case, exit.\n"),
+    "This may not apply to all repositories, in which case, exit.\n"
+   )},
    {'q', 'M'} },
 
-  {"recover", subcommand_recover, {0}, N_
-   ("usage: svnadmin recover REPOS_PATH\n\n"
+  {"recover", subcommand_recover, {0}, {N_(
+    "usage: svnadmin recover REPOS_PATH\n"
+    "\n"), N_(
     "Run the recovery procedure on a repository.  Do this if you've\n"
     "been getting errors indicating that recovery ought to be run.\n"
     "Berkeley DB recovery requires exclusive access and will\n"
-    "exit if the repository is in use by another process.\n"),
+    "exit if the repository is in use by another process.\n"
+   )},
    {svnadmin__wait} },
 
-  {"rmlocks", subcommand_rmlocks, {0}, N_
-   ("usage: svnadmin rmlocks REPOS_PATH LOCKED_PATH...\n\n"
-    "Unconditionally remove lock from each LOCKED_PATH.\n"),
-   {0} },
+  {"rmlocks", subcommand_rmlocks, {0}, {N_(
+    "usage: svnadmin rmlocks REPOS_PATH LOCKED_PATH...\n"
+    "\n"), N_(
+    "Unconditionally remove lock from each LOCKED_PATH.\n"
+   )},
+   {'q'} },
 
-  {"rmtxns", subcommand_rmtxns, {0}, N_
-   ("usage: svnadmin rmtxns REPOS_PATH TXN_NAME...\n\n"
-    "Delete the named transaction(s).\n"),
+  {"rmtxns", subcommand_rmtxns, {0}, {N_(
+    "usage: svnadmin rmtxns REPOS_PATH TXN_NAME...\n"
+    "\n"), N_(
+    "Delete the named transaction(s).\n"
+   )},
    {'q'} },
 
-  {"setlog", subcommand_setlog, {0}, N_
-   ("usage: svnadmin setlog REPOS_PATH -r REVISION FILE\n\n"
+  {"setlog", subcommand_setlog, {0}, {N_(
+    "usage: svnadmin setlog REPOS_PATH -r REVISION FILE\n"
+    "\n"), N_(
     "Set the log-message on revision REVISION to the contents of FILE.  Use\n"
     "--bypass-hooks to avoid triggering the revision-property-related hooks\n"
     "(for example, if you do not want an email notification sent\n"
     "from your post-revprop-change hook, or because the modification of\n"
     "revision properties has not been enabled in the pre-revprop-change\n"
-    "hook).\n\n"
+    "hook).\n"
+    "\n"), N_(
     "NOTE: Revision properties are not versioned, so this command will\n"
-    "overwrite the previous log message.\n"),
+    "overwrite the previous log message.\n"
+   )},
    {'r', svnadmin__bypass_hooks} },
 
-  {"setrevprop", subcommand_setrevprop, {0}, N_
-   ("usage: 1. svnadmin setrevprop REPOS_PATH -r REVISION NAME FILE\n"
-    "                   2. svnadmin setrevprop REPOS_PATH -t TXN NAME FILE\n\n"
-    "1. Set the property NAME on revision REVISION to the contents of FILE.\n\n"
+  {"setrevprop", subcommand_setrevprop, {0}, {N_(
+    "usage: 1. svnadmin setrevprop REPOS_PATH -r REVISION NAME FILE\n"
+    "                   2. svnadmin setrevprop REPOS_PATH -t TXN NAME FILE\n"
+    "\n"), N_(
+    "1. Set the property NAME on revision REVISION to the contents of FILE.\n"
+    "\n"), N_(
     "Use --use-pre-revprop-change-hook/--use-post-revprop-change-hook to\n"
     "trigger the revision property-related hooks (for example, if you want\n"
-    "an email notification sent from your post-revprop-change hook).\n\n"
+    "an email notification sent from your post-revprop-change hook).\n"
+    "\n"), N_(
     "NOTE: Revision properties are not versioned, so this command will\n"
-    "overwrite the previous value of the property.\n\n"
-    "2. Set the property NAME on transaction TXN to the contents of FILE.\n"),
+    "overwrite the previous value of the property.\n"
+    "\n"), N_(
+    "2. Set the property NAME on transaction TXN to the contents of FILE.\n"
+   )},
    {'r', 't', svnadmin__use_pre_revprop_change_hook,
     svnadmin__use_post_revprop_change_hook} },
 
-  {"setuuid", subcommand_setuuid, {0}, N_
-   ("usage: svnadmin setuuid REPOS_PATH [NEW_UUID]\n\n"
+  {"setuuid", subcommand_setuuid, {0}, {N_(
+    "usage: svnadmin setuuid REPOS_PATH [NEW_UUID]\n"
+    "\n"), N_(
     "Reset the repository UUID for the repository located at REPOS_PATH.  If\n"
     "NEW_UUID is provided, use that as the new repository UUID; otherwise,\n"
-    "generate a brand new UUID for the repository.\n"),
+    "generate a brand new UUID for the repository.\n"
+   )},
    {0} },
 
-  {"unlock", subcommand_unlock, {0}, N_
-   ("usage: svnadmin unlock REPOS_PATH LOCKED_PATH USERNAME TOKEN\n\n"
+  {"unlock", subcommand_unlock, {0}, {N_(
+    "usage: svnadmin unlock REPOS_PATH LOCKED_PATH USERNAME TOKEN\n"
+    "\n"), N_(
     "Unlock LOCKED_PATH (as USERNAME) after verifying that the token\n"
     "associated with the lock matches TOKEN.  Use --bypass-hooks to avoid\n"
-    "triggering the pre-unlock and post-unlock hook scripts.\n"),
-   {svnadmin__bypass_hooks} },
-
-  {"upgrade", subcommand_upgrade, {0}, N_
-   ("usage: svnadmin upgrade REPOS_PATH\n\n"
+    "triggering the pre-unlock and post-unlock hook scripts.\n"
+   )},
+   {svnadmin__bypass_hooks, 'q'} },
+
+  {"upgrade", subcommand_upgrade, {0}, {N_(
+    "usage: svnadmin upgrade REPOS_PATH\n"
+    "\n"), N_(
     "Upgrade the repository located at REPOS_PATH to the latest supported\n"
-    "schema version.\n\n"
+    "schema version.\n"
+    "\n"), N_(
     "This functionality is provided as a convenience for repository\n"
     "administrators who wish to make use of new Subversion functionality\n"
     "without having to undertake a potentially costly full repository dump\n"
     "and load operation.  As such, the upgrade performs only the minimum\n"
     "amount of work needed to accomplish this while still maintaining the\n"
     "integrity of the repository.  It does not guarantee the most optimized\n"
-    "repository state as a dump and subsequent load would.\n"),
+    "repository state as a dump and subsequent load would.\n"
+   )},
    {0} },
 
-  {"verify", subcommand_verify, {0}, N_
-   ("usage: svnadmin verify REPOS_PATH\n\n"
-    "Verify the data stored in the repository.\n"),
+  {"verify", subcommand_verify, {0}, {N_(
+    "usage: svnadmin verify REPOS_PATH\n"
+    "\n"), N_(
+    "Verify the data stored in the repository.\n"
+   )},
    {'t', 'r', 'q', svnadmin__keep_going, 'M',
     svnadmin__check_normalization, svnadmin__metadata_only} },
 
-  { NULL, NULL, {0}, NULL, {0} }
+  { NULL, NULL, {0}, {NULL}, {0} }
 };
 
 
@@ -545,11 +639,15 @@ struct svnadmin_opt_state
   svn_boolean_t bypass_prop_validation;             /* --bypass-prop-validation */
   svn_boolean_t ignore_dates;                       /* --ignore-dates */
   svn_boolean_t no_flush_to_disk;                   /* --no-flush-to-disk */
+  svn_boolean_t normalize_props;                    /* --normalize_props */
   enum svn_repos_load_uuid uuid_action;             /* --ignore-uuid,
                                                        --force-uuid */
   apr_uint64_t memory_cache_size;                   /* --memory-cache-size M */
   const char *parent_dir;                           /* --parent-dir */
   const char *file;                                 /* --file */
+  apr_array_header_t *exclude;                      /* --exclude */
+  apr_array_header_t *include;                      /* --include */
+  svn_boolean_t glob;                               /* --pattern */
 
   const char *config_dir;    /* Overriding Configuration Directory */
 };
@@ -615,16 +713,25 @@ get_revnum(svn_revnum_t *revnum, const s
   return SVN_NO_ERROR;
 }
 
-/* Set *PATH to an internal-style, UTF8-encoded, local dirent path
-   allocated from POOL and parsed from raw command-line argument ARG. */
+/* Set *FSPATH to an internal-style fspath parsed from ARG. */
 static svn_error_t *
-target_arg_to_dirent(const char **dirent,
+target_arg_to_fspath(const char **fspath,
                      const char *arg,
-                     apr_pool_t *pool)
+                     apr_pool_t *result_pool,
+                     apr_pool_t *scratch_pool)
 {
-  const char *path;
+  /* ### Using a private API.  This really shouldn't be needed. */
+  *fspath = svn_fspath__canonicalize(arg, result_pool);
+  return SVN_NO_ERROR;
+}
 
-  SVN_ERR(svn_utf_cstring_to_utf8(&path, arg, pool));
+/* Set *DIRENT to an internal-style, local dirent path
+   allocated from POOL and parsed from PATH. */
+static svn_error_t *
+target_arg_to_dirent(const char **dirent,
+                     const char *path,
+                     apr_pool_t *pool)
+{
   if (svn_path_is_url(path))
     return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                              _("Path '%s' is not a local path"), path);
@@ -666,8 +773,12 @@ parse_args(apr_array_header_t **args,
 
       if (num_args)
         while (os->ind < os->argc)
-          APR_ARRAY_PUSH(*args, const char *) =
-            apr_pstrdup(pool, os->argv[os->ind++]);
+          {
+            const char *arg;
+
+            SVN_ERR(svn_utf_cstring_to_utf8(&arg, os->argv[os->ind++], pool));
+            APR_ARRAY_PUSH(*args, const char *) = arg;
+          }
     }
 
   return SVN_NO_ERROR;
@@ -1233,6 +1344,58 @@ get_dump_range(svn_revnum_t *lower,
   return SVN_NO_ERROR;
 }
 
+/* Compare the node-path PATH with the (const char *) prefixes in PFXLIST.
+ * Return TRUE if any prefix is a prefix of PATH (matching whole path
+ * components); FALSE otherwise.
+ * PATH starts with a '/', as do the (const char *) paths in PREFIXES. */
+/* This function is a duplicate of svndumpfilter.c:ary_prefix_match(). */
+static svn_boolean_t
+ary_prefix_match(const apr_array_header_t *pfxlist, const char *path)
+{
+  int i;
+  size_t path_len = strlen(path);
+
+  for (i = 0; i < pfxlist->nelts; i++)
+    {
+      const char *pfx = APR_ARRAY_IDX(pfxlist, i, const char *);
+      size_t pfx_len = strlen(pfx);
+
+      if (path_len < pfx_len)
+        continue;
+      if (strncmp(path, pfx, pfx_len) == 0
+          && (pfx_len == 1 || path[pfx_len] == '\0' || path[pfx_len] == '/'))
+        return TRUE;
+    }
+
+  return FALSE;
+}
+
+/* Baton for dump_filter_func(). */
+struct dump_filter_baton_t
+{
+  apr_array_header_t *prefixes;
+  svn_boolean_t glob;
+  svn_boolean_t do_exclude;
+};
+
+/* Implements svn_repos_dump_filter_func_t. */
+static svn_error_t *
+dump_filter_func(svn_boolean_t *include,
+                 svn_fs_root_t *root,
+                 const char *path,
+                 void *baton,
+                 apr_pool_t *scratch_pool)
+{
+  struct dump_filter_baton_t *b = baton;
+  const svn_boolean_t matches =
+    (b->glob
+     ? svn_cstring_match_glob_list(path, b->prefixes)
+     : ary_prefix_match(b->prefixes, path));
+
+  *include = b->do_exclude ? !matches : matches;
+  return SVN_NO_ERROR;
+}
+
 /* This implements `svn_opt_subcommand_t'. */
 static svn_error_t *
 subcommand_dump(apr_getopt_t *os, void *baton, apr_pool_t *pool)
@@ -1242,6 +1405,7 @@ subcommand_dump(apr_getopt_t *os, void *
   svn_stream_t *out_stream;
   svn_revnum_t lower, upper;
   svn_stream_t *feedback_stream = NULL;
+  struct dump_filter_baton_t filter_baton = {0};
 
   /* Expect no more arguments. */
   SVN_ERR(parse_args(NULL, os, 0, 0, pool));
@@ -1267,11 +1431,34 @@ subcommand_dump(apr_getopt_t *os, void *
   if (! opt_state->quiet)
     feedback_stream = recode_stream_create(stderr, pool);
 
+  /* Initialize the filter baton. */
+  filter_baton.glob = opt_state->glob;
+
+  if (opt_state->exclude && !opt_state->include)
+    {
+      filter_baton.prefixes = opt_state->exclude;
+      filter_baton.do_exclude = TRUE;
+    }
+  else if (opt_state->include && !opt_state->exclude)
+    {
+      filter_baton.prefixes = opt_state->include;
+      filter_baton.do_exclude = FALSE;
+    }
+  else if (opt_state->include && opt_state->exclude)
+    {
+      return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                               _("'--exclude' and '--include' options "
+                                 "cannot be used simultaneously"));
+    }
+
   SVN_ERR(svn_repos_dump_fs4(repos, out_stream, lower, upper,
                              opt_state->incremental, opt_state->use_deltas,
                              TRUE, TRUE,
                              !opt_state->quiet ? repos_notify_handler : NULL,
-                             feedback_stream, check_cancel, NULL, pool));
+                             feedback_stream,
+                             filter_baton.prefixes ? dump_filter_func : NULL,
+                             &filter_baton,
+                             check_cancel, NULL, pool));
 
   return SVN_NO_ERROR;
 }
@@ -1313,7 +1500,8 @@ subcommand_dump_revprops(apr_getopt_t *o
   SVN_ERR(svn_repos_dump_fs4(repos, out_stream, lower, upper,
                              FALSE, FALSE, TRUE, FALSE,
                              !opt_state->quiet ? repos_notify_handler : NULL,
-                             feedback_stream, check_cancel, NULL, pool));
+                             feedback_stream, NULL, NULL,
+                             check_cancel, NULL, pool));
 
   return SVN_NO_ERROR;
 }
@@ -1359,7 +1547,7 @@ subcommand_freeze(apr_getopt_t *os, void
   int i;
   struct freeze_baton_t b;
 
-  SVN_ERR(svn_opt_parse_all_args(&args, os, pool));
+  SVN_ERR(parse_args(&args, os, -1, -1, pool));
 
   if (!args->nelts)
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, 0,
@@ -1418,7 +1606,7 @@ subcommand_help(apr_getopt_t *os, void *
   version_footer = svn_stringbuf_create(fs_desc_start, pool);
   SVN_ERR(svn_fs_print_modules(version_footer, pool));
 
-  SVN_ERR(svn_opt_print_help4(os, "svnadmin",
+  SVN_ERR(svn_opt_print_help5(os, "svnadmin",
                               opt_state ? opt_state->version : FALSE,
                               opt_state ? opt_state->quiet : FALSE,
                               /*###opt_state ? opt_state->verbose :*/ FALSE,
@@ -1519,20 +1707,32 @@ subcommand_load(apr_getopt_t *os, void *
   if (! opt_state->quiet)
     feedback_stream = recode_stream_create(stdout, pool);
 
-  err = svn_repos_load_fs5(repos, in_stream, lower, upper,
+  err = svn_repos_load_fs6(repos, in_stream, lower, upper,
                            opt_state->uuid_action, opt_state->parent_dir,
                            opt_state->use_pre_commit_hook,
                            opt_state->use_post_commit_hook,
                            !opt_state->bypass_prop_validation,
                            opt_state->ignore_dates,
+                           opt_state->normalize_props,
                            opt_state->quiet ? NULL : repos_notify_handler,
                            feedback_stream, check_cancel, NULL, pool);
-  if (err && err->apr_err == SVN_ERR_BAD_PROPERTY_VALUE)
-    return svn_error_quick_wrap(err,
-                                _("Invalid property value found in "
-                                  "dumpstream; consider repairing the source "
-                                  "or using --bypass-prop-validation while "
-                                  "loading."));
+
+  if (svn_error_find_cause(err, SVN_ERR_BAD_PROPERTY_VALUE_EOL))
+    {
+      return svn_error_quick_wrap(err,
+                                  _("A property with invalid line ending "
+                                    "found in dumpstream; consider using "
+                                    "--normalize-props while loading."));
+    }
+  else if (err && err->apr_err == SVN_ERR_BAD_PROPERTY_VALUE)
+    {
+      return svn_error_quick_wrap(err,
+                                  _("Invalid property value found in "
+                                    "dumpstream; consider repairing the "
+                                    "source or using --bypass-prop-validation "
+                                    "while loading."));
+    }
+
   return err;
 }
 
@@ -1570,15 +1770,27 @@ subcommand_load_revprops(apr_getopt_t *o
   err = svn_repos_load_fs_revprops(repos, in_stream, lower, upper,
                                    !opt_state->bypass_prop_validation,
                                    opt_state->ignore_dates,
+                                   opt_state->normalize_props,
                                    opt_state->quiet ? NULL
                                                     : repos_notify_handler,
                                    feedback_stream, check_cancel, NULL, pool);
-  if (err && err->apr_err == SVN_ERR_BAD_PROPERTY_VALUE)
-    return svn_error_quick_wrap(err,
-                                _("Invalid property value found in "
-                                  "dumpstream; consider repairing the source "
-                                  "or using --bypass-prop-validation while "
-                                  "loading."));
+
+  if (svn_error_find_cause(err, SVN_ERR_BAD_PROPERTY_VALUE_EOL))
+    {
+      return svn_error_quick_wrap(err,
+                                  _("A property with invalid line ending "
+                                    "found in dumpstream; consider using "
+                                    "--normalize-props while loading."));
+    }
+  else if (err && err->apr_err == SVN_ERR_BAD_PROPERTY_VALUE)
+    {
+      return svn_error_quick_wrap(err,
+                                  _("Invalid property value found in "
+                                    "dumpstream; consider repairing the "
+                                    "source or using --bypass-prop-validation "
+                                    "while loading."));
+    }
+
   return err;
 }
 
@@ -1714,12 +1926,12 @@ list_dblogs(apr_getopt_t *os, void *bato
      style before printing. */
   for (i = 0; i < logfiles->nelts; i++)
     {
-      const char *log_utf8;
-      log_utf8 = svn_dirent_join(opt_state->repository_path,
+      const char *log_path;
+      log_path = svn_dirent_join(opt_state->repository_path,
                                  APR_ARRAY_IDX(logfiles, i, const char *),
                                  pool);
-      log_utf8 = svn_dirent_local_style(log_utf8, pool);
-      SVN_ERR(svn_cmdline_printf(pool, "%s\n", log_utf8));
+      log_path = svn_dirent_local_style(log_path, pool);
+      SVN_ERR(svn_cmdline_printf(pool, "%s\n", log_path));
     }
 
   return SVN_NO_ERROR;
@@ -1759,7 +1971,7 @@ subcommand_rmtxns(apr_getopt_t *os, void
   int i;
   apr_pool_t *subpool = svn_pool_create(pool);
 
-  SVN_ERR(svn_opt_parse_all_args(&args, os, pool));
+  SVN_ERR(parse_args(&args, os, -1, -1, pool));
 
   SVN_ERR(open_repos(&repos, opt_state->repository_path, opt_state, pool));
   fs = svn_repos_fs(repos);
@@ -1768,15 +1980,12 @@ subcommand_rmtxns(apr_getopt_t *os, void
   for (i = 0; i < args->nelts; i++)
     {
       const char *txn_name = APR_ARRAY_IDX(args, i, const char *);
-      const char *txn_name_utf8;
       svn_error_t *err;
 
       svn_pool_clear(subpool);
 
-      SVN_ERR(svn_utf_cstring_to_utf8(&txn_name_utf8, txn_name, subpool));
-
       /* Try to open the txn.  If that succeeds, try to abort it. */
-      err = svn_fs_open_txn(&txn, fs, txn_name_utf8, subpool);
+      err = svn_fs_open_txn(&txn, fs, txn_name, subpool);
       if (! err)
         err = svn_fs_abort_txn(txn, subpool);
 
@@ -1787,7 +1996,7 @@ subcommand_rmtxns(apr_getopt_t *os, void
       if (err && (err->apr_err == SVN_ERR_FS_TRANSACTION_DEAD))
         {
           svn_error_clear(err);
-          err = svn_fs_purge_txn(fs, txn_name_utf8, subpool);
+          err = svn_fs_purge_txn(fs, txn_name, subpool);
         }
 
       /* If we had a real from the txn open, abort, or purge, we clear
@@ -2048,15 +2257,16 @@ subcommand_verify(apr_getopt_t *os, void
                                check_cancel, NULL, pool));
 
   /* Show the --keep-going error summary. */
-  if (!opt_state->quiet
-      && opt_state->keep_going
-      && verify_baton.error_summary->nelts > 0)
+  if (opt_state->keep_going && verify_baton.error_summary->nelts > 0)
     {
       int rev_maxlength;
       svn_revnum_t end_revnum;
       apr_pool_t *iterpool;
       int i;
 
+      if (feedback_stream == NULL) /* happens when we are in --quiet mode */
+        feedback_stream = recode_stream_create(stdout, pool);
+
       svn_error_clear(
         svn_stream_puts(feedback_stream,
                           _("\n-----Summary of corrupt revisions-----\n")));
@@ -2293,7 +2503,6 @@ subcommand_lock(apr_getopt_t *os, void *
   const char *lock_path;
   const char *comment_file_name;
   svn_stringbuf_t *file_contents;
-  const char *lock_path_utf8;
   svn_lock_t *lock;
   const char *lock_token = NULL;
 
@@ -2320,10 +2529,10 @@ subcommand_lock(apr_getopt_t *os, void *
 
   SVN_ERR(svn_stringbuf_from_file2(&file_contents, comment_file_name, pool));
 
-  SVN_ERR(svn_utf_cstring_to_utf8(&lock_path_utf8, lock_path, pool));
+  SVN_ERR(target_arg_to_fspath(&lock_path, lock_path, pool, pool));
 
   if (opt_state->bypass_hooks)
-    SVN_ERR(svn_fs_lock(&lock, fs, lock_path_utf8,
+    SVN_ERR(svn_fs_lock(&lock, fs, lock_path,
                         lock_token,
                         file_contents->data, /* comment */
                         0,                   /* is_dav_comment */
@@ -2331,7 +2540,7 @@ subcommand_lock(apr_getopt_t *os, void *
                         SVN_INVALID_REVNUM,
                         FALSE, pool));
   else
-    SVN_ERR(svn_repos_fs_lock(&lock, repos, lock_path_utf8,
+    SVN_ERR(svn_repos_fs_lock(&lock, repos, lock_path,
                               lock_token,
                               file_contents->data, /* comment */
                               0,                   /* is_dav_comment */
@@ -2339,8 +2548,10 @@ subcommand_lock(apr_getopt_t *os, void *
                               SVN_INVALID_REVNUM,
                               FALSE, pool));
 
-  SVN_ERR(svn_cmdline_printf(pool, _("'%s' locked by user '%s'.\n"),
-                             lock_path, username));
+  if (! opt_state->quiet)
+    SVN_ERR(svn_cmdline_printf(pool, _("'%s' locked by user '%s'.\n"),
+                               lock_path, username));
+
   return SVN_NO_ERROR;
 }
 
@@ -2350,7 +2561,7 @@ subcommand_lslocks(apr_getopt_t *os, voi
   struct svnadmin_opt_state *opt_state = baton;
   apr_array_header_t *targets;
   svn_repos_t *repos;
-  const char *fs_path = "/";
+  const char *fs_path;
   apr_hash_t *locks;
   apr_hash_index_t *hi;
   apr_pool_t *iterpool = svn_pool_create(pool);
@@ -2364,6 +2575,9 @@ subcommand_lslocks(apr_getopt_t *os, voi
                             _("Too many arguments given"));
   if (targets->nelts)
     fs_path = APR_ARRAY_IDX(targets, 0, const char *);
+  else
+    fs_path = "/";
+  SVN_ERR(target_arg_to_fspath(&fs_path, fs_path, pool, pool));
 
   SVN_ERR(open_repos(&repos, opt_state->repository_path, opt_state, pool));
 
@@ -2439,7 +2653,7 @@ subcommand_rmlocks(apr_getopt_t *os, voi
   SVN_ERR(svn_fs_set_access(fs, access));
 
   /* Parse out any options. */
-  SVN_ERR(svn_opt_parse_all_args(&args, os, pool));
+  SVN_ERR(parse_args(&args, os, -1, -1, pool));
 
   /* Our usage requires at least one FS path. */
   if (args->nelts == 0)
@@ -2450,31 +2664,34 @@ subcommand_rmlocks(apr_getopt_t *os, voi
   for (i = 0; i < args->nelts; i++)
     {
       const char *lock_path = APR_ARRAY_IDX(args, i, const char *);
-      const char *lock_path_utf8;
       svn_lock_t *lock;
 
-      SVN_ERR(svn_utf_cstring_to_utf8(&lock_path_utf8, lock_path, subpool));
+      SVN_ERR(target_arg_to_fspath(&lock_path, lock_path, subpool, subpool));
 
       /* Fetch the path's svn_lock_t. */
-      err = svn_fs_get_lock(&lock, fs, lock_path_utf8, subpool);
+      err = svn_fs_get_lock(&lock, fs, lock_path, subpool);
       if (err)
         goto move_on;
       if (! lock)
         {
-          SVN_ERR(svn_cmdline_printf(subpool,
-                                     _("Path '%s' isn't locked.\n"),
-                                     lock_path));
+          if (! opt_state->quiet)
+            SVN_ERR(svn_cmdline_printf(subpool,
+                                       _("Path '%s' isn't locked.\n"),
+                                       lock_path));
           continue;
         }
+      lock = NULL; /* Don't access LOCK after this point. */
 
       /* Now forcibly destroy the lock. */
-      err = svn_fs_unlock(fs, lock_path_utf8,
-                          lock->token, 1 /* force */, subpool);
+      err = svn_fs_unlock(fs, lock_path,
+                          NULL, 1 /* force */, subpool);
       if (err)
         goto move_on;
 
-      SVN_ERR(svn_cmdline_printf(subpool,
-                                 _("Removed lock on '%s'.\n"), lock->path));
+      if (! opt_state->quiet)
+        SVN_ERR(svn_cmdline_printf(subpool,
+                                   _("Removed lock on '%s'.\n"),
+                                   lock_path));
 
     move_on:
       if (err)
@@ -2503,7 +2720,6 @@ subcommand_unlock(apr_getopt_t *os, void
   apr_array_header_t *args;
   const char *username;
   const char *lock_path;
-  const char *lock_path_utf8;
   const char *lock_token = NULL;
 
   /* Expect three more arguments: PATH USERNAME TOKEN */
@@ -2519,16 +2735,18 @@ subcommand_unlock(apr_getopt_t *os, void
   SVN_ERR(svn_fs_create_access(&access, username, pool));
   SVN_ERR(svn_fs_set_access(fs, access));
 
-  SVN_ERR(svn_utf_cstring_to_utf8(&lock_path_utf8, lock_path, pool));
+  SVN_ERR(target_arg_to_fspath(&lock_path, lock_path, pool, pool));
   if (opt_state->bypass_hooks)
-    SVN_ERR(svn_fs_unlock(fs, lock_path_utf8, lock_token,
+    SVN_ERR(svn_fs_unlock(fs, lock_path, lock_token,
                           FALSE, pool));
   else
-    SVN_ERR(svn_repos_fs_unlock(repos, lock_path_utf8, lock_token,
+    SVN_ERR(svn_repos_fs_unlock(repos, lock_path, lock_token,
                                 FALSE, pool));
 
-  SVN_ERR(svn_cmdline_printf(pool, _("'%s' unlocked by user '%s'.\n"),
-                             lock_path, username));
+  if (! opt_state->quiet)
+    SVN_ERR(svn_cmdline_printf(pool, _("'%s' unlocked by user '%s'.\n"),
+                               lock_path, username));
+
   return SVN_NO_ERROR;
 }
 
@@ -2643,7 +2861,7 @@ sub_main(int *exit_code, int argc, const
   svn_error_t *err;
   apr_status_t apr_err;
 
-  const svn_opt_subcommand_desc2_t *subcommand = NULL;
+  const svn_opt_subcommand_desc3_t *subcommand = NULL;
   struct svnadmin_opt_state opt_state = { 0 };
   apr_getopt_t *os;
   int opt_id;
@@ -2728,8 +2946,12 @@ sub_main(int *exit_code, int argc, const
         opt_state.help = TRUE;
         break;
       case 'M':
-        opt_state.memory_cache_size
-            = 0x100000 * apr_strtoi64(opt_arg, NULL, 0);
+        {
+          apr_uint64_t sz_val;
+          SVN_ERR(svn_cstring_atoui64(&sz_val, opt_arg));
+
+          opt_state.memory_cache_size = 0x100000 * sz_val;
+        }
         break;
       case 'F':
         SVN_ERR(svn_utf_cstring_to_utf8(&(opt_state.file), opt_arg, pool));
@@ -2860,6 +3082,26 @@ sub_main(int *exit_code, int argc, const
       case svnadmin__no_flush_to_disk:
         opt_state.no_flush_to_disk = TRUE;
         break;
+      case svnadmin__normalize_props:
+        opt_state.normalize_props = TRUE;
+        break;
+      case svnadmin__exclude:
+        SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+
+        if (! opt_state.exclude)
+          opt_state.exclude = apr_array_make(pool, 1, sizeof(const char *));
+        APR_ARRAY_PUSH(opt_state.exclude, const char *) = utf8_opt_arg;
+        break;
+      case svnadmin__include:
+        SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+
+        if (! opt_state.include)
+          opt_state.include = apr_array_make(pool, 1, sizeof(const char *));
+        APR_ARRAY_PUSH(opt_state.include, const char *) = utf8_opt_arg;
+        break;
+      case svnadmin__glob:
+        opt_state.glob = TRUE;
+        break;
       default:
         {
           SVN_ERR(subcommand_help(NULL, NULL, pool));
@@ -2874,7 +3116,7 @@ sub_main(int *exit_code, int argc, const
      just typos/mistakes.  Whatever the case, the subcommand to
      actually run is subcommand_help(). */
   if (opt_state.help)
-    subcommand = svn_opt_get_canonical_subcommand2(cmd_table, "help");
+    subcommand = svn_opt_get_canonical_subcommand3(cmd_table, "help");
 
   /* If we're not running the `help' subcommand, then look for a
      subcommand in the first argument. */
@@ -2885,8 +3127,8 @@ sub_main(int *exit_code, int argc, const
           if (opt_state.version)
             {
               /* Use the "help" subcommand to handle the "--version" option. */
-              static const svn_opt_subcommand_desc2_t pseudo_cmd =
-                { "--version", subcommand_help, {0}, "",
+              static const svn_opt_subcommand_desc3_t pseudo_cmd =
+                { "--version", subcommand_help, {0}, {""},
                   {svnadmin__version,  /* must accept its own option */
                    'q',  /* --quiet */
                   } };
@@ -2904,17 +3146,17 @@ sub_main(int *exit_code, int argc, const
         }
       else
         {
-          const char *first_arg = os->argv[os->ind++];
-          subcommand = svn_opt_get_canonical_subcommand2(cmd_table, first_arg);
+          const char *first_arg;
+
+          SVN_ERR(svn_utf_cstring_to_utf8(&first_arg, os->argv[os->ind++],
+                                          pool));
+          subcommand = svn_opt_get_canonical_subcommand3(cmd_table, first_arg);
           if (subcommand == NULL)
             {
-              const char *first_arg_utf8;
-              SVN_ERR(svn_utf_cstring_to_utf8(&first_arg_utf8,
-                                                  first_arg, pool));
               svn_error_clear(
                 svn_cmdline_fprintf(stderr, pool,
                                     _("Unknown subcommand: '%s'\n"),
-                                    first_arg_utf8));
+                                    first_arg));
               SVN_ERR(subcommand_help(NULL, NULL, pool));
               *exit_code = EXIT_FAILURE;
               return SVN_NO_ERROR;
@@ -2960,11 +3202,11 @@ sub_main(int *exit_code, int argc, const
       if (opt_id == 'h' || opt_id == '?')
         continue;
 
-      if (! svn_opt_subcommand_takes_option3(subcommand, opt_id, NULL))
+      if (! svn_opt_subcommand_takes_option4(subcommand, opt_id, NULL))
         {
           const char *optstr;
           const apr_getopt_option_t *badopt =
-            svn_opt_get_option_from_code2(opt_id, options_table, subcommand,
+            svn_opt_get_option_from_code3(opt_id, options_table, subcommand,
                                           pool);
           svn_opt_format_option(&optstr, badopt, FALSE, pool);
           if (subcommand->name[0] == '-')

Modified: subversion/branches/ra-git/subversion/svnbench/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svnbench/cl.h?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svnbench/cl.h (original)
+++ subversion/branches/ra-git/subversion/svnbench/cl.h Wed Nov  7 12:30:06 2018
@@ -117,7 +117,7 @@ svn_opt_subcommand_t
 
 
 /* See definition in main.c for documentation. */
-extern const svn_opt_subcommand_desc2_t svn_cl__cmd_table[];
+extern const svn_opt_subcommand_desc3_t svn_cl__cmd_table[];
 
 /* See definition in main.c for documentation. */
 extern const int svn_cl__global_options[];

Modified: subversion/branches/ra-git/subversion/svnbench/help-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svnbench/help-cmd.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svnbench/help-cmd.c (original)
+++ subversion/branches/ra-git/subversion/svnbench/help-cmd.c Wed Nov  7 12:30:06 2018
@@ -75,7 +75,7 @@ svn_cl__help(apr_getopt_t *os,
   version_footer = svn_stringbuf_create(ra_desc_start, pool);
   SVN_ERR(svn_ra_print_modules(version_footer, pool));
 
-  return svn_opt_print_help4(os,
+  return svn_opt_print_help5(os,
                              "svnbench",   /* ### erm, derive somehow? */
                              opt_state ? opt_state->version : FALSE,
                              opt_state ? opt_state->quiet : FALSE,

Modified: subversion/branches/ra-git/subversion/svnbench/svnbench.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svnbench/svnbench.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svnbench/svnbench.c (original)
+++ subversion/branches/ra-git/subversion/svnbench/svnbench.c Wed Nov  7 12:30:06 2018
@@ -53,6 +53,7 @@
    use the short option letter as identifier.  */
 typedef enum svn_cl__longopt_t {
   opt_auth_password = SVN_OPT_FIRST_LONGOPT_ID,
+  opt_auth_password_from_stdin,
   opt_auth_username,
   opt_config_dir,
   opt_config_options,
@@ -112,6 +113,8 @@ const apr_getopt_option_t svn_cl__option
   {"verbose",       'v', 0, N_("print extra information")},
   {"username",      opt_auth_username, 1, N_("specify a username ARG")},
   {"password",      opt_auth_password, 1, N_("specify a password ARG")},
+  {"password-from-stdin",
+                    opt_auth_password_from_stdin, 0, N_("read password from stdin")},
   {"targets",       opt_targets, 1,
                     N_("pass contents of file ARG as additional args")},
   {"depth",         opt_depth, 1,
@@ -197,116 +200,123 @@ const apr_getopt_option_t svn_cl__option
    command to take these arguments allows scripts to just pass them
    willy-nilly to every invocation of 'svn') . */
 const int svn_cl__global_options[] =
-{ opt_auth_username, opt_auth_password, opt_no_auth_cache, opt_non_interactive,
+{ opt_auth_username, opt_auth_password, opt_auth_password_from_stdin,
+  opt_no_auth_cache, opt_non_interactive,
   opt_trust_server_cert, opt_trust_server_cert_failures,
   opt_config_dir, opt_config_options, 0
 };
 
-const svn_opt_subcommand_desc2_t svn_cl__cmd_table[] =
+const svn_opt_subcommand_desc3_t svn_cl__cmd_table[] =
 {
-  { "help", svn_cl__help, {"?", "h"}, N_
-    ("Describe the usage of this program or its subcommands.\n"
-     "usage: help [SUBCOMMAND...]\n"),
+  { "help", svn_cl__help, {"?", "h"}, {N_(
+     "Describe the usage of this program or its subcommands.\n"
+     "usage: help [SUBCOMMAND...]\n"
+    )},
     {0} },
   /* This command is also invoked if we see option "--help", "-h" or "-?". */
 
-  { "null-blame", svn_cl__null_blame, {0}, N_
-    ("Fetch all versions of a file in a batch.\n"
+  { "null-blame", svn_cl__null_blame, {0}, {N_(
+     "Fetch all versions of a file in a batch.\n"
      "usage: null-blame [-rM:N] TARGET[@REV]...\n"
-     "\n"
+     "\n"), N_(
      "  With no revision range (same as -r0:REV), or with '-r M:N' where M < N,\n"
      "  annotate each line that is present in revision N of the file, with\n"
      "  the last revision at or before rN that changed or added the line,\n"
      "  looking back no further than rM.\n"
-     "\n"
+     "\n"), N_(
      "  With a reverse revision range '-r M:N' where M > N,\n"
      "  annotate each line that is present in revision N of the file, with\n"
      "  the next revision after rN that changed or deleted the line,\n"
      "  looking forward no further than rM.\n"
-     "\n"
+     "\n"), N_(
      "  If specified, REV determines in which revision the target is first\n"
      "  looked up.\n"
-     "\n"
-     "  Write the annotated result to standard output.\n"),
+     "\n"), N_(
+     "  Write the annotated result to standard output.\n"
+    )},
     {'r', 'g'} },
 
-  { "null-export", svn_cl__null_export, {0}, N_
-    ("Create an unversioned copy of a tree.\n"
+  { "null-export", svn_cl__null_export, {0}, {N_(
+     "Create an unversioned copy of a tree.\n"
      "usage: null-export [-r REV] URL[@PEGREV]\n"
-     "\n"
+     "\n"), N_(
      "  Exports a clean directory tree from the repository specified by\n"
      "  URL, at revision REV if it is given, otherwise at HEAD.\n"
-     "\n"
+     "\n"), N_(
      "  If specified, PEGREV determines in which revision the target is first\n"
-     "  looked up.\n"),
+     "  looked up.\n"
+    )},
     {'r', 'q', 'N', opt_depth} },
 
-  { "null-list", svn_cl__null_list, {"ls"}, N_
-    ("List directory entries in the repository.\n"
+  { "null-list", svn_cl__null_list, {"ls"}, {N_(
+     "List directory entries in the repository.\n"
      "usage: null-list [TARGET[@REV]...]\n"
-     "\n"
+     "\n"), N_(
      "  List each TARGET file and the contents of each TARGET directory as\n"
      "  they exist in the repository.  If TARGET is a working copy path, the\n"
      "  corresponding repository URL will be used. If specified, REV determines\n"
      "  in which revision the target is first looked up.\n"
-     "\n"
+     "\n"), N_(
      "  The default TARGET is '.', meaning the repository URL of the current\n"
      "  working directory.\n"
-     "\n"
+     "\n"), N_(
      "  With --verbose, the following fields will be fetched for each item:\n"
-     "\n"
+     "\n"), N_(
      "    Revision number of the last commit\n"
      "    Author of the last commit\n"
      "    If locked, the letter 'O'.  (Use 'svn info URL' to see details)\n"
      "    Size (in bytes)\n"
-     "    Date and time of the last commit\n"),
+     "    Date and time of the last commit\n"
+    )},
     {'r', 'v', 'q', 'R', opt_depth, opt_search} },
 
-  { "null-log", svn_cl__null_log, {0}, N_
-    ("Fetch the log messages for a set of revision(s) and/or path(s).\n"
+  { "null-log", svn_cl__null_log, {0}, {N_(
+     "Fetch the log messages for a set of revision(s) and/or path(s).\n"
      "usage: 1. null-log [PATH][@REV]\n"
      "       2. null-log URL[@REV] [PATH...]\n"
-     "\n"
+     "\n"), N_(
      "  1. Fetch the log messages for the URL corresponding to PATH\n"
      "     (default: '.'). If specified, REV is the revision in which the\n"
      "     URL is first looked up, and the default revision range is REV:1.\n"
      "     If REV is not specified, the default revision range is BASE:1,\n"
      "     since the URL might not exist in the HEAD revision.\n"
-     "\n"
+     "\n"), N_(
      "  2. Fetch the log messages for the PATHs (default: '.') under URL.\n"
      "     If specified, REV is the revision in which the URL is first\n"
      "     looked up, and the default revision range is REV:1; otherwise,\n"
      "     the URL is looked up in HEAD, and the default revision range is\n"
      "     HEAD:1.\n"
-     "\n"
+     "\n"), N_(
      "  Multiple '-c' or '-r' options may be specified (but not a\n"
      "  combination of '-c' and '-r' options), and mixing of forward and\n"
      "  reverse ranges is allowed.\n"
-     "\n"
+     "\n"), N_(
      "  With -v, also print all affected paths with each log message.\n"
      "  With -q, don't print the log message body itself (note that this is\n"
      "  compatible with -v).\n"
-     "\n"
+     "\n"), N_(
      "  Each log message is printed just once, even if more than one of the\n"
      "  affected paths for that revision were explicitly requested.  Logs\n"
      "  follow copy history by default.  Use --stop-on-copy to disable this\n"
-     "  behavior, which can be useful for determining branchpoints.\n"),
+     "  behavior, which can be useful for determining branchpoints.\n"
+    )},
     {'r', 'q', 'v', 'g', 'c', opt_targets, opt_stop_on_copy,
      'l', opt_with_all_revprops, opt_with_no_revprops, opt_with_revprop,},
     {{opt_with_revprop, N_("retrieve revision property ARG")},
      {'c', N_("the change made in revision ARG")}} },
 
-  { "null-info", svn_cl__null_info, {0}, N_
-    ("Display information about a local or remote item.\n"
+  { "null-info", svn_cl__null_info, {0}, {N_(
+     "Display information about a local or remote item.\n"
      "usage: null-info [TARGET[@REV]...]\n"
-     "\n"
+     "\n"), N_(
      "  Print information about each TARGET (default: '.').\n"
      "  TARGET may be either a working-copy path or URL.  If specified, REV\n"
-     "  determines in which revision the target is first looked up.\n"),
+     "  determines in which revision the target is first looked up.\n"
+    )},
     {'r', 'R', opt_depth, opt_targets, opt_changelist}
   },
 
-  { NULL, NULL, {0}, NULL, {0} }
+  { NULL, NULL, {0}, {NULL}, {0} }
 };
 
 
@@ -385,7 +395,7 @@ sub_main(int *exit_code, int argc, const
   svn_client_ctx_t *ctx;
   apr_array_header_t *received_opts;
   int i;
-  const svn_opt_subcommand_desc2_t *subcommand = NULL;
+  const svn_opt_subcommand_desc3_t *subcommand = NULL;
   svn_cl__cmd_baton_t command_baton;
   svn_auth_baton_t *ab;
   svn_config_t *cfg_config;
@@ -394,6 +404,7 @@ sub_main(int *exit_code, int argc, const
   apr_time_t start_time, time_taken;
   ra_progress_baton_t ra_progress_baton = {0};
   svn_membuf_t buf;
+  svn_boolean_t read_pass_from_stdin = FALSE;
 
   received_opts = apr_array_make(pool, SVN_OPT_MAX_OPTIONS, sizeof(int));
 
@@ -625,6 +636,9 @@ sub_main(int *exit_code, int argc, const
         SVN_ERR(svn_utf_cstring_to_utf8(&opt_state.auth_password,
                                             opt_arg, pool));
         break;
+      case opt_auth_password_from_stdin:
+        read_pass_from_stdin = TRUE;
+        break;
       case opt_stop_on_copy:
         opt_state.stop_on_copy = TRUE;
         break;
@@ -714,7 +728,7 @@ sub_main(int *exit_code, int argc, const
      just typos/mistakes.  Whatever the case, the subcommand to
      actually run is svn_cl__help(). */
   if (opt_state.help)
-    subcommand = svn_opt_get_canonical_subcommand2(svn_cl__cmd_table, "help");
+    subcommand = svn_opt_get_canonical_subcommand3(svn_cl__cmd_table, "help");
 
   /* If we're not running the `help' subcommand, then look for a
      subcommand in the first argument. */
@@ -725,8 +739,8 @@ sub_main(int *exit_code, int argc, const
           if (opt_state.version)
             {
               /* Use the "help" subcommand to handle the "--version" option. */
-              static const svn_opt_subcommand_desc2_t pseudo_cmd =
-                { "--version", svn_cl__help, {0}, "",
+              static const svn_opt_subcommand_desc3_t pseudo_cmd =
+                { "--version", svn_cl__help, {0}, {""},
                   {opt_version,    /* must accept its own option */
                    'q',            /* brief output */
                    'v',            /* verbose output */
@@ -747,18 +761,18 @@ sub_main(int *exit_code, int argc, const
         }
       else
         {
-          const char *first_arg = os->argv[os->ind++];
-          subcommand = svn_opt_get_canonical_subcommand2(svn_cl__cmd_table,
+          const char *first_arg;
+
+          SVN_ERR(svn_utf_cstring_to_utf8(&first_arg, os->argv[os->ind++],
+                                          pool));
+          subcommand = svn_opt_get_canonical_subcommand3(svn_cl__cmd_table,
                                                          first_arg);
           if (subcommand == NULL)
             {
-              const char *first_arg_utf8;
-              SVN_ERR(svn_utf_cstring_to_utf8(&first_arg_utf8,
-                                                  first_arg, pool));
               svn_error_clear
                 (svn_cmdline_fprintf(stderr, pool,
                                      _("Unknown subcommand: '%s'\n"),
-                                     first_arg_utf8));
+                                     first_arg));
               SVN_ERR(svn_cl__help(NULL, NULL, pool));
               *exit_code = EXIT_FAILURE;
               return SVN_NO_ERROR;
@@ -778,12 +792,12 @@ sub_main(int *exit_code, int argc, const
       if (opt_id == 'h' || opt_id == '?')
         continue;
 
-      if (! svn_opt_subcommand_takes_option3(subcommand, opt_id,
+      if (! svn_opt_subcommand_takes_option4(subcommand, opt_id,
                                              svn_cl__global_options))
         {
           const char *optstr;
           const apr_getopt_option_t *badopt =
-            svn_opt_get_option_from_code2(opt_id, svn_cl__options,
+            svn_opt_get_option_from_code3(opt_id, svn_cl__options,
                                           subcommand, pool);
           svn_opt_format_option(&optstr, badopt, FALSE, pool);
           if (subcommand->name[0] == '-')
@@ -842,6 +856,14 @@ sub_main(int *exit_code, int argc, const
                                   "--non-interactive"));
     }
 
+  /* --password-from-stdin can only be used with --non-interactive */
+  if (read_pass_from_stdin && !opt_state.non_interactive)
+    {
+      return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                              _("--password-from-stdin requires "
+                                "--non-interactive"));
+    }
+
   /* Ensure that 'revision_ranges' has at least one item, and make
      'start_revision' and 'end_revision' match that item. */
   if (opt_state.revision_ranges->nelts == 0)
@@ -919,6 +941,12 @@ sub_main(int *exit_code, int argc, const
                                        pool));
     }
 
+  /* Get password from stdin if necessary */
+  if (read_pass_from_stdin)
+    {
+      SVN_ERR(svn_cmdline__stdin_readline(&opt_state.auth_password, pool, pool));
+    }
+
   /* Set up our cancellation support. */
   svn_cl__check_cancel = svn_cmdline__setup_cancellation_handler();
   ctx->cancel_func = svn_cl__check_cancel;

Modified: subversion/branches/ra-git/subversion/svndumpfilter/svndumpfilter.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svndumpfilter/svndumpfilter.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svndumpfilter/svndumpfilter.c (original)
+++ subversion/branches/ra-git/subversion/svndumpfilter/svndumpfilter.c Wed Nov  7 12:30:06 2018
@@ -109,6 +109,7 @@ write_propdel_to_stringbuf(svn_stringbuf
  * Return TRUE if any prefix is a prefix of PATH (matching whole path
  * components); FALSE otherwise.
  * PATH starts with a '/', as do the (const char *) paths in PREFIXES. */
+/* This function is a duplicate of svnadmin.c:ary_prefix_match(). */
 static svn_boolean_t
 ary_prefix_match(const apr_array_header_t *pfxlist, const char *path)
 {
@@ -270,9 +271,7 @@ magic_header_record(int version, void *p
   if (version >= SVN_REPOS_DUMPFILE_FORMAT_VERSION_DELTAS)
     pb->allow_deltas = TRUE;
 
-  SVN_ERR(svn_stream_printf(pb->out_stream, pool,
-                            SVN_REPOS_DUMPFILE_MAGIC_HEADER ": %d\n\n",
-                            version));
+  SVN_ERR(svn_repos__dump_magic_header_record(pb->out_stream, version, pool));
 
   return SVN_NO_ERROR;
 }
@@ -445,8 +444,8 @@ static svn_error_t *
 uuid_record(const char *uuid, void *parse_baton, apr_pool_t *pool)
 {
   struct parse_baton_t *pb = parse_baton;
-  SVN_ERR(svn_stream_printf(pb->out_stream, pool,
-                            SVN_REPOS_DUMPFILE_UUID ": %s\n\n", uuid));
+
+  SVN_ERR(svn_repos__dump_uuid_header_record(pb->out_stream, uuid, pool));
   return SVN_NO_ERROR;
 }
 
@@ -529,7 +528,8 @@ new_node_record(void **node_baton,
             {
               return svn_error_createf
                 (SVN_ERR_INCOMPLETE_DATA, 0,
-                 _("Invalid copy source path '%s'"), copyfrom_path);
+                 _("Invalid copy source path '%s' for '%s'"),
+                 copyfrom_path, node_path);
             }
         }
 
@@ -610,7 +610,8 @@ new_node_record(void **node_baton,
               if (! (cf_renum_val && SVN_IS_VALID_REVNUM(cf_renum_val->rev)))
                 return svn_error_createf
                   (SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
-                   _("No valid copyfrom revision in filtered stream"));
+                   _("No valid copyfrom revision in filtered stream for '%s'"),
+                   node_path);
               svn_repos__dumpfile_header_pushf(
                 nb->headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV,
                 "%ld", cf_renum_val->rev);
@@ -950,7 +951,10 @@ static const apr_getopt_option_t options
     {"quiet",              svndumpfilter__quiet, 0,
      N_("Do not display filtering statistics.") },
     {"pattern",            svndumpfilter__glob, 0,
-     N_("Treat the path prefixes as file glob patterns.") },
+     N_("Treat the path prefixes as file glob patterns.\n"
+        "                             Glob special characters are '*' '?' '[]' and '\\'.\n"
+        "                             Character '/' is not treated specially, so\n"
+        "                             pattern /*/foo matches paths /a/foo and /a/b/foo.") },
     {"drop-empty-revs",    svndumpfilter__drop_empty_revs, 0,
      N_("Remove revisions emptied by filtering.")},
     {"drop-all-empty-revs",    svndumpfilter__drop_all_empty_revs, 0,
@@ -973,32 +977,35 @@ static const apr_getopt_option_t options
 /* Array of available subcommands.
  * The entire list must be terminated with an entry of nulls.
  */
-static const svn_opt_subcommand_desc2_t cmd_table[] =
+static const svn_opt_subcommand_desc3_t cmd_table[] =
   {
-    {"exclude", subcommand_exclude, {0},
-     N_("Filter out nodes with given prefixes from dumpstream.\n"
-        "usage: svndumpfilter exclude PATH_PREFIX...\n"),
+    {"exclude", subcommand_exclude, {0}, {N_(
+        "Filter out nodes with given prefixes from dumpstream.\n"
+        "usage: svndumpfilter exclude PATH_PREFIX...\n"
+     )},
      {svndumpfilter__drop_empty_revs, svndumpfilter__drop_all_empty_revs,
       svndumpfilter__renumber_revs,
       svndumpfilter__skip_missing_merge_sources, svndumpfilter__targets,
       svndumpfilter__preserve_revprops, svndumpfilter__quiet,
       svndumpfilter__glob} },
 
-    {"include", subcommand_include, {0},
-     N_("Filter out nodes without given prefixes from dumpstream.\n"
-        "usage: svndumpfilter include PATH_PREFIX...\n"),
+    {"include", subcommand_include, {0}, {N_(
+        "Filter out nodes without given prefixes from dumpstream.\n"
+        "usage: svndumpfilter include PATH_PREFIX...\n"
+     )},
      {svndumpfilter__drop_empty_revs, svndumpfilter__drop_all_empty_revs,
       svndumpfilter__renumber_revs,
       svndumpfilter__skip_missing_merge_sources, svndumpfilter__targets,
       svndumpfilter__preserve_revprops, svndumpfilter__quiet,
       svndumpfilter__glob} },
 
-    {"help", subcommand_help, {"?", "h"},
-     N_("Describe the usage of this program or its subcommands.\n"
-        "usage: svndumpfilter help [SUBCOMMAND...]\n"),
+    {"help", subcommand_help, {"?", "h"}, {N_(
+        "Describe the usage of this program or its subcommands.\n"
+        "usage: svndumpfilter help [SUBCOMMAND...]\n"
+     )},
      {0} },
 
-    { NULL, NULL, {0}, NULL, {0} }
+    { NULL, NULL, {0}, {NULL}, {0} }
   };
 
 
@@ -1076,7 +1083,7 @@ subcommand_help(apr_getopt_t *os, void *
       "\n"
       "Available subcommands:\n");
 
-  SVN_ERR(svn_opt_print_help4(os, "svndumpfilter",
+  SVN_ERR(svn_opt_print_help5(os, "svndumpfilter",
                               opt_state ? opt_state->version : FALSE,
                               opt_state ? opt_state->quiet : FALSE,
                               /*###opt_state ? opt_state->verbose :*/ FALSE,
@@ -1288,7 +1295,7 @@ sub_main(int *exit_code, int argc, const
   svn_error_t *err;
   apr_status_t apr_err;
 
-  const svn_opt_subcommand_desc2_t *subcommand = NULL;
+  const svn_opt_subcommand_desc3_t *subcommand = NULL;
   struct svndumpfilter_opt_state opt_state;
   apr_getopt_t *os;
   int opt_id;
@@ -1368,7 +1375,8 @@ sub_main(int *exit_code, int argc, const
           opt_state.skip_missing_merge_sources = TRUE;
           break;
         case svndumpfilter__targets:
-          opt_state.targets_file = opt_arg;
+          SVN_ERR(svn_utf_cstring_to_utf8(&opt_state.targets_file,
+                                          opt_arg, pool));
           break;
         default:
           {
@@ -1394,7 +1402,7 @@ sub_main(int *exit_code, int argc, const
      just typos/mistakes.  Whatever the case, the subcommand to
      actually run is subcommand_help(). */
   if (opt_state.help)
-    subcommand = svn_opt_get_canonical_subcommand2(cmd_table, "help");
+    subcommand = svn_opt_get_canonical_subcommand3(cmd_table, "help");
 
   /* If we're not running the `help' subcommand, then look for a
      subcommand in the first argument. */
@@ -1405,8 +1413,8 @@ sub_main(int *exit_code, int argc, const
           if (opt_state.version)
             {
               /* Use the "help" subcommand to handle the "--version" option. */
-              static const svn_opt_subcommand_desc2_t pseudo_cmd =
-                { "--version", subcommand_help, {0}, "",
+              static const svn_opt_subcommand_desc3_t pseudo_cmd =
+                { "--version", subcommand_help, {0}, {""},
                   {svndumpfilter__version,  /* must accept its own option */
                    svndumpfilter__quiet,
                   } };
@@ -1425,18 +1433,17 @@ sub_main(int *exit_code, int argc, const
         }
       else
         {
-          const char *first_arg = os->argv[os->ind++];
-          subcommand = svn_opt_get_canonical_subcommand2(cmd_table, first_arg);
+          const char *first_arg;
+
+          SVN_ERR(svn_utf_cstring_to_utf8(&first_arg, os->argv[os->ind++],
+                                          pool));
+          subcommand = svn_opt_get_canonical_subcommand3(cmd_table, first_arg);
           if (subcommand == NULL)
             {
-              const char* first_arg_utf8;
-              SVN_ERR(svn_utf_cstring_to_utf8(&first_arg_utf8, first_arg,
-                                              pool));
-
               svn_error_clear(
                 svn_cmdline_fprintf(stderr, pool,
                                     _("Unknown subcommand: '%s'\n"),
-                                    first_arg_utf8));
+                                    first_arg));
               SVN_ERR(subcommand_help(NULL, NULL, pool));
               *exit_code = EXIT_FAILURE;
               return SVN_NO_ERROR;
@@ -1469,18 +1476,13 @@ sub_main(int *exit_code, int argc, const
       if (opt_state.targets_file)
         {
           svn_stringbuf_t *buffer, *buffer_utf8;
-          const char *utf8_targets_file;
           apr_array_header_t *targets = apr_array_make(pool, 0,
                                                        sizeof(const char *));
 
           /* We need to convert to UTF-8 now, even before we divide
              the targets into an array, because otherwise we wouldn't
              know what delimiter to use for svn_cstring_split().  */
-
-          SVN_ERR(svn_utf_cstring_to_utf8(&utf8_targets_file,
-                                          opt_state.targets_file, pool));
-
-          SVN_ERR(svn_stringbuf_from_file2(&buffer, utf8_targets_file,
+          SVN_ERR(svn_stringbuf_from_file2(&buffer, opt_state.targets_file,
                                            pool));
           SVN_ERR(svn_utf_stringbuf_to_utf8(&buffer_utf8, buffer, pool));
 
@@ -1521,11 +1523,11 @@ sub_main(int *exit_code, int argc, const
       if (opt_id == 'h' || opt_id == '?')
         continue;
 
-      if (! svn_opt_subcommand_takes_option3(subcommand, opt_id, NULL))
+      if (! svn_opt_subcommand_takes_option4(subcommand, opt_id, NULL))
         {
           const char *optstr;
           const apr_getopt_option_t *badopt =
-            svn_opt_get_option_from_code2(opt_id, options_table, subcommand,
+            svn_opt_get_option_from_code3(opt_id, options_table, subcommand,
                                           pool);
           svn_opt_format_option(&optstr, badopt, FALSE, pool);
           if (subcommand->name[0] == '-')

Modified: subversion/branches/ra-git/subversion/svnfsfs/load-index-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svnfsfs/load-index-cmd.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svnfsfs/load-index-cmd.c (original)
+++ subversion/branches/ra-git/subversion/svnfsfs/load-index-cmd.c Wed Nov  7 12:30:06 2018
@@ -147,7 +147,7 @@ load_index(const char *path,
 
       /* Get the next line from the input and stop if there is none. */
       svn_pool_clear(iterpool);
-      svn_stream_readline(input, &line, "\n", &eol, iterpool);
+      SVN_ERR(svn_stream_readline(input, &line, "\n", &eol, iterpool));
       if (eol)
         break;
 

Modified: subversion/branches/ra-git/subversion/svnfsfs/svnfsfs.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svnfsfs/svnfsfs.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svnfsfs/svnfsfs.c (original)
+++ subversion/branches/ra-git/subversion/svnfsfs/svnfsfs.c Wed Nov  7 12:30:06 2018
@@ -111,22 +111,27 @@ static const apr_getopt_option_t options
 /* Array of available subcommands.
  * The entire list must be terminated with an entry of nulls.
  */
-static const svn_opt_subcommand_desc2_t cmd_table[] =
+static const svn_opt_subcommand_desc3_t cmd_table[] =
 {
-  {"help", subcommand__help, {"?", "h"}, N_
-   ("usage: svnfsfs help [SUBCOMMAND...]\n\n"
-    "Describe the usage of this program or its subcommands.\n"),
+  {"help", subcommand__help, {"?", "h"}, {N_(
+    "usage: svnfsfs help [SUBCOMMAND...]\n"
+    "\n"), N_(
+    "Describe the usage of this program or its subcommands.\n"
+   )},
    {0} },
 
-  {"dump-index", subcommand__dump_index, {0}, N_
-   ("usage: svnfsfs dump-index REPOS_PATH -r REV\n\n"
+  {"dump-index", subcommand__dump_index, {0}, {N_(
+    "usage: svnfsfs dump-index REPOS_PATH -r REV\n"
+    "\n"), N_(
     "Dump the index contents for the revision / pack file containing revision REV\n"
     "to console.  This is only available for FSFS format 7 (SVN 1.9+) repositories.\n"
     "The table produced contains a header in the first line followed by one line\n"
-    "per index entry, ordered by location in the revision / pack file.  Columns:\n\n"
+    "per index entry, ordered by location in the revision / pack file.  Columns:\n"
+    "\n"), N_(
     "   * Byte offset (hex) at which the item starts\n"
     "   * Length (hex) of the item in bytes\n"
-    "   * Item type (string) is one of the following:\n\n"
+    "   * Item type (string) is one of the following:\n"
+    "\n"), N_(
     "        none ... Unused section.  File contents shall be NULs.\n"
     "        frep ... File representation.\n"
     "        drep ... Directory representation.\n"
@@ -135,29 +140,36 @@ static const svn_opt_subcommand_desc2_t
     "        node ... Node revision.\n"
     "        chgs ... Changed paths list.\n"
     "        rep .... Representation of unknown type.  Should not be used.\n"
-    "        ??? .... Invalid.  Index data is corrupt.\n\n"
+    "        ??? .... Invalid.  Index data is corrupt.\n"
+    "\n"), N_(
     "        The distinction between frep, drep, fprop and dprop is a mere internal\n"
     "        classification used for various optimizations and does not affect the\n"
-    "        operational correctness.\n\n"
+    "        operational correctness.\n"
+    "\n"), N_(
     "   * Revision that the item belongs to (decimal)\n"
     "   * Item number (decimal) within that revision\n"
-    "   * Modified FNV1a checksum (8 hex digits)\n"),
+    "   * Modified FNV1a checksum (8 hex digits)\n"
+   )},
    {'r', 'M'} },
 
-  {"load-index", subcommand__load_index, {0}, N_
-   ("usage: svnfsfs load-index REPOS_PATH\n\n"
+  {"load-index", subcommand__load_index, {0}, {N_(
+    "usage: svnfsfs load-index REPOS_PATH\n"
+    "\n"), N_(
     "Read index contents from console.  The format is the same as produced by the\n"
     "dump-index command, except that checksum as well as header are optional and will\n"
     "be ignored.  The data must cover the full revision / pack file;  the revision\n"
-    "number is automatically extracted from input stream.  No ordering is required.\n"),
+    "number is automatically extracted from input stream.  No ordering is required.\n"
+   )},
    {'M'} },
 
-  {"stats", subcommand__stats, {0}, N_
-   ("usage: svnfsfs stats REPOS_PATH\n\n"
-    "Write object size statistics to console.\n"),
+  {"stats", subcommand__stats, {0}, {N_(
+    "usage: svnfsfs stats REPOS_PATH\n"
+    "\n"), N_(
+    "Write object size statistics to console.\n"
+   )},
    {'M'} },
 
-  { NULL, NULL, {0}, NULL, {0} }
+  { NULL, NULL, {0}, {NULL}, {0} }
 };
 
 
@@ -196,7 +208,7 @@ subcommand__help(apr_getopt_t *os, void
       "\n"
       "Available subcommands:\n");
 
-  SVN_ERR(svn_opt_print_help4(os, "svnfsfs",
+  SVN_ERR(svn_opt_print_help5(os, "svnfsfs",
                               opt_state ? opt_state->version : FALSE,
                               opt_state ? opt_state->quiet : FALSE,
                               /*###opt_state ? opt_state->verbose :*/ FALSE,
@@ -221,7 +233,7 @@ sub_main(int *exit_code, int argc, const
   svn_error_t *err;
   apr_status_t apr_err;
 
-  const svn_opt_subcommand_desc2_t *subcommand = NULL;
+  const svn_opt_subcommand_desc3_t *subcommand = NULL;
   svnfsfs__opt_state opt_state = { 0 };
   apr_getopt_t *os;
   int opt_id;
@@ -301,8 +313,12 @@ sub_main(int *exit_code, int argc, const
         opt_state.help = TRUE;
         break;
       case 'M':
-        opt_state.memory_cache_size
-            = 0x100000 * apr_strtoi64(opt_arg, NULL, 0);
+        {
+          apr_uint64_t sz_val;
+          SVN_ERR(svn_cstring_atoui64(&sz_val, opt_arg));
+
+          opt_state.memory_cache_size = 0x100000 * sz_val;
+        }
         break;
       case svnfsfs__version:
         opt_state.version = TRUE;
@@ -321,7 +337,7 @@ sub_main(int *exit_code, int argc, const
      just typos/mistakes.  Whatever the case, the subcommand to
      actually run is subcommand_help(). */
   if (opt_state.help)
-    subcommand = svn_opt_get_canonical_subcommand2(cmd_table, "help");
+    subcommand = svn_opt_get_canonical_subcommand3(cmd_table, "help");
 
   /* If we're not running the `help' subcommand, then look for a
      subcommand in the first argument. */
@@ -332,8 +348,8 @@ sub_main(int *exit_code, int argc, const
           if (opt_state.version)
             {
               /* Use the "help" subcommand to handle the "--version" option. */
-              static const svn_opt_subcommand_desc2_t pseudo_cmd =
-                { "--version", subcommand__help, {0}, "",
+              static const svn_opt_subcommand_desc3_t pseudo_cmd =
+                { "--version", subcommand__help, {0}, {""},
                   {svnfsfs__version,  /* must accept its own option */
                    'q',  /* --quiet */
                   } };
@@ -351,17 +367,17 @@ sub_main(int *exit_code, int argc, const
         }
       else
         {
-          const char *first_arg = os->argv[os->ind++];
-          subcommand = svn_opt_get_canonical_subcommand2(cmd_table, first_arg);
+          const char *first_arg;
+
+          SVN_ERR(svn_utf_cstring_to_utf8(&first_arg, os->argv[os->ind++],
+                                          pool));
+          subcommand = svn_opt_get_canonical_subcommand3(cmd_table, first_arg);
           if (subcommand == NULL)
             {
-              const char *first_arg_utf8;
-              SVN_ERR(svn_utf_cstring_to_utf8(&first_arg_utf8,
-                                                  first_arg, pool));
               svn_error_clear(
                 svn_cmdline_fprintf(stderr, pool,
                                     _("Unknown subcommand: '%s'\n"),
-                                    first_arg_utf8));
+                                    first_arg));
               SVN_ERR(subcommand__help(NULL, NULL, pool));
               *exit_code = EXIT_FAILURE;
               return SVN_NO_ERROR;
@@ -405,11 +421,11 @@ sub_main(int *exit_code, int argc, const
       if (opt_id == 'h' || opt_id == '?')
         continue;
 
-      if (! svn_opt_subcommand_takes_option3(subcommand, opt_id, NULL))
+      if (! svn_opt_subcommand_takes_option4(subcommand, opt_id, NULL))
         {
           const char *optstr;
           const apr_getopt_option_t *badopt =
-            svn_opt_get_option_from_code2(opt_id, options_table, subcommand,
+            svn_opt_get_option_from_code3(opt_id, options_table, subcommand,
                                           pool);
           svn_opt_format_option(&optstr, badopt, FALSE, pool);
           if (subcommand->name[0] == '-')



Mime
View raw message