Modified: subversion/branches/shelve-checkpoint/subversion/svnadmin/svnadmin.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svnadmin/svnadmin.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svnadmin/svnadmin.c 
(original)
+++ subversion/branches/shelve-checkpoint/subversion/svnadmin/svnadmin.c Mon 
Apr 16 12:21:02 2018
@@ -301,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 REPOS_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"
@@ -351,76 +363,94 @@ static const svn_opt_subcommand_desc2_t
     "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"
-    "\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"),
+    "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"
+  {"freeze", subcommand_freeze, {0}, {N_(
+    "usage: 1. svnadmin freeze REPOS_PATH -- PROGRAM [ARG...]\n"
     "               2. svnadmin freeze -F FILE -- PROGRAM [ARG...]\n\n"
+    "\n"), N_(
     "1. Run PROGRAM passing ARGS while holding a write-lock on REPOS_PATH.\n"
     "   Allows safe use of third-party backup tools on a live repository.\n"
-    "\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"
     "\n"
     "The '--' tells svnadmin to stop looking for svnadmin options and pass\n"
-    "all later arguments to PROGRAM even if they begin with '-'.\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,
@@ -429,122 +459,155 @@ static const svn_opt_subcommand_desc2_t
     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"),
+    "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"),
+    "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"
+  {"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"),
+  {"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"),
+    "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"
+  {"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} }
 };
 
 
@@ -1543,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,
@@ -2797,7 +2860,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;
@@ -3052,7 +3115,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. */
@@ -3063,8 +3126,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 */
                   } };
@@ -3086,7 +3149,7 @@ sub_main(int *exit_code, int argc, const
 
           SVN_ERR(svn_utf_cstring_to_utf8(&first_arg, os->argv[os->ind++],
                                           pool));
-          subcommand = svn_opt_get_canonical_subcommand2(cmd_table, first_arg);
+          subcommand = svn_opt_get_canonical_subcommand3(cmd_table, first_arg);
           if (subcommand == NULL)
             {
               svn_error_clear(
@@ -3138,11 +3201,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/shelve-checkpoint/subversion/svnbench/cl.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svnbench/cl.h?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svnbench/cl.h (original)
+++ subversion/branches/shelve-checkpoint/subversion/svnbench/cl.h Mon Apr 16 
12:21:02 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/shelve-checkpoint/subversion/svnbench/help-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svnbench/help-cmd.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svnbench/help-cmd.c 
(original)
+++ subversion/branches/shelve-checkpoint/subversion/svnbench/help-cmd.c Mon 
Apr 16 12:21:02 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/shelve-checkpoint/subversion/svnbench/svnbench.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svnbench/svnbench.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svnbench/svnbench.c 
(original)
+++ subversion/branches/shelve-checkpoint/subversion/svnbench/svnbench.c Mon 
Apr 16 12:21:02 2018
@@ -206,111 +206,117 @@ const int svn_cl__global_options[] =
   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} }
 };
 
 
@@ -389,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;
@@ -722,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. */
@@ -733,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 */
@@ -759,7 +765,7 @@ sub_main(int *exit_code, int argc, const
 
           SVN_ERR(svn_utf_cstring_to_utf8(&first_arg, os->argv[os->ind++],
                                           pool));
-          subcommand = svn_opt_get_canonical_subcommand2(svn_cl__cmd_table,
+          subcommand = svn_opt_get_canonical_subcommand3(svn_cl__cmd_table,
                                                          first_arg);
           if (subcommand == NULL)
             {
@@ -786,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] == '-')

Modified: 
subversion/branches/shelve-checkpoint/subversion/svndumpfilter/svndumpfilter.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svndumpfilter/svndumpfilter.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- 
subversion/branches/shelve-checkpoint/subversion/svndumpfilter/svndumpfilter.c 
(original)
+++ 
subversion/branches/shelve-checkpoint/subversion/svndumpfilter/svndumpfilter.c 
Mon Apr 16 12:21:02 2018
@@ -977,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} }
   };
 
 
@@ -1080,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,
@@ -1292,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;
@@ -1399,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. */
@@ -1410,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,
                   } };
