subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1458898 - /subversion/trunk/subversion/svnrdump/svnrdump.c
Date Wed, 20 Mar 2013 15:53:09 GMT
Author: philip
Date: Wed Mar 20 15:53:09 2013
New Revision: 1458898

URL: http://svn.apache.org/r1458898
Log:
Make svnrdump suggest --force-interactive when authn fails in
non-interactive mode.

* subversion/svnrdump/svnrdump.c
  (main): Suggest --force-interactive.

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=1458898&r1=1458897&r2=1458898&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/svnrdump.c (original)
+++ subversion/trunk/subversion/svnrdump/svnrdump.c Wed Mar 20 15:53:09 2013
@@ -1141,21 +1141,32 @@ main(int argc, const char **argv)
                                    config_options,
                                    pool));
 
-  SVNRDUMP_ERR(svn_client_open_ra_session2(&(opt_baton->session),
-                                           opt_baton->url, NULL,
-                                           opt_baton->ctx, pool, pool));
+  err = svn_client_open_ra_session2(&(opt_baton->session),
+                                    opt_baton->url, NULL,
+                                    opt_baton->ctx, pool, pool);
 
   /* Have sane opt_baton->start_revision and end_revision defaults if
      unspecified.  */
-  SVNRDUMP_ERR(svn_ra_get_latest_revnum(opt_baton->session,
-                                        &latest_revision, pool));
+  if (!err)
+    err = svn_ra_get_latest_revnum(opt_baton->session, &latest_revision, pool);
 
   /* Make sure any provided revisions make sense. */
-  SVNRDUMP_ERR(validate_and_resolve_revisions(opt_baton,
-                                              latest_revision, pool));
+  if (!err)
+    err = validate_and_resolve_revisions(opt_baton, latest_revision, pool);
 
   /* Dispatch the subcommand */
-  SVNRDUMP_ERR((*subcommand->cmd_func)(os, opt_baton, pool));
+  if (!err)
+    err = (*subcommand->cmd_func)(os, opt_baton, pool);
+
+  if (err && err->apr_err == SVN_ERR_AUTHN_FAILED && non_interactive)
+    {
+      err = svn_error_quick_wrap(err,
+                                 _("Authentication failed and interactive"
+                                   " prompting is disabled; see the"
+                                   " --force-interactive option"));
+    }
+
+  SVNRDUMP_ERR(err);
 
   svn_pool_destroy(pool);
 



Mime
View raw message