Index: subversion/libsvn_subr/config_file.c
===================================================================
--- subversion/libsvn_subr/config_file.c	(revision 32393)
+++ subversion/libsvn_subr/config_file.c	(working copy)
@@ -767,6 +767,7 @@
         "###                              (passwords as well as server certs)"
                                                                              NL
         "###                              may be cached to disk."            NL
+        "###   username                   Specifies the default username."   NL
         "###"                                                                NL
         "### Set store-passwords to 'no' to avoid storing passwords in the"  NL
         "### auth/ area of your config directory.  It defaults to 'yes',"    NL
@@ -843,6 +844,7 @@
 #endif
         "# neon-debug-mask = 130"                                            NL
         "# store-plaintext-passwords = no"                                   NL
+        "# username = harry"                                                 NL
         ""                                                                   NL
         "### Information for the second group:"                              NL
         "# [othergroup]"                                                     NL
Index: subversion/libsvn_subr/simple_providers.c
===================================================================
--- subversion/libsvn_subr/simple_providers.c	(revision 32393)
+++ subversion/libsvn_subr/simple_providers.c	(working copy)
@@ -113,6 +113,12 @@
   const char *config_dir = apr_hash_get(parameters,
                                         SVN_AUTH_PARAM_CONFIG_DIR,
                                         APR_HASH_KEY_STRING);
+  svn_config_t *cfg = apr_hash_get(parameters,
+                                   SVN_AUTH_PARAM_CONFIG,
+                                   APR_HASH_KEY_STRING);
+  const char *server_group = apr_hash_get(parameters,
+                                          SVN_AUTH_PARAM_SERVER_GROUP,
+                                          APR_HASH_KEY_STRING);
   const char *username = apr_hash_get(parameters,
                                       SVN_AUTH_PARAM_DEFAULT_USERNAME,
                                       APR_HASH_KEY_STRING);
@@ -178,6 +184,14 @@
         }
     }
 
+  /* If we don't have a username yet, check the 'servers' file */
+  if (! username)
+    {
+      username = svn_config_get_server_setting(cfg, server_group,
+                                               SVN_CONFIG_OPTION_USERNAME,
+                                               NULL);
+    }
+
   /* Ask the OS for the username if we have a password but no
      username. */
   if (password && ! username)
@@ -522,6 +536,21 @@
             }
         }
 
+      /* Still no default username?  Try the 'servers' file. */
+      if (! def_username)
+        {
+          svn_config_t *cfg = apr_hash_get(parameters,
+                                           SVN_AUTH_PARAM_CONFIG,
+                                           APR_HASH_KEY_STRING);
+          const char *server_group = apr_hash_get(parameters,
+                                                  SVN_AUTH_PARAM_SERVER_GROUP,
+                                                  APR_HASH_KEY_STRING);
+          def_username =
+            svn_config_get_server_setting(cfg, server_group,
+                                          SVN_CONFIG_OPTION_USERNAME,
+                                          NULL);
+        }
+
       /* Still no default username?  Try the UID. */
       if (! def_username)
         def_username = svn_user_get_name(pool);
Index: subversion/include/svn_config.h
===================================================================
--- subversion/include/svn_config.h	(revision 32393)
+++ subversion/include/svn_config.h	(working copy)
@@ -80,6 +80,7 @@
 #define SVN_CONFIG_OPTION_STORE_SSL_CLIENT_CERT_PP  "store-ssl-client-cert-pp"
 #define SVN_CONFIG_OPTION_STORE_SSL_CLIENT_CERT_PP_PLAINTEXT \
                                           "store-ssl-client-cert-pp-plaintext"
+#define SVN_CONFIG_OPTION_USERNAME                  "username"
 
 #define SVN_CONFIG_CATEGORY_CONFIG          "config"
 #define SVN_CONFIG_SECTION_AUTH                 "auth"


