[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 05:26:39 CEST

Wed, Sep 25, 2002 at 05:35:13PM -0700 wrote:
> Quoting David Kimdon <dwhedon@debian.org>:
>
> > +# define SVN_REGISTRY_SYS_CONFIG_CONFIG_PATH \
> > + SVN_REGISTRY_PREFIX \
> > + SVN_REGISTRY_HKCM \
>
> This should be SVN_REGISTRY_HKLM \

cool, thanks for spotting that, one more time, here we go:

* 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, 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 19:57:28.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_HKLM \
+ 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 05:21:56 2002

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.