@@ -1434,7 +1437,7 @@ sub_main(int *exit_code, int argc, const
 
           SVN_ERR(svn_utf_cstring_to_utf8(&first_arg, os->argv[os->ind++],
                                           pool));
-          subcommand = svn_opt_get_canonical_subcommand2(cmd_table, first_arg);
+          subcommand = svn_opt_get_canonical_subcommand3(cmd_table, first_arg);
           if (subcommand == NULL)
             {
               svn_error_clear(
@@ -1520,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/shelve-checkpoint/subversion/svnfsfs/svnfsfs.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svnfsfs/svnfsfs.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svnfsfs/svnfsfs.c 
(original)
+++ subversion/branches/shelve-checkpoint/subversion/svnfsfs/svnfsfs.c Mon Apr 
16 12:21:02 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;
@@ -325,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. */
@@ -336,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 */
                   } };
@@ -359,7 +371,7 @@ sub_main(int *exit_code, int argc, const
 
           SVN_ERR(svn_utf_cstring_to_utf8(&first_arg, os->argv[os->ind++],
                                           pool));
-          subcommand = svn_opt_get_canonical_subcommand2(cmd_table, first_arg);
+          subcommand = svn_opt_get_canonical_subcommand3(cmd_table, first_arg);
           if (subcommand == NULL)
             {
               svn_error_clear(
@@ -409,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] == '-')

Modified: subversion/branches/shelve-checkpoint/subversion/svnlook/svnlook.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svnlook/svnlook.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svnlook/svnlook.c 
(original)
+++ subversion/branches/shelve-checkpoint/subversion/svnlook/svnlook.c Mon Apr 
16 12:21:02 2018
@@ -212,110 +212,144 @@ 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[] =
 {
-  {"author", subcommand_author, {0},
-   N_("usage: svnlook author REPOS_PATH\n\n"
-      "Print the author.\n"),
+  {"author", subcommand_author, {0}, {N_(
+      "usage: svnlook author REPOS_PATH\n"
+      "\n"), N_(
+      "Print the author.\n"
+   )},
    {'r', 't'} },
 
-  {"cat", subcommand_cat, {0},
-   N_("usage: svnlook cat REPOS_PATH FILE_PATH\n\n"
-      "Print the contents of a file.  Leading '/' on FILE_PATH is 
optional.\n"),
+  {"cat", subcommand_cat, {0}, {N_(
+      "usage: svnlook cat REPOS_PATH FILE_PATH\n"
+      "\n"), N_(
+      "Print the contents of a file.  Leading '/' on FILE_PATH is optional.\n"
+   )},
    {'r', 't'} },
 
-  {"changed", subcommand_changed, {0},
-   N_("usage: svnlook changed REPOS_PATH\n\n"
-      "Print the paths that were changed.\n"),
+  {"changed", subcommand_changed, {0}, {N_(
+      "usage: svnlook changed REPOS_PATH\n"
+      "\n"), N_(
+      "Print the paths that were changed.\n"
+   )},
    {'r', 't', svnlook__copy_info} },
 
-  {"date", subcommand_date, {0},
-   N_("usage: svnlook date REPOS_PATH\n\n"
-      "Print the datestamp.\n"),
+  {"date", subcommand_date, {0}, {N_(
+      "usage: svnlook date REPOS_PATH\n"
+      "\n"), N_(
+      "Print the datestamp.\n"
+   )},
    {'r', 't'} },
 
-  {"diff", subcommand_diff, {0},
-   N_("usage: svnlook diff REPOS_PATH\n\n"
-      "Print GNU-style diffs of changed files and properties.\n"),
+  {"diff", subcommand_diff, {0}, {N_(
+      "usage: svnlook diff REPOS_PATH\n"
+      "\n"), N_(
+      "Print GNU-style diffs of changed files and properties.\n"
+   )},
    {'r', 't', svnlook__no_diff_deleted, svnlook__no_diff_added,
     svnlook__diff_copy_from, svnlook__diff_cmd, 'x',
     svnlook__ignore_properties, svnlook__properties_only} },
 
-  {"dirs-changed", subcommand_dirschanged, {0},
-   N_("usage: svnlook dirs-changed REPOS_PATH\n\n"
+  {"dirs-changed", subcommand_dirschanged, {0}, {N_(
+      "usage: svnlook dirs-changed REPOS_PATH\n"
+      "\n"), N_(
       "Print the directories that were themselves changed (property edits)\n"
-      "or whose file children were changed.\n"),
+      "or whose file children were changed.\n"
+   )},
    {'r', 't'} },
 
-  {"filesize", subcommand_filesize, {0},
-   N_("usage: svnlook filesize REPOS_PATH PATH_IN_REPOS\n\n"
+  {"filesize", subcommand_filesize, {0}, {N_(
+      "usage: svnlook filesize REPOS_PATH PATH_IN_REPOS\n"
+      "\n"), N_(
       "Print the size (in bytes) of the file located at PATH_IN_REPOS as\n"
-      "it is represented in the repository.\n"),
+      "it is represented in the repository.\n"
+   )},
    {'r', 't'} },
 
-  {"help", subcommand_help, {"?", "h"},
-   N_("usage: svnlook help [SUBCOMMAND...]\n\n"
-      "Describe the usage of this program or its subcommands.\n"),
+  {"help", subcommand_help, {"?", "h"}, {N_(
+      "usage: svnlook help [SUBCOMMAND...]\n"
+      "\n"), N_(
+      "Describe the usage of this program or its subcommands.\n"
+   )},
    {0} },
 
-  {"history", subcommand_history, {0},
-   N_("usage: svnlook history REPOS_PATH [PATH_IN_REPOS]\n\n"
+  {"history", subcommand_history, {0}, {N_(
+      "usage: svnlook history REPOS_PATH [PATH_IN_REPOS]\n"
+      "\n"), N_(
       "Print information about the history of a path in the repository (or\n"
-      "the root directory if no path is supplied).\n"),
+      "the root directory if no path is supplied).\n"
+   )},
    {'r', svnlook__show_ids, 'l'} },
 
-  {"info", subcommand_info, {0},
-   N_("usage: svnlook info REPOS_PATH\n\n"
-      "Print the author, datestamp, log message size, and log message.\n"),
+  {"info", subcommand_info, {0}, {N_(
+      "usage: svnlook info REPOS_PATH\n"
+      "\n"), N_(
+      "Print the author, datestamp, log message size, and log message.\n"
+   )},
    {'r', 't'} },
 
-  {"lock", subcommand_lock, {0},
-   N_("usage: svnlook lock REPOS_PATH PATH_IN_REPOS\n\n"
-      "If a lock exists on a path in the repository, describe it.\n"),
+  {"lock", subcommand_lock, {0}, {N_(
+      "usage: svnlook lock REPOS_PATH PATH_IN_REPOS\n"
+      "\n"), N_(
+      "If a lock exists on a path in the repository, describe it.\n"
+   )},
    {0} },
 
-  {"log", subcommand_log, {0},
-   N_("usage: svnlook log REPOS_PATH\n\n"
-      "Print the log message.\n"),
+  {"log", subcommand_log, {0}, {N_(
+      "usage: svnlook log REPOS_PATH\n"
+      "\n"), N_(
+      "Print the log message.\n"
+   )},
    {'r', 't'} },
 
-  {"propget", subcommand_pget, {"pget", "pg"},
-   N_("usage: 1. svnlook propget REPOS_PATH PROPNAME PATH_IN_REPOS\n"
+  {"propget", subcommand_pget, {"pget", "pg"}, {N_(
+      "usage: 1. svnlook propget REPOS_PATH PROPNAME PATH_IN_REPOS\n"
       "                    "
       /* The line above is actually needed, so do NOT delete it! */
-      "       2. svnlook propget --revprop REPOS_PATH PROPNAME\n\n"
+      "       2. svnlook propget --revprop REPOS_PATH PROPNAME\n"
+      "\n"), N_(
       "Print the raw value of a property on a path in the repository.\n"
-      "With --revprop, print the raw value of a revision property.\n"),
+      "With --revprop, print the raw value of a revision property.\n"
+   )},
    {'r', 't', 'v', svnlook__revprop_opt, svnlook__show_inherited_props} },
 
-  {"proplist", subcommand_plist, {"plist", "pl"},
-   N_("usage: 1. svnlook proplist REPOS_PATH PATH_IN_REPOS\n"
+  {"proplist", subcommand_plist, {"plist", "pl"}, {N_(
+      "usage: 1. svnlook proplist REPOS_PATH PATH_IN_REPOS\n"
       "                      "
       /* The line above is actually needed, so do NOT delete it! */
-      "       2. svnlook proplist --revprop REPOS_PATH\n\n"
+      "       2. svnlook proplist --revprop REPOS_PATH\n"
+      "\n"), N_(
       "List the properties of a path in the repository, or\n"
       "with the --revprop option, revision properties.\n"
-      "With -v, show the property values too.\n"),
+      "With -v, show the property values too.\n"
+   )},
    {'r', 't', 'v', svnlook__revprop_opt, svnlook__xml_opt,
     svnlook__show_inherited_props} },
 
-  {"tree", subcommand_tree, {0},
-   N_("usage: svnlook tree REPOS_PATH [PATH_IN_REPOS]\n\n"
+  {"tree", subcommand_tree, {0}, {N_(
+      "usage: svnlook tree REPOS_PATH [PATH_IN_REPOS]\n"
+      "\n"), N_(
       "Print the tree, starting at PATH_IN_REPOS (if supplied, at the root\n"
-      "of the tree otherwise), optionally showing node revision ids.\n"),
+      "of the tree otherwise), optionally showing node revision ids.\n"
+   )},
    {'r', 't', 'N', svnlook__show_ids, svnlook__full_paths, 'M'} },
 
-  {"uuid", subcommand_uuid, {0},
-   N_("usage: svnlook uuid REPOS_PATH\n\n"
-      "Print the repository's UUID.\n"),
+  {"uuid", subcommand_uuid, {0}, {N_(
+      "usage: svnlook uuid REPOS_PATH\n"
+      "\n"), N_(
+      "Print the repository's UUID.\n"
+   )},
    {0} },
 
-  {"youngest", subcommand_youngest, {0},
-   N_("usage: svnlook youngest REPOS_PATH\n\n"
-      "Print the youngest revision number.\n"),
+  {"youngest", subcommand_youngest, {0}, {N_(
+      "usage: svnlook youngest REPOS_PATH\n"
+      "\n"), N_(
+      "Print the youngest revision number.\n"
+   )},
    {svnlook__no_newline} },
 
-  { NULL, NULL, {0}, NULL, {0} }
+  { NULL, NULL, {0}, {NULL}, {0} }
 };
 
 
@@ -2222,7 +2256,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, "svnlook",
+  SVN_ERR(svn_opt_print_help5(os, "svnlook",
                               opt_state ? opt_state->version : FALSE,
                               opt_state ? opt_state->quiet : FALSE,
                               opt_state ? opt_state->verbose : FALSE,
@@ -2437,7 +2471,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 svnlook_opt_state opt_state;
   apr_getopt_t *os;
   int opt_id;
@@ -2634,7 +2668,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. */
@@ -2645,8 +2679,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}, {""},
                   {svnlook__version,  /* must accept its own option */
                    'q', 'v',
                   } };
@@ -2669,7 +2703,7 @@ sub_main(int *exit_code, int argc, const
 
           SVN_ERR(svn_utf_cstring_to_utf8(&first_arg, os->argv[os->ind++],
                                           pool));
-          subcommand = svn_opt_get_canonical_subcommand2(cmd_table, first_arg);
+          subcommand = svn_opt_get_canonical_subcommand3(cmd_table, first_arg);
           if (subcommand == NULL)
             {
               svn_error_clear(
@@ -2762,11 +2796,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/shelve-checkpoint/subversion/svnmucc/svnmucc.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svnmucc/svnmucc.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svnmucc/svnmucc.c 
(original)
+++ subversion/branches/shelve-checkpoint/subversion/svnmucc/svnmucc.c Mon Apr 
16 12:21:02 2018
@@ -342,7 +342,7 @@ display_version(apr_pool_t *pool)
   version_footer = svn_stringbuf_create(ra_desc_start, pool);
   SVN_ERR(svn_ra_print_modules(version_footer, pool));
 
-  SVN_ERR(svn_opt_print_help4(NULL, "svnmucc", TRUE, FALSE, FALSE,
+  SVN_ERR(svn_opt_print_help5(NULL, "svnmucc", TRUE, FALSE, FALSE,
                               version_footer->data,
                               NULL, NULL, NULL, NULL, NULL, pool));
 

Modified: subversion/branches/shelve-checkpoint/subversion/svnrdump/svnrdump.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svnrdump/svnrdump.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svnrdump/svnrdump.c 
(original)
+++ subversion/branches/shelve-checkpoint/subversion/svnrdump/svnrdump.c Mon 
Apr 16 12:21:02 2018
@@ -81,23 +81,29 @@ enum svn_svnrdump__longopt_t
                                    opt_non_interactive, \
                                    opt_force_interactive
 
-static const svn_opt_subcommand_desc2_t svnrdump__cmd_table[] =
+static const svn_opt_subcommand_desc3_t svnrdump__cmd_table[] =
 {
-  { "dump", dump_cmd, { 0 },
-    N_("usage: svnrdump dump URL [-r LOWER[:UPPER]]\n\n"
+  { "dump", dump_cmd, { 0 }, {N_(
+       "usage: svnrdump dump URL [-r LOWER[:UPPER]]\n"
+       "\n"), N_(
        "Dump revisions LOWER to UPPER of repository at remote URL to stdout\n"
        "in a 'dumpfile' portable format.  If only LOWER is given, dump that\n"
-       "one revision.\n"),
+       "one revision.\n"
+    )},
     { 'r', 'q', opt_incremental, SVN_SVNRDUMP__BASE_OPTIONS } },
-  { "load", load_cmd, { 0 },
-    N_("usage: svnrdump load URL\n\n"
-       "Load a 'dumpfile' given on stdin to a repository at remote URL.\n"),
+  { "load", load_cmd, { 0 }, {N_(
+       "usage: svnrdump load URL\n"
+       "\n"), N_(
+       "Load a 'dumpfile' given on stdin to a repository at remote URL.\n"
+    )},
     { 'q', opt_skip_revprop, SVN_SVNRDUMP__BASE_OPTIONS } },
-  { "help", 0, { "?", "h" },
-    N_("usage: svnrdump help [SUBCOMMAND...]\n\n"
-       "Describe the usage of this program or its subcommands.\n"),
+  { "help", 0, { "?", "h" }, {N_(
+       "usage: svnrdump help [SUBCOMMAND...]\n"
+       "\n"), N_(
+       "Describe the usage of this program or its subcommands.\n"
+    )},
     { 0 } },
-  { NULL, NULL, { 0 }, NULL, { 0 } }
+  { NULL, NULL, { 0 }, {NULL}, { 0 } }
 };
 
 static const apr_getopt_option_t svnrdump__options[] =
@@ -612,7 +618,7 @@ version(const char *progname,
                          pool);
 
   SVN_ERR(svn_ra_print_modules(version_footer, pool));
-  return svn_opt_print_help4(NULL, ensure_appname(progname, pool),
+  return svn_opt_print_help5(NULL, ensure_appname(progname, pool),
                              TRUE, quiet, FALSE, version_footer->data,
                              NULL, NULL, NULL, NULL, NULL, pool);
 }
@@ -671,7 +677,7 @@ help_cmd(apr_getopt_t *os,
       "\n"
       "Available subcommands:\n");
 
-  return svn_opt_print_help4(os, "svnrdump", FALSE, FALSE, FALSE, NULL,
+  return svn_opt_print_help5(os, "svnrdump", FALSE, FALSE, FALSE, NULL,
                              header, svnrdump__cmd_table, svnrdump__options,
                              NULL, NULL, pool);
 }
@@ -777,7 +783,7 @@ static svn_error_t *
 sub_main(int *exit_code, int argc, const char *argv[], apr_pool_t *pool)
 {
   svn_error_t *err = SVN_NO_ERROR;
-  const svn_opt_subcommand_desc2_t *subcommand = NULL;
+  const svn_opt_subcommand_desc3_t *subcommand = NULL;
   opt_baton_t *opt_baton;
   svn_revnum_t latest_revision = SVN_INVALID_REVNUM;
   const char *config_dir = NULL;
@@ -937,7 +943,7 @@ sub_main(int *exit_code, int argc, const
 
   if (opt_baton->help)
     {
-      subcommand = svn_opt_get_canonical_subcommand2(svnrdump__cmd_table,
+      subcommand = svn_opt_get_canonical_subcommand3(svnrdump__cmd_table,
                                                      "help");
     }
   if (subcommand == NULL)
@@ -947,8 +953,8 @@ sub_main(int *exit_code, int argc, const
           if (opt_baton->version)
             {
               /* Use the "help" subcommand to handle the "--version" option. */
-              static const svn_opt_subcommand_desc2_t pseudo_cmd =
-                { "--version", help_cmd, {0}, "",
+              static const svn_opt_subcommand_desc3_t pseudo_cmd =
+                { "--version", help_cmd, {0}, {""},
                   {opt_version,  /* must accept its own option */
                    'q',  /* --quiet */
                   } };
@@ -968,7 +974,7 @@ sub_main(int *exit_code, int argc, const
 
           SVN_ERR(svn_utf_cstring_to_utf8(&first_arg, os->argv[os->ind++],
                                           pool));
-          subcommand = svn_opt_get_canonical_subcommand2(svnrdump__cmd_table,
+          subcommand = svn_opt_get_canonical_subcommand3(svnrdump__cmd_table,
                                                          first_arg);
 
           if (subcommand == NULL)
@@ -996,11 +1002,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, svnrdump__options,
+            svn_opt_get_option_from_code3(opt_id, svnrdump__options,
                                           subcommand, pool);
           svn_opt_format_option(&optstr, badopt, FALSE, pool);
           if (subcommand->name[0] == '-')

Modified: subversion/branches/shelve-checkpoint/subversion/svnserve/svnserve.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svnserve/svnserve.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svnserve/svnserve.c 
(original)
+++ subversion/branches/shelve-checkpoint/subversion/svnserve/svnserve.c Mon 
Apr 16 12:21:02 2018
@@ -479,7 +479,7 @@ static svn_error_t * version(svn_boolean
                            _("\nCyrus SASL authentication is available.\n"));
 #endif
 
-  return svn_opt_print_help4(NULL, "svnserve", TRUE, quiet, FALSE,
+  return svn_opt_print_help5(NULL, "svnserve", TRUE, quiet, FALSE,
                              version_footer->data,
                              NULL, NULL, NULL, NULL, NULL, pool);
 }

Modified: subversion/branches/shelve-checkpoint/subversion/svnsync/svnsync.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svnsync/svnsync.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svnsync/svnsync.c 
(original)
+++ subversion/branches/shelve-checkpoint/subversion/svnsync/svnsync.c Mon Apr 
16 12:21:02 2018
@@ -89,17 +89,17 @@ enum svnsync__opt {
                              svnsync_opt_config_dir, \
                              svnsync_opt_config_options
 
-static const svn_opt_subcommand_desc2_t svnsync_cmd_table[] =
+static const svn_opt_subcommand_desc3_t svnsync_cmd_table[] =
   {
-    { "initialize", initialize_cmd, { "init" },
-      N_("usage: svnsync initialize DEST_URL SOURCE_URL\n"
-         "\n"
+    { "initialize", initialize_cmd, { "init" }, {N_(
+         "usage: svnsync initialize DEST_URL SOURCE_URL\n"
+         "\n"), N_(
          "Initialize a destination repository for synchronization from\n"
          "another repository.\n"
-         "\n"
+         "\n"), N_(
          "If the source URL is not the root of a repository, only the\n"
          "specified part of the repository will be synchronized.\n"
-         "\n"
+         "\n"), N_(
          "The destination URL must point to the root of a repository which\n"
          "has been configured to allow revision property changes.  In\n"
          "the general case, the destination repository must contain no\n"
@@ -109,65 +109,70 @@ static const svn_opt_subcommand_desc2_t
          "their counterparts in the source repository.  (This is useful\n"
          "when initializing a copy of a repository as a mirror of that same\n"
          "repository, for example.)\n"
-         "\n"
+         "\n"), N_(
          "You should not commit to, or make revision property changes in,\n"
          "the destination repository by any method other than 'svnsync'.\n"
          "In other words, the destination repository should be a read-only\n"
-         "mirror of the source repository.\n"),
+         "mirror of the source repository.\n"
+      )},
       { SVNSYNC_OPTS_DEFAULT, svnsync_opt_source_prop_encoding, 'q',
         svnsync_opt_allow_non_empty, svnsync_opt_disable_locking,
         svnsync_opt_steal_lock, 'M' } },
-    { "synchronize", synchronize_cmd, { "sync" },
-      N_("usage: svnsync synchronize DEST_URL [SOURCE_URL]\n"
-         "\n"
+    { "synchronize", synchronize_cmd, { "sync" }, {N_(
+         "usage: svnsync synchronize DEST_URL [SOURCE_URL]\n"
+         "\n"), N_(
          "Transfer all pending revisions to the destination from the source\n"
          "with which it was initialized.\n"
-         "\n"
+         "\n"), N_(
          "If SOURCE_URL is provided, use that as the source repository URL,\n"
          "ignoring what is recorded in the destination repository as the\n"
          "source URL.  Specifying SOURCE_URL is recommended in particular\n"
          "if untrusted users/administrators may have write access to the\n"
-         "DEST_URL repository.\n"),
+         "DEST_URL repository.\n"
+      )},
       { SVNSYNC_OPTS_DEFAULT, svnsync_opt_source_prop_encoding, 'q',
         svnsync_opt_disable_locking, svnsync_opt_steal_lock, 'M' } },
-    { "copy-revprops", copy_revprops_cmd, { 0 },
-      N_("usage:\n"
-         "\n"
+    { "copy-revprops", copy_revprops_cmd, { 0 }, {N_(
+         "usage:\n"
+         "\n"), N_(
          "    1. svnsync copy-revprops DEST_URL [SOURCE_URL]\n"
          "    2. svnsync copy-revprops DEST_URL REV[:REV2]\n"
-         "\n"
+         "\n"), N_(
          "Copy the revision properties in a given range of revisions to the\n"
          "destination from the source with which it was initialized.  If the\n"
          "revision range is not specified, it defaults to all revisions in\n"
          "the DEST_URL repository.  Note also that the 'HEAD' revision is 
the\n"
          "latest in DEST_URL, not necessarily the latest in SOURCE_URL.\n"
-         "\n"
+         "\n"), N_(
          "If SOURCE_URL is provided, use that as the source repository URL,\n"
          "ignoring what is recorded in the destination repository as the\n"
          "source URL.  Specifying SOURCE_URL is recommended in particular\n"
          "if untrusted users/administrators may have write access to the\n"
          "DEST_URL repository.\n"
-         "\n"
+         "\n"), N_(
          "Unless you need to trigger the destination repositoy's revprop\n"
          "change hooks for all revision properties, it is recommended to use\n"
          "the --skip-unchanged option for best performance.\n"
-         "\n"
-         "Form 2 is deprecated syntax, equivalent to specifying 
\"-rREV[:REV2]\".\n"),
+         "\n"), N_(
+         "Form 2 is deprecated syntax, equivalent to specifying 
\"-rREV[:REV2]\".\n"
+      )},
       { SVNSYNC_OPTS_DEFAULT, svnsync_opt_source_prop_encoding, 'q', 'r',
         svnsync_opt_disable_locking, svnsync_opt_steal_lock,
         svnsync_opt_skip_unchanged, 'M' } },
-    { "info", info_cmd, { 0 },
-      N_("usage: svnsync info DEST_URL\n"
-         "\n"
+    { "info", info_cmd, { 0 }, {N_(
+         "usage: svnsync info DEST_URL\n"
+         "\n"), N_(
          "Print information about the synchronization destination repository\n"
-         "located at DEST_URL.\n"),
+         "located at DEST_URL.\n"
+      )},
       { SVNSYNC_OPTS_DEFAULT } },
-    { "help", help_cmd, { "?", "h" },
-      N_("usage: svnsync help [SUBCOMMAND...]\n"
-         "\n"
-         "Describe the usage of this program or its subcommands.\n"),
+    { "help", help_cmd, { "?", "h" }, {N_(
+         "usage: svnsync help [SUBCOMMAND...]\n"
+         "\n"), N_(
+         "Describe the usage of this program or its subcommands.\n"
+      )},
       { 0 } },
-    { NULL, NULL, { 0 }, NULL, { 0 } }
+    { NULL, NULL, { 0 }, {NULL}, { 0 } }
   };
 
 static const apr_getopt_option_t svnsync_options[] =
@@ -1937,7 +1942,7 @@ help_cmd(apr_getopt_t *os, void *baton,
 
   SVN_ERR(svn_ra_print_modules(version_footer, pool));
 
-  SVN_ERR(svn_opt_print_help4(os, "svnsync",
+  SVN_ERR(svn_opt_print_help5(os, "svnsync",
                               opt_baton ? opt_baton->version : FALSE,
                               opt_baton ? opt_baton->quiet : FALSE,
                               /*###opt_state ? opt_state->verbose :*/ FALSE,
@@ -1960,7 +1965,7 @@ help_cmd(apr_getopt_t *os, void *baton,
 static svn_error_t *
 sub_main(int *exit_code, int argc, const char *argv[], apr_pool_t *pool)
 {
-  const svn_opt_subcommand_desc2_t *subcommand = NULL;
+  const svn_opt_subcommand_desc3_t *subcommand = NULL;
   apr_array_header_t *received_opts;
   opt_baton_t opt_baton;
   svn_config_t *config;
@@ -2189,7 +2194,7 @@ sub_main(int *exit_code, int argc, const
     }
 
   if (opt_baton.help)
-    subcommand = svn_opt_get_canonical_subcommand2(svnsync_cmd_table, "help");
+    subcommand = svn_opt_get_canonical_subcommand3(svnsync_cmd_table, "help");
 
   /* The --non-interactive and --force-interactive options are mutually
    * exclusive. */
@@ -2269,8 +2274,8 @@ sub_main(int *exit_code, int argc, const
           if (opt_baton.version)
             {
               /* Use the "help" subcommand to handle "--version". */
-              static const svn_opt_subcommand_desc2_t pseudo_cmd =
-                { "--version", help_cmd, {0}, "",
+              static const svn_opt_subcommand_desc3_t pseudo_cmd =
+                { "--version", help_cmd, {0}, {""},
                   {svnsync_opt_version,  /* must accept its own option */
                    'q',  /* --quiet */
                   } };
@@ -2290,7 +2295,7 @@ sub_main(int *exit_code, int argc, const
 
           SVN_ERR(svn_utf_cstring_to_utf8(&first_arg, os->argv[os->ind++],
                                           pool));
-          subcommand = svn_opt_get_canonical_subcommand2(svnsync_cmd_table,
+          subcommand = svn_opt_get_canonical_subcommand3(svnsync_cmd_table,
                                                          first_arg);
           if (subcommand == NULL)
             {
@@ -2308,11 +2313,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, svnsync_options, subcommand,
+            svn_opt_get_option_from_code3(opt_id, svnsync_options, subcommand,
                                           pool);
           svn_opt_format_option(&optstr, badopt, FALSE, pool);
           if (subcommand->name[0] == '-')

Modified: 
subversion/branches/shelve-checkpoint/subversion/svnversion/svnversion.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svnversion/svnversion.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svnversion/svnversion.c 
(original)
+++ subversion/branches/shelve-checkpoint/subversion/svnversion/svnversion.c 
Mon Apr 16 12:21:02 2018
@@ -38,7 +38,7 @@
 static svn_error_t *
 version(svn_boolean_t quiet, apr_pool_t *pool)
 {
-  return svn_opt_print_help4(NULL, "svnversion", TRUE, quiet, FALSE,
+  return svn_opt_print_help5(NULL, "svnversion", TRUE, quiet, FALSE,
                              NULL, NULL, NULL, NULL, NULL, NULL, pool);
 }
 

Modified: 
subversion/branches/shelve-checkpoint/subversion/tests/cmdline/authz_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/tests/cmdline/authz_tests.py?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- 
subversion/branches/shelve-checkpoint/subversion/tests/cmdline/authz_tests.py 
(original)
+++ 
subversion/branches/shelve-checkpoint/subversion/tests/cmdline/authz_tests.py 
Mon Apr 16 12:21:02 2018
@@ -168,7 +168,7 @@ def authz_read_access(sbox):
   fws_url = B_url + '/folder with spaces'
   fws_empty_folder_url = fws_url + '/empty folder'
 
-  if sbox.repo_url.startswith("http"):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: E170001: Authorization failed.*"
@@ -280,7 +280,7 @@ def authz_write_access(sbox):
 
   write_restrictive_svnserve_conf(sbox.repo_dir)
 
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: E220004: Access denied.*"
@@ -367,7 +367,7 @@ def authz_checkout_test(sbox):
   # 1st part: disable all read access, checkout should fail
 
   # write an authz file with *= on /
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: E170001: Authorization failed.*"
@@ -502,7 +502,7 @@ def authz_log_and_tracing_test(sbox):
   write_restrictive_svnserve_conf(sbox.repo_dir)
 
   # write an authz file with *=rw on /
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: E170001: Authorization failed.*"
@@ -533,7 +533,7 @@ def authz_log_and_tracing_test(sbox):
 
   # now disable read access on the first version of rho, keep the copy in
   # /A/D readable.
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: E170001: Authorization failed.*"
@@ -551,7 +551,7 @@ def authz_log_and_tracing_test(sbox):
                                      'log', '-r', '2', '--limit', '1',
                                      wc_dir)
 
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err2 = expected_err
   else:
     expected_err2 = ".*svn: E220001: ((Unreadable path encountered; " \
@@ -593,7 +593,7 @@ def authz_log_and_tracing_test(sbox):
   svntest.actions.run_and_verify_svn(None, expected_err2,
                                      'cat', '-r', '2', D_url+'/rho')
 
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err2 = expected_err
   else:
     expected_err2 = ".*svn: E220001: Unreadable path encountered; access 
denied.*"
@@ -624,7 +624,7 @@ def authz_aliases(sbox):
 
   write_restrictive_svnserve_conf(sbox.repo_dir)
 
-  if sbox.repo_url.startswith("http"):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: E170001: Authorization failed.*"
@@ -669,9 +669,9 @@ def authz_validate(sbox):
   write_authz_file(sbox, { "/"  : "* = r",
                            "/A/B" : "@undefined_group = rw" })
 
-  if sbox.repo_url.startswith("http"):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
-  elif sbox.repo_url.startswith("svn"):
+  elif svntest.main.is_ra_type_svn():
     expected_err = ".*Invalid authz configuration"
   else:
     expected_err = ".*@undefined_group.*"
@@ -688,9 +688,9 @@ devs1 = @admins, dev1
 devs2 = @admins, dev2
 devs = @devs1, dev3, dev4""" })
 
-  if sbox.repo_url.startswith("http"):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
-  elif sbox.repo_url.startswith("svn"):
+  elif svntest.main.is_ra_type_svn():
     expected_err = ".*Invalid authz configuration"
   else:
     expected_err = ".*Circular dependency.*"
@@ -726,7 +726,7 @@ def authz_locking(sbox):
   write_authz_file(sbox, {"/": "", "/A": "jrandom = rw"})
   write_restrictive_svnserve_conf(sbox.repo_dir)
 
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: warning: W170001: Authorization failed.*"
@@ -781,7 +781,7 @@ def authz_locking(sbox):
   svntest.actions.run_and_verify_info([{'Lock Token' : None}],
                                       sbox.ospath('A/mu'))
 
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: warning: W160039: .*([Aa]uth.*perf|[Ff]orbidden).*"
   else:
     expected_err = ".*svn: warning: W170001: Authorization failed.*"
@@ -981,7 +981,7 @@ def multiple_matches(sbox):
   sbox.build(create_wc = False)
   root_url = sbox.repo_url
   write_restrictive_svnserve_conf(sbox.repo_dir)
-  if sbox.repo_url.startswith("http"):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: E170001: Authorization failed.*"
@@ -1137,7 +1137,7 @@ def case_sensitive_authz(sbox):
   # error messages
   expected_error_for_commit = ".*Commit failed.*"
 
-  if sbox.repo_url.startswith("http"):
+  if svntest.main.is_ra_type_dav():
     expected_error_for_cat = ".*[Ff]orbidden.*"
   else:
     expected_error_for_cat = ".*svn: E170001: Authorization failed.*"

Modified: 
subversion/branches/shelve-checkpoint/subversion/tests/cmdline/commit_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/tests/cmdline/commit_tests.py?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- 
subversion/branches/shelve-checkpoint/subversion/tests/cmdline/commit_tests.py 
(original)
+++ 
subversion/branches/shelve-checkpoint/subversion/tests/cmdline/commit_tests.py 
Mon Apr 16 12:21:02 2018
@@ -3113,6 +3113,39 @@ def commit_xml(sbox):
   sbox.simple_append('index.html', '<Q></R>', True)
   sbox.simple_commit()
 
+@Issue(4722)
+def commit_issue4722_checksum(sbox):
+  "commit that triggered checksum failure"
+
+  sbox.build()
+
+  # This bug only ever affected FSFS in 1.9.7.  The test could be
+  # considered a bit "fragile" as any change to the on-disk
+  # representation may well make it pass trivially.  On the other hand
+  # it should still pass irrespective of that representation, and for
+  # all other repository types.
+
+  # Enough data to allow the bug to occur
+  with open(sbox.ospath('f'), 'w') as fp:
+    for i in range(0, 2001):
+      fp.write('abcdefghijklmnopqrstuvwxyz')
+  sbox.simple_add('f')
+  sbox.simple_commit()
+
+  # Just the right data to trigger the bug
+  with open(sbox.ospath('f'), 'w') as fp:
+    for i in range(0, 8713):
+      fp.write(str(i))
+    fp.write("11111")
+  sbox.simple_commit()
+
+  # Trigger deduplication which is when the bug occurred
+  with open(sbox.ospath('f'), 'w') as fp:
+    for i in range(0, 2001):
+      fp.write('abcdefghijklmnopqrstuvwxyz')
+  sbox.simple_commit()
+
+
 ########################################################################
 # Run the tests
 
@@ -3190,6 +3223,7 @@ test_list = [ None,
               commit_mergeinfo_ood,
               mkdir_conflict_proper_error,
               commit_xml,
+              commit_issue4722_checksum,
              ]
 
 if __name__ == '__main__':

Modified: 
subversion/branches/shelve-checkpoint/subversion/tests/cmdline/dav-mirror-autocheck.sh
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/tests/cmdline/dav-mirror-autocheck.sh?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- 
subversion/branches/shelve-checkpoint/subversion/tests/cmdline/dav-mirror-autocheck.sh
 (original)
+++ 
subversion/branches/shelve-checkpoint/subversion/tests/cmdline/dav-mirror-autocheck.sh
 Mon Apr 16 12:21:02 2018
@@ -100,6 +100,7 @@ function setup_config() {
 
   say "setting up config: " $1
 cat > "$1" <<__EOF__
+$LOAD_MOD_MPM
 $LOAD_MOD_LOG_CONFIG
 $LOAD_MOD_MIME
 $LOAD_MOD_UNIXD
@@ -114,9 +115,30 @@ $LOAD_MOD_AUTHZ_CORE
 $LOAD_MOD_AUTHZ_USER
 $LOAD_MOD_AUTHZ_HOST
 
+__EOF__
+
+if "$HTTPD" -v | grep '/2\.[012]' >/dev/null; then
+  cat >> "$1" <<__EOF__
 LockFile            lock
 User                $(id -un)
 Group               $(id -gn)
+__EOF__
+else
+HTTPD_LOCK="$HTTPD_ROOT/lock"
+mkdir "$HTTPD_LOCK" \
+  || fail "couldn't create lock directory '$HTTPD_LOCK'"
+  cat >> "$1" <<__EOF__
+# worker and prefork MUST have a mpm-accept lockfile in 2.3.0+
+<IfModule worker.c>
+  Mutex "file:$HTTPD_LOCK" mpm-accept
+</IfModule>
+<IfModule prefork.c>
+  Mutex "file:$HTTPD_LOCK" mpm-accept
+</IfModule>
+__EOF__
+fi
+
+cat >> "$1" <<__EOF__
 Listen              ${TEST_PORT}
 ServerName          localhost
 PidFile             "${HTTPD_ROOT}/pid"
@@ -133,6 +155,9 @@ MaxRequestsPerChild 0
 <IfModule worker.c>
   ThreadsPerChild   8
 </IfModule>
+<IfModule event.c>
+  ThreadsPerChild   8
+</IfModule>
 MaxClients          16
 HostNameLookups     Off
 LogFormat           "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" 
\"%{User-Agent}i\"" format
@@ -202,6 +227,12 @@ function usage() {
 
 SCRIPT=$(basename $0)
 
+NO_TESTS=
+if [ "x$1" = 'x--no-tests' ]; then
+  NO_TESTS=1
+  shift
+fi
+
 if [ $# -ne 1 ] ; then
   usage
 fi
@@ -249,7 +280,7 @@ HTPASSWD=$(get_prog_name htpasswd htpass
 SVN=$ABS_BUILDDIR/subversion/svn/svn
 SVNADMIN=$ABS_BUILDDIR/subversion/svnadmin/svnadmin
 SVNSYNC=$ABS_BUILDDIR/subversion/svnsync/svnsync
-SVNMUCC=${SVNMUCC:-$ABS_BUILDDIR/tools/client-side/svnmucc/svnmucc}
+SVNMUCC=$ABS_BUILDDIR/subversion/svnmucc/svnmucc
 SVNLOOK=$ABS_BUILDDIR/subversion/svnlook/svnlook
 
 [ -x $HTTPD ] || fail "HTTPD '$HTTPD' not executable"
@@ -259,9 +290,7 @@ SVNLOOK=$ABS_BUILDDIR/subversion/svnlook
 [ -x $SVNADMIN ] || fail "SVNADMIN $SVNADMIN not built"
 [ -x $SVNSYNC ] || fail "SVNSYNC $SVNSYNC not built"
 [ -x $SVNLOOK ] || fail "SVNLOOK $SVNLOOK not built"
-[ -x $SVNMUCC ] \
- || fail SVNMUCC $SVNMUCC executable not built, needed for test. \
-    \'cd $ABS_BUILDDIR\; make svnmucc\' to fix.
+[ -x $SVNMUCC ] || fail "SVNMUCC $SVNMUCC not built"
 
 say HTTPD: $HTTPD
 say SVN: $SVN
@@ -309,6 +338,10 @@ LOAD_MOD_AUTHN_FILE="$(get_loadmodule_co
 LOAD_MOD_AUTHZ_USER="$(get_loadmodule_config mod_authz_user)" \
     || fail "Authz_User module not found."
 }
+if [ ${APACHE_MPM:+set} ]; then
+    LOAD_MOD_MPM=$(get_loadmodule_config mod_mpm_$APACHE_MPM) \
+      || fail "MPM module not found"
+fi
 
 if [ ${MODULE_PATH:+set} ]; then
     MOD_DAV_SVN="$MODULE_PATH/mod_dav_svn.so"
@@ -365,7 +398,9 @@ $SVNADMIN create "$SLAVE_REPOS" || fail
 $SVNADMIN dump "$MASTER_REPOS" | $SVNADMIN load "$SLAVE_REPOS" \
   || fail "duplicate repositories failed"
 # make sure uuid's match
-[ `cat "$SLAVE_REPOS/db/uuid"` = `cat "$MASTER_REPOS/db/uuid"` ] \
+read MASTER_UUID < "$MASTER_REPOS/db/uuid"
+read SLAVE_UUID < "$SLAVE_REPOS/db/uuid"
+[ "$SLAVE_UUID" = "$MASTER_UUID" ] \
   || fail "master/slave uuid mismatch"
 # setup hooks:
 #  slave allows revprop changes
@@ -397,6 +432,12 @@ $SVNSYNC initialize --non-interactive "$
     --username=svnsync --password=svnsync \
     || fail "svnsync initialize failed"
 
+if [ $NO_TESTS ]; then
+  echo "MASTER_URL=$MASTER_URL"
+  echo "SLAVE_URL=$SLAVE_URL"
+  exit
+fi
+
 # OK, let's start testing! Commit changes to slave, expect
 # them to proxy through to the master, and then
 # svnsync back to the slave


Reply via email to