Modified: subversion/branches/addremove/subversion/svn/util.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svn/util.c?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svn/util.c (original)
+++ subversion/branches/addremove/subversion/svn/util.c Sat May 23 14:16:56 2020
@@ -163,6 +163,8 @@ svn_cl__merge_file_externally(const char
     arguments[5] = wc_path;
     arguments[6] = NULL;
 
+    /* Presumably apr_filepath_get() returns a valid path, so we don't have
+       to use the safe version of svn_dirent_internal_style() here. */
     SVN_ERR(svn_io_run_cmd(svn_dirent_internal_style(cwd, pool), merge_tool,
                            arguments, &exitcode, NULL, TRUE, NULL, NULL, NULL,
                            pool));
@@ -614,6 +616,7 @@ svn_cl__try(svn_error_t *err,
               if (! quiet)
                 svn_handle_warning2(stderr, err, "svn: ");
               svn_error_clear(err);
+              va_end(ap);
               return SVN_NO_ERROR;
             }
         }

Modified: subversion/branches/addremove/subversion/svn_private_config.hw
URL: 
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svn_private_config.hw?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svn_private_config.hw (original)
+++ subversion/branches/addremove/subversion/svn_private_config.hw Sat May 23 
14:16:56 2020
@@ -119,7 +119,7 @@
 #define SVN__PREDICT_FALSE(x)  (x)
 
 /* Macro used to specify that a variable is intentionally left unused.
-   Supresses compiler warnings about the variable being unused.  */
+   Suppresses compiler warnings about the variable being unused.  */
 #define SVN_UNUSED(v) ( (void)(v) )
 
 #if defined(_MSC_VER) && _MSC_VER >= 1600

Modified: subversion/branches/addremove/subversion/svnadmin/svnadmin.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svnadmin/svnadmin.c?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/addremove/subversion/svnadmin/svnadmin.c Sat May 23 
14:16:56 2020
@@ -42,6 +42,7 @@
 #include "svn_time.h"
 #include "svn_user.h"
 #include "svn_xml.h"
+#include "svn_fs.h"
 
 #include "private/svn_cmdline_private.h"
 #include "private/svn_opt_private.h"
@@ -49,6 +50,7 @@
 #include "private/svn_subr_private.h"
 #include "private/svn_cmdline_private.h"
 #include "private/svn_fspath.h"
+#include "private/svn_fs_fs_private.h"
 
 #include "svn_private_config.h"
 
@@ -95,6 +97,7 @@ check_lib_versions(void)
 /** Subcommands. **/
 
 static svn_opt_subcommand_t
+  subcommand_build_repcache,
   subcommand_crashtest,
   subcommand_create,
   subcommand_delrevprop,
@@ -114,6 +117,7 @@ static svn_opt_subcommand_t
   subcommand_lstxns,
   subcommand_pack,
   subcommand_recover,
+  subcommand_rev_size,
   subcommand_rmlocks,
   subcommand_rmtxns,
   subcommand_setlog,
@@ -301,47 +305,69 @@ 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"
+  {"build-repcache", subcommand_build_repcache, {0}, {N_(
+    "usage: svnadmin build-repcache REPOS_PATH [-r LOWER[:UPPER]]\n"
+    "\n"), N_(
+    "Add missing entries to the representation cache for the repository\n"
+    "at REPOS_PATH. Process data in revisions LOWER through UPPER.\n"
+    "If no revision arguments are given, process all revisions. If only\n"
+    "LOWER revision argument is given, process only that single revision.\n"
+   )},
+   {'r', 'q', 'M'} },
+
+  {"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,73 +377,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"
-    "               2. svnadmin freeze -F FILE PROGRAM [ARG...]\n\n"
+  {"freeze", subcommand_freeze, {0}, {N_(
+    "usage: 1. svnadmin freeze REPOS_PATH -- PROGRAM [ARG...]\n"
+    "               2. svnadmin freeze -F FILE -- PROGRAM [ARG...]\n"
+    "\n"), N_(
     "1. Run PROGRAM passing ARGS while holding a write-lock on REPOS_PATH.\n"
     "   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"),
+    "   locked in the same order as they are listed in the file.\n"
+    "\n"
+    "The '--' tells svnadmin to stop looking for svnadmin options and pass\n"
+    "all later arguments to PROGRAM even if they begin with '-'.\n"
+   )},
    {'F'},
    {{'F', N_("read repository paths from file ARG")}} },
 
