Modified: subversion/trunk/subversion/svnlook/svnlook.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svnlook/svnlook.c?rev=1826339&r1=1826338&r2=1826339&view=diff
==============================================================================
--- subversion/trunk/subversion/svnlook/svnlook.c (original)
+++ subversion/trunk/subversion/svnlook/svnlook.c Fri Mar  9 12:17:29 2018
@@ -212,110 +212,127 @@ 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"
+      "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"
+      "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"
+      "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"
+      "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"
+      "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"
       "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"
       "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"
+      "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"
       "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"
+      "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"
+      "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"
+      "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"
       "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"
       "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"
       "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"
+      "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"
+      "Print the youngest revision number.\n"
+   )},
    {svnlook__no_newline} },
 
-  { NULL, NULL, {0}, NULL, {0} }
+  { NULL, NULL, {0}, {NULL}, {0} }
 };
 
 
@@ -2222,7 +2239,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 +2454,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 +2651,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 +2662,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 +2686,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 +2779,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/trunk/subversion/svnrdump/svnrdump.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/svnrdump.c?rev=1826339&r1=1826338&r2=1826339&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/svnrdump.c (original)
+++ subversion/trunk/subversion/svnrdump/svnrdump.c Fri Mar  9 12:17:29 2018
@@ -81,23 +81,26 @@ 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"
        "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"
