Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 55DCBF636 for ; Sat, 13 Apr 2013 10:39:18 +0000 (UTC) Received: (qmail 59714 invoked by uid 500); 13 Apr 2013 10:39:18 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 59596 invoked by uid 500); 13 Apr 2013 10:39:17 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 59561 invoked by uid 99); 13 Apr 2013 10:39:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Apr 2013 10:39:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Apr 2013 10:39:14 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1EAFB23889ED; Sat, 13 Apr 2013 10:38:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1467587 - /subversion/trunk/subversion/svnrdump/svnrdump.c Date: Sat, 13 Apr 2013 10:38:53 -0000 To: commits@subversion.apache.org From: stsp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130413103853.1EAFB23889ED@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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,