Author: stsp
Date: Sat Apr 13 10:38:52 2013
New Revision: 1467587
URL: http://svn.apache.org/r1467587
Log:
For issue #3913, make 'svnrdump load' interactive by default if none of
the --*-interactive options were given, and if no username and password
were provided on the command line.
Allows 'svnrdump load' authentication to work without requiring users to
type --force-interactive.
* subversion/svnrdump/svnrdump.c
(main): Delay determination of non_interactive's value until information
about the subcommand is available. Set force_interactive under the
conditions described above.
Modified:
subversion/trunk/subversion/svnrdump/svnrdump.c
Modified: subversion/trunk/subversion/svnrdump/svnrdump.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/svnrdump.c?rev=1467587&r1=1467586&r2=1467587&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/svnrdump.c (original)
+++ subversion/trunk/subversion/svnrdump/svnrdump.c Sat Apr 13 10:38:52 2013
@@ -994,9 +994,6 @@ main(int argc, const char **argv)
"are mutually exclusive"));
return svn_cmdline_handle_exit_error(err, pool, "svnrdump: ");
}
- else
- non_interactive = !svn_cmdline__be_interactive(non_interactive,
- force_interactive);
if (opt_baton->help)
{
@@ -1128,6 +1125,22 @@ main(int argc, const char **argv)
opt_baton->url = svn_uri_canonicalize(repos_url, pool);
}
+ if (strcmp(subcommand->name, "load") == 0)
+ {
+ /*
+ * By default (no --*-interactive options given), the 'load' subcommand
+ * is interactive unless username and password were provided on the
+ * command line. This allows prompting for auth creds to work without
+ * requiring users to remember to use --force-interactive.
+ * See issue #3913, "svnrdump load is not working in interactive mode".
+ */
+ if (!non_interactive && !force_interactive)
+ force_interactive = (username == NULL || password == NULL);
+ }
+
+ non_interactive = !svn_cmdline__be_interactive(non_interactive,
+ force_interactive);
+
SVNRDUMP_ERR(init_client_context(&(opt_baton->ctx),
non_interactive,
username,