[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] : Use /etc/subversion/config and global registry

From: David Kimdon <dwhedon_at_debian.org>
Date: 2002-09-26 02:34:39 CEST

> also slightly wrong: it shouldn't be using any ..._CONFIG_PROXY_PATH, of
> course.
oops, umm, yea . . . /me hides.

Here is an updated patch, fixing the PROXY error discussed above. I
have checked this on unix (behaves as advertised and passes the
testsuite). For the win32 I am following the framework that was layed
out for the proxy config file. It is untested on win32 but it looks
correct.

-David

* subversion/libsvn_subr/config.c (svn_config_read_config) : Look in
  /etc/subversion/config and in SVN_REGISTRY_SYS_CONFIG_CONFIG_PATH
  (on win32) for system wide configuration options.
* subversion/libsvn_subr/config_impl.h : Define
  SVN_REGISTRY_SYS_CONFIG_CONFIG_PATH. This is the location of system
  wide subversion client configuration on win32.

Index: subversion/libsvn_subr/config.c
===================================================================
--- subversion/libsvn_subr/config.c
+++ subversion/libsvn_subr/config.c 2002-09-25 16:58:57.000000000 -0700
@@ -185,20 +185,25 @@
 svn_error_t *
 svn_config_read_config (svn_config_t **cfgp, apr_pool_t *pool)
 {
- const char *usr_reg_path = NULL;
- const char *usr_cfg_path;
+ const char *usr_reg_path = NULL, *sys_reg_path = NULL;
+ const char *usr_cfg_path, *sys_cfg_path;
 
 #ifdef SVN_WIN32
+ sys_reg_path = SVN_REGISTRY_SYS_CONFIG_CONFIG_PATH;
   usr_reg_path = SVN_REGISTRY_USR_CONFIG_CONFIG_PATH;
 #endif /* SVN_WIN32 */
+
+ SVN_ERR (svn_config__sys_config_path (&sys_cfg_path,
+ SVN_CONFIG__USR_CONFIG_FILE,
+ pool));
 
   SVN_ERR (svn_config__user_config_path (&usr_cfg_path,
                                          SVN_CONFIG__USR_CONFIG_FILE,
                                          pool));
 
   SVN_ERR (read_all (cfgp,
- NULL, usr_reg_path,
- NULL, usr_cfg_path,
+ sys_reg_path, usr_reg_path,
+ sys_cfg_path, usr_cfg_path,
                      pool));
 
   return SVN_NO_ERROR;
Index: subversion/libsvn_subr/config_impl.h
===================================================================
--- subversion/libsvn_subr/config_impl.h
+++ subversion/libsvn_subr/config_impl.h 2002-09-25 17:04:51.000000000 -0700
@@ -94,6 +94,11 @@
                                SVN_REGISTRY_PATH \
                                SVN_REGISTRY_CONFIG_PROXY_KEY
 # define SVN_REGISTRY_CONFIG_CONFIG_KEY "Config"
+# define SVN_REGISTRY_SYS_CONFIG_CONFIG_PATH \
+ SVN_REGISTRY_PREFIX \
+ SVN_REGISTRY_HKCM \
+ SVN_REGISTRY_PATH \
+ SVN_REGISTRY_CONFIG_CONFIG_KEY
 # define SVN_REGISTRY_USR_CONFIG_CONFIG_PATH \
                                SVN_REGISTRY_PREFIX \
                                SVN_REGISTRY_HKCU \

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 26 02:29:50 2002

This is an archived mail posted to the Subversion Dev mailing list.