+       "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"
+       "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[] =
@@ -671,7 +674,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 +780,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 +940,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 +950,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 +971,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 +999,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/trunk/subversion/svnsync/svnsync.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svnsync/svnsync.c?rev=1826339&r1=1826338&r2=1826339&view=diff
==============================================================================
--- subversion/trunk/subversion/svnsync/svnsync.c (original)
+++ subversion/trunk/subversion/svnsync/svnsync.c Fri Mar  9 12:17:29 2018
@@ -89,10 +89,10 @@ 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"
+    { "initialize", initialize_cmd, { "init" }, {N_(
+         "usage: svnsync initialize DEST_URL SOURCE_URL\n"
          "\n"
          "Initialize a destination repository for synchronization from\n"
          "another repository.\n"
@@ -113,12 +113,13 @@ static const svn_opt_subcommand_desc2_t
          "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"
+    { "synchronize", synchronize_cmd, { "sync" }, {N_(
+         "usage: svnsync synchronize DEST_URL [SOURCE_URL]\n"
          "\n"
          "Transfer all pending revisions to the destination from the source\n"
          "with which it was initialized.\n"
@@ -127,11 +128,12 @@ static const svn_opt_subcommand_desc2_t
          "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"
+    { "copy-revprops", copy_revprops_cmd, { 0 }, {N_(
+         "usage:\n"
          "\n"
          "    1. svnsync copy-revprops DEST_URL [SOURCE_URL]\n"
          "    2. svnsync copy-revprops DEST_URL REV[:REV2]\n"
@@ -152,22 +154,25 @@ static const svn_opt_subcommand_desc2_t
          "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"),
+         "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"
+    { "info", info_cmd, { 0 }, {N_(
+         "usage: svnsync info DEST_URL\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"
+    { "help", help_cmd, { "?", "h" }, {N_(
+         "usage: svnsync help [SUBCOMMAND...]\n"
          "\n"
-         "Describe the usage of this program or its subcommands.\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/trunk/tools/client-side/svn-mergeinfo-normalizer/help-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/svn-mergeinfo-normalizer/help-cmd.c?rev=1826339&r1=1826338&r2=1826339&view=diff
==============================================================================
--- subversion/trunk/tools/client-side/svn-mergeinfo-normalizer/help-cmd.c 
(original)
+++ subversion/trunk/tools/client-side/svn-mergeinfo-normalizer/help-cmd.c Fri 
Mar  9 12:17:29 2018
@@ -176,7 +176,7 @@ svn_min__help(apr_getopt_t *os,
   svn_stringbuf_appendcstr(version_footer, "* KWallet (KDE)\n");
 #endif
 
-  return svn_opt_print_help4(os,
+  return svn_opt_print_help5(os,
                              "svn-mergeinfo-normalizer",
                              opt_state ? opt_state->version : FALSE,
                              opt_state ? opt_state->quiet : FALSE,

Modified: 
subversion/trunk/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h?rev=1826339&r1=1826338&r2=1826339&view=diff
==============================================================================
--- 
subversion/trunk/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h
 (original)
+++ 
subversion/trunk/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h
 Fri Mar  9 12:17:29 2018
@@ -117,7 +117,7 @@ svn_opt_subcommand_t
   svn_min__remove_branches;
 
 /* See definition in svn.c for documentation. */
-extern const svn_opt_subcommand_desc2_t svn_min__cmd_table[];
+extern const svn_opt_subcommand_desc3_t svn_min__cmd_table[];
 
 /* See definition in svn.c for documentation. */
 extern const int svn_min__global_options[];

Modified: 
subversion/trunk/tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c?rev=1826339&r1=1826338&r2=1826339&view=diff
==============================================================================
--- 
subversion/trunk/tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c
 (original)
+++ 
subversion/trunk/tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c
 Fri Mar  9 12:17:29 2018
@@ -221,17 +221,18 @@ const int svn_min__global_options[] =
   opt_config_dir, opt_config_options, 0
 };
 
-const svn_opt_subcommand_desc2_t svn_min__cmd_table[] =
+const svn_opt_subcommand_desc3_t svn_min__cmd_table[] =
 {
-  { "help", svn_min__help, {"?", "h"}, N_
-    ("Describe the usage of this program or its subcommands.\n"
-     "usage: help [SUBCOMMAND...]\n"),
+  { "help", svn_min__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 "-?". */
 
-  { "analyze", svn_min__analyze, { "analyse" }, N_
-    ("Generate a report of which part of the sub-tree mergeinfo can be\n"
+  { "analyze", svn_min__analyze, { "analyse" }, {N_(
+     "Generate a report of which part of the sub-tree mergeinfo can be\n"
      "removed and which part can't.\n"
      "usage: analyze [WCPATH...]\n"
      "\n"
@@ -245,13 +246,13 @@ const svn_opt_subcommand_desc2_t svn_min
      "  In non-verbose mode, the per-node output does not give the parent 
path,\n"
      "  no successful elisions and branch removals nor the list of remaining\n"
      "  branches.\n"
-    ),
+    )},
     {opt_targets, opt_depth, 'v',
      opt_remove_obsoletes, opt_remove_redundant,
      opt_remove_redundant_misaligned, opt_combine_ranges} },
 
-  { "normalize", svn_min__normalize, { 0 }, N_
-    ("Normalize / reduce the mergeinfo throughout the working copy sub-tree.\n"
+  { "normalize", svn_min__normalize, { 0 }, {N_(
+     "Normalize / reduce the mergeinfo throughout the working copy sub-tree.\n"
      "usage: normalize [WCPATH...]\n"
      "\n"
      "  If neither --remove-obsoletes, --remove-redundant, --combine-ranges\n"
@@ -328,13 +329,14 @@ const svn_opt_subcommand_desc2_t svn_min
      "  If all branches have been removed from a nodes' mergeinfo, the whole\n"
      "  svn:mergeinfo property will be removed.  Otherwise, only obsolete\n"
      "  branches will be removed.  In verbose mode, a list of branches that\n"
-     "  could not be removed will be shown per node.\n"),
+     "  could not be removed will be shown per node.\n"
+    )},
     {opt_targets, opt_depth, opt_dry_run, 'q', 'v',
      opt_remove_obsoletes, opt_remove_redundant,
      opt_remove_redundant_misaligned, opt_combine_ranges} },
 
-  { "remove-branches", svn_min__remove_branches, { 0 }, N_
-    ("Read a list of branch names from the given file and remove all\n"
+  { "remove-branches", svn_min__remove_branches, { 0 }, {N_(
+     "Read a list of branch names from the given file and remove all\n"
      "mergeinfo referring to these branches from the given targets.\n"
      "usage: remove-branches [WCPATH...] --file FILE\n"
      "\n"
@@ -346,10 +348,11 @@ const svn_opt_subcommand_desc2_t svn_min
      "  allows for selective removal of obsolete branches.  It may therefore 
be\n"
      "  better suited for large deployments with complex branch structures.\n"
      "  You may also use this to remove mergeinfo that refers to still 
existing\n"
-     "  branches.\n"),
+     "  branches.\n"
+    )},
     {opt_targets, opt_depth, opt_dry_run, 'q', 'v', 'F'} },
 
-  { NULL, NULL, {0}, NULL, {0} }
+  { NULL, NULL, {0}, {NULL}, {0} }
 };
 
 
@@ -414,7 +417,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_min__cmd_baton_t command_baton = { 0 };
   svn_auth_baton_t *ab;
   svn_config_t *cfg_config;
@@ -639,7 +642,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_min__cmd_table, "help");
+    subcommand = svn_opt_get_canonical_subcommand3(svn_min__cmd_table, "help");
 
   /* If we're not running the `help' subcommand, then look for a
      subcommand in the first argument. */
@@ -650,8 +653,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_min__help, {0}, "",
+              static const svn_opt_subcommand_desc3_t pseudo_cmd =
+                { "--version", svn_min__help, {0}, {""},
                   {opt_version,    /* must accept its own option */
                    'q',            /* brief output */
                    'v',            /* verbose output */
@@ -676,7 +679,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_min__cmd_table,
+          subcommand = svn_opt_get_canonical_subcommand3(svn_min__cmd_table,
                                                          first_arg);
           if (subcommand == NULL)
             {
@@ -704,12 +707,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_min__global_options))
         {
           const char *optstr;
           const apr_getopt_option_t *badopt =
-            svn_opt_get_option_from_code2(opt_id, svn_min__options,
+            svn_opt_get_option_from_code3(opt_id, svn_min__options,
                                           subcommand, pool);
           svn_opt_format_option(&optstr, badopt, FALSE, pool);
           if (subcommand->name[0] == '-')

Modified: subversion/trunk/tools/client-side/svnconflict/svnconflict.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/svnconflict/svnconflict.c?rev=1826339&r1=1826338&r2=1826339&view=diff
==============================================================================
--- subversion/trunk/tools/client-side/svnconflict/svnconflict.c (original)
+++ subversion/trunk/tools/client-side/svnconflict/svnconflict.c Fri Mar  9 
12:17:29 2018
@@ -148,16 +148,17 @@ static const int svnconflict_global_opti
 { opt_auth_username, opt_auth_password, opt_auth_password_from_stdin,
   opt_config_dir, opt_config_options, 0 };
 
-static const svn_opt_subcommand_desc2_t svnconflict_cmd_table[] =
+static const svn_opt_subcommand_desc3_t svnconflict_cmd_table[] =
 {
   /* This command is also invoked if we see option "--help", "-h" or "-?". */
-  { "help", svnconflict_help, {"?", "h"}, N_
-    ("Describe the usage of this program or its subcommands.\n"
-     "usage: help [SUBCOMMAND...]\n"),
+  { "help", svnconflict_help, {"?", "h"}, {N_(
+     "Describe the usage of this program or its subcommands.\n"
+     "usage: help [SUBCOMMAND...]\n"
+    )},
     {0} },
 
-  { "list", svnconflict_list, {"ls"}, N_
-    ("List conflicts at a conflicted path.\n"
+  { "list", svnconflict_list, {"ls"}, {N_(
+     "List conflicts at a conflicted path.\n"
      "usage: list PATH\n"
      "\n"
      "  List conflicts at PATH, one per line. Possible conflicts are:\n"
@@ -176,67 +177,67 @@ static const svn_opt_subcommand_desc2_t
      "    If a tree conflict exists, no text or property conflicts exist.\n"
      "  \n"
      "  If PATH is not in conflict, the exit code will be 1, and 0 
otherwise.\n"
-     ""),
+    )},
     {0}, },
 
-  { "options-text", svnconflict_options_text, {0}, N_
-    ("List options for resolving a text conflict at path.\n"
+  { "options-text", svnconflict_options_text, {0}, {N_(
+     "List options for resolving a text conflict at path.\n"
      "usage: options-text PATH\n"
      "\n"
      "  List text conflict resolution options at PATH, one per line.\n"
      "  Each line contains a numeric option ID, a colon, and a description.\n"
      "  If PATH is not in conflict, the exit code will be 1, and 0 
otherwise.\n"
-     ""),
+    )},
     {0}, },
 
-  { "options-prop", svnconflict_options_prop, {0}, N_
-    ("List options for resolving a property conflict at path.\n"
+  { "options-prop", svnconflict_options_prop, {0}, {N_(
+     "List options for resolving a property conflict at path.\n"
      "usage: options-prop PATH\n"
      "\n"
      "  List property conflict resolution options at PATH, one per line.\n"
      "  Each line contains a numeric option ID, a colon, and a description.\n"
      "  If PATH is not in conflict, the exit code will be 1, and 0 
otherwise.\n"
-     ""),
+    )},
     {0}, },
 
-  { "options-tree", svnconflict_options_tree, {0}, N_
-    ("List options for resolving a tree conflict at path.\n"
+  { "options-tree", svnconflict_options_tree, {0}, {N_(
+     "List options for resolving a tree conflict at path.\n"
      "usage: options-tree PATH\n"
      "\n"
      "  List tree conflict resolution options at PATH, one per line.\n"
      "  Each line contains a numeric option ID, a colon, and a description.\n"
      "  If PATH is not in conflict, the exit code will be 1, and 0 
otherwise.\n"
-     ""),
+    )},
     {0}, },
 
-  { "resolve-text", svnconflict_resolve_text, {0}, N_
-    ("Resolve the text conflict at path.\n"
+  { "resolve-text", svnconflict_resolve_text, {0}, {N_(
+     "Resolve the text conflict at path.\n"
      "usage: resolve-text OPTION_ID PATH\n"
      "\n"
      "  Resolve the text conflict at PATH with a given resolution option.\n"
      "  If PATH is not in conflict, the exit code will be 1, and 0 
otherwise.\n"
-     ""),
+    )},
     {0}, },
 
-  { "resolve-prop", svnconflict_resolve_prop, {0}, N_
-    ("Resolve the property conflict at path.\n"
+  { "resolve-prop", svnconflict_resolve_prop, {0}, {N_(
+     "Resolve the property conflict at path.\n"
      "usage: resolve-prop PROPNAME OPTION_ID PATH\n"
      "\n"
      "  Resolve conflicted property PROPNAME at PATH with a given resolution 
option.\n"
      "  If PATH is not in conflict, the exit code will be 1, and 0 
otherwise.\n"
-     ""),
+    )},
     {0}, },
 
-  { "resolve-tree", svnconflict_resolve_tree, {0}, N_
-    ("Resolve the tree conflict at path.\n"
+  { "resolve-tree", svnconflict_resolve_tree, {0}, {N_(
+     "Resolve the tree conflict at path.\n"
      "usage: resolve-tree OPTION_ID PATH\n"
      "\n"
      "  Resolve the tree conflict at PATH with a given resolution option.\n"
      "  If PATH is not in conflict, the exit code will be 1, and 0 
otherwise.\n"
-     ""),
+    )},
     {0}, },
 
-  { NULL, NULL, {0}, NULL, {0} }
+  { NULL, NULL, {0}, {NULL}, {0} }
 };
 
 /* Version compatibility check */
@@ -297,7 +298,7 @@ svnconflict_help(apr_getopt_t *os, void
       SVN_ERR(svn_ra_print_modules(version_footer, pool));
     }
 
-  SVN_ERR(svn_opt_print_help4(os,
+  SVN_ERR(svn_opt_print_help5(os,
                               "svnconflict",   /* ### erm, derive somehow? */
                               opt_state ? opt_state->version : FALSE,
                               FALSE, /* quiet */
@@ -641,7 +642,7 @@ sub_main(int *exit_code, int argc, const
   apr_array_header_t *received_opts;
   svnconflict_cmd_baton_t command_baton;
   int i;
-  const svn_opt_subcommand_desc2_t *subcommand = NULL;
+  const svn_opt_subcommand_desc3_t *subcommand = NULL;
   svn_auth_baton_t *ab;
   svn_config_t *cfg_config;
   apr_hash_t *cfg_hash;
@@ -742,7 +743,7 @@ sub_main(int *exit_code, int argc, const
      just typos/mistakes.  Whatever the case, the subcommand to
      actually run is svnconflict_help(). */
   if (opt_state.help)
-    subcommand = svn_opt_get_canonical_subcommand2(svnconflict_cmd_table,
+    subcommand = svn_opt_get_canonical_subcommand3(svnconflict_cmd_table,
                                                    "help");
 
   /* If we're not running the `help' subcommand, then look for a
@@ -754,8 +755,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", svnconflict_help, {0}, "",
+              static const svn_opt_subcommand_desc3_t pseudo_cmd =
+                { "--version", svnconflict_help, {0}, {""},
                   {opt_version,    /* must accept its own option */
                    opt_config_dir  /* all commands accept this */
                   } };
@@ -778,7 +779,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(svnconflict_cmd_table,
+          subcommand = svn_opt_get_canonical_subcommand3(svnconflict_cmd_table,
                                                          first_arg);
           if (subcommand == NULL)
             {
@@ -805,12 +806,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,
                                              svnconflict_global_options))
         {
           const char *optstr;
           const apr_getopt_option_t *badopt =
-            svn_opt_get_option_from_code2(opt_id, svnconflict_options,
+            svn_opt_get_option_from_code3(opt_id, svnconflict_options,
                                           subcommand, pool);
           svn_opt_format_option(&optstr, badopt, FALSE, pool);
           if (subcommand->name[0] == '-')

Modified: subversion/trunk/tools/server-side/svnauthz.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/tools/server-side/svnauthz.c?rev=1826339&r1=1826338&r2=1826339&view=diff
==============================================================================
--- subversion/trunk/tools/server-side/svnauthz.c (original)
+++ subversion/trunk/tools/server-side/svnauthz.c Fri Mar  9 12:17:29 2018
@@ -110,14 +110,15 @@ static svn_opt_subcommand_t
 /* 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"},
-   ("usage: svnauthz help [SUBCOMMAND...]\n\n"
-    "Describe the usage of this program or its subcommands.\n"),
+  {"help", subcommand_help, {"?", "h"}, {(
+    "usage: svnauthz help [SUBCOMMAND...]\n\n"
+    "Describe the usage of this program or its subcommands.\n"
+    )},
    {0} },
-  {"validate", subcommand_validate, {0} /* no aliases */,
-   ("Checks the syntax of an authz file.\n"
+  {"validate", subcommand_validate, {0} /* no aliases */, {(
+    "Checks the syntax of an authz file.\n"
     "usage: 1. svnauthz validate TARGET\n"
     "       2. svnauthz validate --transaction TXN REPOS_PATH FILE_PATH\n\n"
     "  1. Loads and validates the syntax of the authz file at TARGET.\n"
@@ -129,10 +130,10 @@ static const svn_opt_subcommand_desc2_t
     "    0   when syntax is OK.\n"
     "    1   when syntax is invalid.\n"
     "    2   operational error\n"
-    ),
+    )},
    {'t'} },
-  {"accessof", subcommand_accessof, {0} /* no aliases */,
-   ("Print or test the permissions set by an authz file.\n"
+  {"accessof", subcommand_accessof, {0} /* no aliases */, {(
+    "Print or test the permissions set by an authz file.\n"
     "usage: 1. svnauthz accessof TARGET\n"
     "       2. svnauthz accessof -t TXN REPOS_PATH FILE_PATH\n"
     "\n"
@@ -159,10 +160,10 @@ static const svn_opt_subcommand_desc2_t
     "    1   when syntax is invalid.\n"
     "    2   operational error\n"
     "    3   when '--is' argument doesn't match\n"
-    ),
+    )},
    {'t', svnauthz__username, svnauthz__path, svnauthz__repos, svnauthz__is,
     svnauthz__groups_file, 'R'} },
-  { NULL, NULL, {0}, NULL, {0} }
+  { NULL, NULL, {0}, {NULL}, {0} }
 };
 
 static svn_error_t *
@@ -186,7 +187,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, "svnauthz",
+  SVN_ERR(svn_opt_print_help5(os, "svnauthz",
                               opt_state ? opt_state->version : FALSE,
                               FALSE, /* quiet */
                               FALSE, /* verbose */
@@ -459,7 +460,7 @@ sub_main(int *exit_code, int argc, const
 {
   svn_error_t *err;
 
-  const svn_opt_subcommand_desc2_t *subcommand = NULL;
+  const svn_opt_subcommand_desc3_t *subcommand = NULL;
   struct svnauthz_opt_state opt_state = { 0 };
   apr_getopt_t *os;
   apr_array_header_t *received_opts;
@@ -545,9 +546,9 @@ sub_main(int *exit_code, int argc, const
     {
       /* Pre 1.8 compatibility mode. */
       if (argc == 1) /* No path argument */
-        subcommand = svn_opt_get_canonical_subcommand2(cmd_table, "help");
+        subcommand = svn_opt_get_canonical_subcommand3(cmd_table, "help");
       else
-        subcommand = svn_opt_get_canonical_subcommand2(cmd_table, "validate");
+        subcommand = svn_opt_get_canonical_subcommand3(cmd_table, "validate");
     }
 
   /* If the user asked for help, then the rest of the arguments are
@@ -555,7 +556,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 (subcommand == NULL)
     {
@@ -564,8 +565,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}, {""},
                   {svnauthz__version /* must accept its own option */ } };
 
               subcommand = &pseudo_cmd;
@@ -585,7 +586,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)
             {
               os->ind++;
@@ -658,11 +659,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] == '-')


Reply via email to