In the issue tracker, Sam said: ======================================================================= issuing svn --version fails if running under user with non-directory as home directory. The same applies for incorrectly set $HOME variable. There is imho also no reason to create $HOME/.subversion/* entries if executing svn with --version parameter only.
how-to reproduce: $ HOME=/dev/null svn --version svn: Can't open file '/dev/null/.subversion/servers': Not a directory $ HOME=/dev/null svn --version --quiet svn: Can't open file '/dev/null/.subversion/servers': Not a directory $ touch x $ HOME=x svn --version --quiet svn: Can't open file 'x/.subversion/servers': Not a directory ======================================================================= Looking at the code I could see that we are falling back to default configuration if the configuration directory is non-readable. I think we should do the same in the above case also. Attached is the patch for this. Log [[[ * subversion/svn/main.c (main): Fallback to default config if the config directory is non-directory. Update comment to reflect the change. Patch by: Noorul Islam K M <noorul{_AT_}collab.net> ]]] Thanks and Regards Noorul
Index: subversion/svn/main.c =================================================================== --- subversion/svn/main.c (revision 1143254) +++ subversion/svn/main.c (working copy) @@ -2367,8 +2367,9 @@ opt_state.config_dir, pool); if (err) { - /* Fallback to default config if the config directory isn't readable. */ - if (err->apr_err == APR_EACCES) + /* Fallback to default config if the config directory isn't + readable or is non-directory */ + if (err->apr_err == APR_EACCES || APR_STATUS_IS_ENOTDIR(err->apr_err)) { svn_handle_warning2(stderr, err, "svn: "); svn_error_clear(err);