You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/03/13 12:20:44 UTC

svn commit: r922533 - /subversion/trunk/subversion/libsvn_ra_svn/client.c

Author: stsp
Date: Sat Mar 13 11:20:44 2010
New Revision: 922533

URL: http://svn.apache.org/viewvc?rev=922533&view=rev
Log:
Follow-up to r922516:

* subversion/libsvn_ra_svn/client.c
  (make_tunnel): Include default path to config file in the error message
   explaining how to more easily debug SSH connection problems. While at it,
   try improving the error message by adding more information.

Suggested by: danielsh
(the config file path bit)

Modified:
    subversion/trunk/subversion/libsvn_ra_svn/client.c

Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/client.c?rev=922533&r1=922532&r2=922533&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/client.c Sat Mar 13 11:20:44 2010
@@ -519,12 +519,28 @@ static svn_error_t *make_tunnel(const ch
   *conn = svn_ra_svn_create_conn(NULL, proc->out, proc->in, pool);
   err = svn_ra_svn_skip_leading_garbage(*conn, pool);
   if (err)
-    return svn_error_quick_wrap(
-             err,
-             _("To better debug SSH connection problems, remove the -q "
-               "option from 'ssh' in the [tunnels] section of your "
-               "Subversion configuration file."));
+    {
+      svn_error_t *err2;
+      const char *config_path;
 
+      err2 = svn_config_get_user_config_path(&config_path, NULL,
+                                             SVN_CONFIG_CATEGORY_CONFIG, pool);
+      if (err2)
+        return svn_error_compose_create(err, err2);
+      else
+        {
+          const char *msg;
+          msg = apr_psprintf(
+                  pool,
+                  _("Subversion runs SSH with the -q option by default. "
+                    "This may suppress some SSH error messages. "
+                    "To better debug SSH connection problems, set "
+                    "'ssh = $SVN_SSH ssh' (without a -q option) "
+                    "in the [tunnels] section of %s"),
+                  config_path);
+          return svn_error_quick_wrap(err, msg);
+        }
+    }
   return SVN_NO_ERROR;
 }