-  {"help", subcommand_help, {"?", "h"}, N_
-   ("usage: svnadmin help [SUBCOMMAND...]\n\n"
-    "Describe the usage of this program or its subcommands.\n"),
+  {"help", subcommand_help, {"?", "h"}, {N_(
+    "usage: svnadmin help [SUBCOMMAND...]\n"
+    "\n"), N_(
+    "Describe the usage of this program or its subcommands.\n"
+   )},
    {0} },
 
-  {"hotcopy", subcommand_hotcopy, {0}, N_
-   ("usage: svnadmin hotcopy REPOS_PATH NEW_REPOS_PATH\n\n"
+  {"hotcopy", subcommand_hotcopy, {0}, {N_(
+    "usage: svnadmin hotcopy REPOS_PATH NEW_REPOS_PATH\n"
+    "\n"), N_(
     "Make a hot copy of a repository.\n"
     "If --incremental is passed, data which already exists at the 
destination\n"
-    "is not copied again.  Incremental mode is implemented for FSFS 
repositories.\n"),
+    "is not copied again.  Incremental mode is implemented for FSFS 
repositories.\n"
+   )},
    {svnadmin__clean_logs, svnadmin__incremental, 'q'} },
 
-  {"info", subcommand_info, {0}, N_
-   ("usage: svnadmin info REPOS_PATH\n\n"
-    "Print information about the repository at REPOS_PATH.\n"),
+  {"info", subcommand_info, {0}, {N_(
+    "usage: svnadmin info REPOS_PATH\n"
+    "\n"), N_(
+    "Print information about the repository at REPOS_PATH.\n"
+   )},
    {0} },
 
-  {"list-dblogs", subcommand_list_dblogs, {0}, N_
-   ("usage: svnadmin list-dblogs REPOS_PATH\n\n"
-    "List all Berkeley DB log files.\n\n"
+  {"list-dblogs", subcommand_list_dblogs, {0}, {N_(
+    "usage: svnadmin list-dblogs REPOS_PATH\n"
+    "\n"), N_(
+    "List all Berkeley DB log files.\n"
+    "\n"), N_(
     "WARNING: Modifying or deleting logfiles which are still in use\n"
-    "will cause your repository to be corrupted.\n"),
+    "will cause your repository to be corrupted.\n"
+   )},
    {0} },
 
-  {"list-unused-dblogs", subcommand_list_unused_dblogs, {0}, N_
-   ("usage: svnadmin list-unused-dblogs REPOS_PATH\n\n"
-    "List unused Berkeley DB log files.\n\n"),
+  {"list-unused-dblogs", subcommand_list_unused_dblogs, {0}, {N_(
+    "usage: svnadmin list-unused-dblogs REPOS_PATH\n"
+    "\n"), N_(
+    "List unused Berkeley DB log files.\n"
+   )},
    {0} },
 
-  {"load", subcommand_load, {0}, N_
-   ("usage: svnadmin load REPOS_PATH\n\n"
+  {"load", subcommand_load, {0}, {N_(
+    "usage: svnadmin load REPOS_PATH\n"
+    "\n"), N_(
     "Read a 'dumpfile'-formatted stream from stdin, committing\n"
     "new revisions into the repository's filesystem.  If the repository\n"
     "was previously empty, its UUID will, by default, be changed to the\n"
     "one specified in the stream.  Progress feedback is sent to stdout.\n"
     "If --revision is specified, limit the loaded revisions to only those\n"
-    "in the dump stream whose revision numbers match the specified range.\n"),
+    "in the dump stream whose revision numbers match the specified range.\n"
+   )},
    {'q', 'r', svnadmin__ignore_uuid, svnadmin__force_uuid,
     svnadmin__ignore_dates,
     svnadmin__use_pre_commit_hook, svnadmin__use_post_commit_hook,
@@ -426,122 +473,166 @@ 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"),
+    "abandoned 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"),
+  {"rev-size", subcommand_rev_size, {0}, {N_(
+    "usage: svnadmin rev-size REPOS_PATH -r REVISION\n"
+    "\n"), N_(
+    "Print the total size in bytes of the representation on disk of\n"
+    "revision REVISION.\n"
+    "\n"), N_(
+    "The size includes revision properties and excludes FSFS indexes.\n"
+   )},
+   {'r', 'q', 'M'},
+   { {'q', "print only the size and a newline"} } },
+
+  {"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} }
 };
 
 
@@ -1540,7 +1631,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,
@@ -1646,8 +1737,8 @@ subcommand_load(apr_getopt_t *os, void *
                            opt_state->use_pre_commit_hook,
                            opt_state->use_post_commit_hook,
                            !opt_state->bypass_prop_validation,
-                           opt_state->normalize_props,
                            opt_state->ignore_dates,
+                           opt_state->normalize_props,
                            opt_state->quiet ? NULL : repos_notify_handler,
                            feedback_stream, check_cancel, NULL, pool);
 
@@ -1703,8 +1794,8 @@ subcommand_load_revprops(apr_getopt_t *o
 
   err = svn_repos_load_fs_revprops(repos, in_stream, lower, upper,
                                    !opt_state->bypass_prop_validation,
-                                   opt_state->normalize_props,
                                    opt_state->ignore_dates,
+                                   opt_state->normalize_props,
                                    opt_state->quiet ? NULL
                                                     : repos_notify_handler,
                                    feedback_stream, check_cancel, NULL, pool);
@@ -1753,7 +1844,7 @@ subcommand_lstxns(apr_getopt_t *os, void
   SVN_ERR(svn_fs_youngest_rev(&youngest, fs, pool));
   SVN_ERR(get_revnum(&limit, &opt_state->start_revision, youngest, repos,
                      pool));
-  
+
   iterpool = svn_pool_create(pool);
   for (i = 0; i < txns->nelts; i++)
     {
@@ -2191,15 +2282,16 @@ subcommand_verify(apr_getopt_t *os, void
                                check_cancel, NULL, pool));
 
   /* Show the --keep-going error summary. */
-  if (!opt_state->quiet
-      && opt_state->keep_going
-      && verify_baton.error_summary->nelts > 0)
+  if (opt_state->keep_going && verify_baton.error_summary->nelts > 0)
     {
       int rev_maxlength;
       svn_revnum_t end_revnum;
       apr_pool_t *iterpool;
       int i;
 
+      if (feedback_stream == NULL) /* happens when we are in --quiet mode */
+        feedback_stream = recode_stream_create(stdout, pool);
+
       svn_error_clear(
         svn_stream_puts(feedback_stream,
                           _("\n-----Summary of corrupt revisions-----\n")));
@@ -2780,6 +2872,169 @@ subcommand_delrevprop(apr_getopt_t *os,
 }
 
 
+/* Set *REV_SIZE to the total size in bytes of the representation on disk
+ * of revision REVISION in FS.
+ *
+ * This is implemented only for FSFS repositories, and otherwise returns
+ * an SVN_ERR_UNSUPPORTED_FEATURE error.
+ *
+ * The size includes revision properties and excludes FSFS indexes.
+ */
+static svn_error_t *
+revision_size(apr_off_t *rev_size,
+              svn_fs_t *fs,
+              svn_revnum_t revision,
+              apr_pool_t *scratch_pool)
+{
+  svn_error_t *err;
+  svn_fs_fs__ioctl_revision_size_input_t input = {0};
+  svn_fs_fs__ioctl_revision_size_output_t *output;
+
+  input.revision = revision;
+  err = svn_fs_ioctl(fs, SVN_FS_FS__IOCTL_REVISION_SIZE,
+                     &input, (void **)&output,
+                     check_cancel, NULL, scratch_pool, scratch_pool);
+  if (err && err->apr_err == SVN_ERR_FS_UNRECOGNIZED_IOCTL_CODE)
+    {
+      return svn_error_quick_wrapf(err,
+                                   _("Revision size query is not implemented "
+                                     "for the filesystem type found in '%s'"),
+                                   svn_fs_path(fs, scratch_pool));
+    }
+  SVN_ERR(err);
+
+  *rev_size = output->rev_size;
+  return SVN_NO_ERROR;
+}
+
+/* This implements `svn_opt_subcommand_t'. */
+svn_error_t *
+subcommand_rev_size(apr_getopt_t *os, void *baton, apr_pool_t *pool)
+{
+  struct svnadmin_opt_state *opt_state = baton;
+  svn_revnum_t revision;
+  apr_off_t rev_size;
+  svn_repos_t *repos;
+
+  if (opt_state->start_revision.kind != svn_opt_revision_number
+      || opt_state->end_revision.kind != svn_opt_revision_unspecified)
+    return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                            _("Invalid revision specifier"));
+  revision = opt_state->start_revision.value.number;
+
+  SVN_ERR(open_repos(&repos, opt_state->repository_path, opt_state, pool));
+  SVN_ERR(revision_size(&rev_size, svn_repos_fs(repos), revision, pool));
+
+  if (opt_state->quiet)
+    SVN_ERR(svn_cmdline_printf(pool, "%"APR_OFF_T_FMT"\n", rev_size));
+  else
+    SVN_ERR(svn_cmdline_printf(pool, _("%12"APR_OFF_T_FMT" bytes in revision 
%ld\n"),
+                               rev_size, revision));
+
+  return SVN_NO_ERROR;
+}
+
+static void
+build_rep_cache_progress_func(svn_revnum_t revision,
+                              void *baton,
+                              apr_pool_t *pool)
+{
+  svn_error_clear(svn_cmdline_printf(pool,
+                                     _("* Processed revision %ld.\n"),
+                                     revision));
+}
+
+static svn_error_t *
+build_rep_cache(svn_fs_t *fs,
+                svn_revnum_t start_rev,
+                svn_revnum_t end_rev,
+                struct svnadmin_opt_state *opt_state,
+                apr_pool_t *pool)
+{
+  svn_fs_fs__ioctl_build_rep_cache_input_t input = {0};
+  svn_error_t *err;
+
+  input.start_rev = start_rev;
+  input.end_rev = end_rev;
+
+  if (opt_state->quiet)
+    {
+      input.progress_func = NULL;
+      input.progress_baton = NULL;
+    }
+  else
+    {
+      input.progress_func = build_rep_cache_progress_func;
+      input.progress_baton = NULL;
+    }
+
+  err = svn_fs_ioctl(fs, SVN_FS_FS__IOCTL_BUILD_REP_CACHE,
+                     &input, NULL,
+                     check_cancel, NULL, pool, pool);
+  if (err && err->apr_err == SVN_ERR_FS_UNRECOGNIZED_IOCTL_CODE)
+    {
+      return svn_error_quick_wrapf(err,
+                                   _("Building rep-cache is not implemented "
+                                     "for the filesystem type found in '%s'"),
+                                   svn_fs_path(fs, pool));
+    }
+  else if (err && err->apr_err == SVN_ERR_FS_REP_SHARING_NOT_ALLOWED)
+    {
+      svn_error_clear(err);
+      SVN_ERR(svn_cmdline_printf(pool,
+                                 _("svnadmin: Warning - this repository has 
rep-sharing disabled."
+                                   " Building rep-cache has no effect.\n")));
+      return SVN_NO_ERROR;
+    }
+  else
+    {
+      return err;
+    }
+}
+
+/* This implements `svn_opt_subcommand_t'. */
+static svn_error_t *
+subcommand_build_repcache(apr_getopt_t *os, void *baton, apr_pool_t *pool)
+{
+  struct svnadmin_opt_state *opt_state = baton;
+  svn_repos_t *repos;
+  svn_fs_t *fs;
+  svn_revnum_t youngest;
+  svn_revnum_t lower;
+  svn_revnum_t upper;
+
+  /* Expect no more arguments. */
+  SVN_ERR(parse_args(NULL, os, 0, 0, pool));
+
+  SVN_ERR(open_repos(&repos, opt_state->repository_path, opt_state, pool));
+  fs = svn_repos_fs(repos);
+  SVN_ERR(svn_fs_youngest_rev(&youngest, fs, pool));
+
+  SVN_ERR(get_revnum(&lower, &opt_state->start_revision,
+                     youngest, repos, pool));
+  SVN_ERR(get_revnum(&upper, &opt_state->end_revision,
+                     youngest, repos, pool));
+
+  if (SVN_IS_VALID_REVNUM(lower) && SVN_IS_VALID_REVNUM(upper))
+    {
+      if (lower > upper)
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                _("First revision cannot be higher than 
second"));
+    }
+  else if (SVN_IS_VALID_REVNUM(lower))
+    {
+      upper = lower;
+    }
+  else
+    {
+      upper = youngest;
+    }
+
+  SVN_ERR(build_rep_cache(fs, lower, upper, opt_state, pool));
+
+  return SVN_NO_ERROR;
+}
+
 
 /** Main. **/
 
@@ -2794,7 +3049,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;
@@ -3049,7 +3304,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. */
@@ -3060,8 +3315,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 */
                   } };
@@ -3083,7 +3338,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(
@@ -3135,11 +3390,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/addremove/subversion/svnbench/cl.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svnbench/cl.h?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svnbench/cl.h (original)
+++ subversion/branches/addremove/subversion/svnbench/cl.h Sat May 23 14:16:56 
2020
@@ -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/addremove/subversion/svnbench/help-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svnbench/help-cmd.c?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svnbench/help-cmd.c (original)
+++ subversion/branches/addremove/subversion/svnbench/help-cmd.c Sat May 23 
14:16:56 2020
@@ -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/addremove/subversion/svnbench/null-blame-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svnbench/null-blame-cmd.c?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svnbench/null-blame-cmd.c 
(original)
+++ subversion/branches/addremove/subversion/svnbench/null-blame-cmd.c Sat May 
23 14:16:56 2020
@@ -58,7 +58,7 @@ delta_handler(svn_txdelta_window_t *wind
   return SVN_NO_ERROR;
 }
 
-/* Implementes svn_file_rev_handler_t */
+/* Implements svn_file_rev_handler_t */
 static svn_error_t *
 file_rev_handler(void *baton, const char *path, svn_revnum_t revnum,
                  apr_hash_t *rev_props,

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

Modified: subversion/branches/addremove/subversion/svndumpfilter/svndumpfilter.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svndumpfilter/svndumpfilter.c?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svndumpfilter/svndumpfilter.c 
(original)
+++ subversion/branches/addremove/subversion/svndumpfilter/svndumpfilter.c Sat 
May 23 14:16:56 2020
@@ -43,6 +43,7 @@
 #include "svn_mergeinfo.h"
 #include "svn_version.h"
 
+#include "private/svn_dirent_uri_private.h"
 #include "private/svn_repos_private.h"
 #include "private/svn_mergeinfo_private.h"
 #include "private/svn_cmdline_private.h"
@@ -271,9 +272,7 @@ magic_header_record(int version, void *p
   if (version >= SVN_REPOS_DUMPFILE_FORMAT_VERSION_DELTAS)
     pb->allow_deltas = TRUE;
 
-  SVN_ERR(svn_stream_printf(pb->out_stream, pool,
-                            SVN_REPOS_DUMPFILE_MAGIC_HEADER ": %d\n\n",
-                            version));
+  SVN_ERR(svn_repos__dump_magic_header_record(pb->out_stream, version, pool));
 
   return SVN_NO_ERROR;
 }
@@ -446,8 +445,8 @@ static svn_error_t *
 uuid_record(const char *uuid, void *parse_baton, apr_pool_t *pool)
 {
   struct parse_baton_t *pb = parse_baton;
-  SVN_ERR(svn_stream_printf(pb->out_stream, pool,
-                            SVN_REPOS_DUMPFILE_UUID ": %s\n\n", uuid));
+
+  SVN_ERR(svn_repos__dump_uuid_header_record(pb->out_stream, uuid, pool));
   return SVN_NO_ERROR;
 }
 
@@ -530,7 +529,8 @@ new_node_record(void **node_baton,
             {
               return svn_error_createf
                 (SVN_ERR_INCOMPLETE_DATA, 0,
-                 _("Invalid copy source path '%s'"), copyfrom_path);
+                 _("Invalid copy source path '%s' for '%s'"),
+                 copyfrom_path, node_path);
             }
         }
 
@@ -611,7 +611,8 @@ new_node_record(void **node_baton,
               if (! (cf_renum_val && SVN_IS_VALID_REVNUM(cf_renum_val->rev)))
                 return svn_error_createf
                   (SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
-                   _("No valid copyfrom revision in filtered stream"));
+                   _("No valid copyfrom revision in filtered stream for '%s'"),
+                   node_path);
               svn_repos__dumpfile_header_pushf(
                 nb->headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV,
                 "%ld", cf_renum_val->rev);
@@ -977,32 +978,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 +1084,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 +1296,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 +1403,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 +1414,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 +1438,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(
@@ -1464,7 +1468,7 @@ sub_main(int *exit_code, int argc, const
           /* Ensure that each prefix is UTF8-encoded, in internal
              style, and absolute. */
           SVN_ERR(svn_utf_cstring_to_utf8(&prefix, os->argv[i], pool));
-          prefix = svn_relpath__internal_style(prefix, pool);
+          SVN_ERR(svn_relpath__make_internal(&prefix, prefix, pool, pool));
           if (prefix[0] != '/')
             prefix = apr_pstrcat(pool, "/", prefix, SVN_VA_NULL);
           APR_ARRAY_PUSH(opt_state.prefixes, const char *) = prefix;
@@ -1520,11 +1524,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] == '-')

Propchange: subversion/branches/addremove/subversion/svnfsfs/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat May 23 14:16:56 2020
@@ -1 +1,2 @@
 svnfsfs
+.libs

Modified: subversion/branches/addremove/subversion/svnfsfs/dump-index-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svnfsfs/dump-index-cmd.c?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svnfsfs/dump-index-cmd.c (original)
+++ subversion/branches/addremove/subversion/svnfsfs/dump-index-cmd.c Sat May 
23 14:16:56 2020
@@ -79,6 +79,7 @@ dump_index(const char *path,
            apr_pool_t *pool)
 {
   svn_fs_t *fs;
+  svn_fs_fs__ioctl_dump_index_input_t input = {0};
 
   /* Check repository type and open it. */
   SVN_ERR(open_fs(&fs, path, pool));
@@ -87,8 +88,10 @@ dump_index(const char *path,
   printf("       Start       Length Type   Revision     Item Checksum\n");
 
   /* Dump the whole index contents */
-  SVN_ERR(svn_fs_fs__dump_index(fs, revision, dump_index_entry, NULL,
-                                check_cancel, NULL, pool));
+  input.revision = revision;
+  input.callback_func = dump_index_entry;
+  SVN_ERR(svn_fs_ioctl(fs, SVN_FS_FS__IOCTL_DUMP_INDEX, &input, NULL,
+                       check_cancel, NULL, pool, pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/addremove/subversion/svnfsfs/load-index-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svnfsfs/load-index-cmd.c?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svnfsfs/load-index-cmd.c (original)
+++ subversion/branches/addremove/subversion/svnfsfs/load-index-cmd.c Sat May 
23 14:16:56 2020
@@ -109,7 +109,7 @@ parse_index_line(svn_fs_fs__p2l_entry_t
   SVN_ERR(token_to_i64(&value, tokens, 1, 16));
   result->size = (apr_off_t)value;
 
-  /* Parse the rightmost colum that we care of. */
+  /* Parse the rightmost column that we care of. */
   SVN_ERR(token_to_i64(&value, tokens, 4, 10));
   result->item.number = (apr_uint64_t)value;
 
@@ -135,6 +135,7 @@ load_index(const char *path,
   svn_revnum_t revision = SVN_INVALID_REVNUM;
   apr_array_header_t *entries = apr_array_make(pool, 16, sizeof(void*));
   apr_pool_t *iterpool = svn_pool_create(pool);
+  svn_fs_fs__ioctl_load_index_input_t ioctl_input = {0};
 
   /* Check repository type and open it. */
   SVN_ERR(open_fs(&fs, path, pool));
@@ -147,7 +148,7 @@ load_index(const char *path,
 
       /* Get the next line from the input and stop if there is none. */
       svn_pool_clear(iterpool);
-      svn_stream_readline(input, &line, "\n", &eol, iterpool);
+      SVN_ERR(svn_stream_readline(input, &line, "\n", &eol, iterpool));
       if (eol)
         break;
 
@@ -173,7 +174,10 @@ load_index(const char *path,
     }
 
   /* Rewrite the indexes. */
-  SVN_ERR(svn_fs_fs__load_index(fs, revision, entries, iterpool));
+  ioctl_input.revision = revision;
+  ioctl_input.entries = entries;
+  SVN_ERR(svn_fs_ioctl(fs, SVN_FS_FS__IOCTL_LOAD_INDEX, &ioctl_input, NULL,
+                       NULL, NULL, pool, pool));
   svn_pool_destroy(iterpool);
 
   return SVN_NO_ERROR;

Modified: subversion/branches/addremove/subversion/svnfsfs/stats-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svnfsfs/stats-cmd.c?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svnfsfs/stats-cmd.c (original)
+++ subversion/branches/addremove/subversion/svnfsfs/stats-cmd.c Sat May 23 
14:16:56 2020
@@ -500,15 +500,17 @@ svn_error_t *
 subcommand__stats(apr_getopt_t *os, void *baton, apr_pool_t *pool)
 {
   svnfsfs__opt_state *opt_state = baton;
-  svn_fs_fs__stats_t *stats;
   svn_fs_t *fs;
+  svn_fs_fs__ioctl_get_stats_input_t input = {0};
+  svn_fs_fs__ioctl_get_stats_output_t *output;
 
   printf("Reading revisions\n");
   SVN_ERR(open_fs(&fs, opt_state->repository_path, pool));
-  SVN_ERR(svn_fs_fs__get_stats(&stats, fs, print_progress, NULL,
-                               check_cancel, NULL, pool, pool));
 
-  print_stats(stats, pool);
+  input.progress_func = print_progress;
+  SVN_ERR(svn_fs_ioctl(fs, SVN_FS_FS__IOCTL_GET_STATS, &input, (void 
**)&output,
+                       check_cancel, NULL, pool, pool));
+  print_stats(output->stats, pool);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/addremove/subversion/svnfsfs/svnfsfs.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svnfsfs/svnfsfs.c?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svnfsfs/svnfsfs.c (original)
+++ subversion/branches/addremove/subversion/svnfsfs/svnfsfs.c Sat May 23 
14:16:56 2020
@@ -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/addremove/subversion/svnlook/svnlook.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svnlook/svnlook.c?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svnlook/svnlook.c (original)
+++ subversion/branches/addremove/subversion/svnlook/svnlook.c Sat May 23 
14:16:56 2020
@@ -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} }
 };
 
 
@@ -1289,7 +1323,7 @@ do_log(svnlook_ctxt_t *c, svn_boolean_t
       return SVN_NO_ERROR;
     }
 
-  /* We immitate what svn_cmdline_printf does here, since we need the byte
+  /* We imitate what svn_cmdline_printf does here, since we need the byte
      size of what we are going to print. */
 
   SVN_ERR(svn_subst_translate_cstring2(prop_value->data, &prop_value_eol,
@@ -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/addremove/subversion/svnmucc/svnmucc.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svnmucc/svnmucc.c?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/addremove/subversion/svnmucc/svnmucc.c Sat May 23 
14:16:56 2020
@@ -297,6 +297,7 @@ help(FILE *stream, apr_pool_t *pool)
       "  -F [--file] ARG        : read log message from file ARG\n"
       "  -u [--username] ARG    : commit the changes as username ARG\n"
       "  -p [--password] ARG    : use ARG as the password\n"
+      "  --password-from-stdin  : read password from stdin\n"
       "  -U [--root-url] ARG    : interpret all action URLs relative to ARG\n"
       "  -r [--revision] ARG    : use revision ARG as baseline for changes\n"
       "  --with-revprop ARG     : set revision property in the following 
format:\n"
@@ -341,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));
 
@@ -480,13 +481,15 @@ sub_main(int *exit_code, int argc, const
     non_interactive_opt,
     force_interactive_opt,
     trust_server_cert_opt,
-    trust_server_cert_failures_opt
+    trust_server_cert_failures_opt,
+    password_from_stdin_opt
   };
   static const apr_getopt_option_t options[] = {
     {"message", 'm', 1, ""},
     {"file", 'F', 1, ""},
     {"username", 'u', 1, ""},
     {"password", 'p', 1, ""},
+    {"password-from-stdin", password_from_stdin_opt, 0, ""},
     {"root-url", 'U', 1, ""},
     {"revision", 'r', 1, ""},
     {"with-revprop",  with_revprop_opt, 1, ""},
@@ -527,6 +530,7 @@ sub_main(int *exit_code, int argc, const
   svn_client_ctx_t *ctx;
   struct log_message_baton lmb;
   int i;
+  svn_boolean_t read_pass_from_stdin = FALSE;
 
   /* Check library versions */
   SVN_ERR(check_lib_versions());
@@ -572,6 +576,9 @@ sub_main(int *exit_code, int argc, const
         case 'p':
           password = apr_pstrdup(pool, arg);
           break;
+        case password_from_stdin_opt:
+          read_pass_from_stdin = TRUE;
+          break;
         case 'U':
           SVN_ERR(svn_utf_cstring_to_utf8(&root_url, arg, pool));
           if (! svn_path_is_url(root_url))
@@ -625,7 +632,7 @@ sub_main(int *exit_code, int argc, const
         case config_inline_opt:
           SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, arg, pool));
           SVN_ERR(svn_cmdline__parse_config_option(config_options, opt_arg,
-                                                   "svnmucc: ", 
+                                                   "svnmucc: ",
                                                    pool));
           break;
         case no_auth_cache_opt:
@@ -672,6 +679,15 @@ sub_main(int *exit_code, int argc, const
                                   "--non-interactive"));
     }
 
+  /* --password-from-stdin can only be used with --non-interactive */
+  if (read_pass_from_stdin && !non_interactive)
+    {
+      return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                              _("--password-from-stdin requires "
+                                "--non-interactive"));
+    }
+
+
   /* Copy the rest of our command-line arguments to an array,
      UTF-8-ing them along the way. */
   action_args = apr_array_make(pool, opts->argc, sizeof(const char *));
@@ -721,6 +737,12 @@ sub_main(int *exit_code, int argc, const
                                             "svnmucc: ", "--config-option"));
     }
 
+  /* Get password from stdin if necessary */
+  if (read_pass_from_stdin)
+    {
+      SVN_ERR(svn_cmdline__stdin_readline(&password, pool, pool));
+    }
+
   SVN_ERR(svn_client_create_context2(&ctx, cfg_hash, pool));
 
   cfg_config = svn_hash_gets(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG);


Reply via email to