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

Re: default mime types in config request

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-01-17 01:51:18 CET

On Tue, 16 Jan 2007, Karl Fogel wrote:

> On 1/16/07, Daniel Rall <dlr@collab.net> wrote:
> >It'd be even better if Subversion would read more than one
> >configuration file (all in the usual format), and overlay the
> >system-wide configuration with the user-specific configuration file.
>
> Don't we already do that? See doc string for read_all() in
> libsvn_subr/config.c...

Ah ha! Some genius already thought of it!
And so it has been since r1.

However, we don't seem to actually *do* anything with read_all()'s
SYS_FILE_PATH parameter when CONFIG_DIR is provided (passed through
from the command-line client as the value of --config-dir). Instead,
SYS_FILE_PATH is set to NULL. Perhaps we should really be doing
something like the following instead? The downside of this patch is
that we wouldn't be able to tell Subversion *not* to read the system
configuration files.

--- subversion/libsvn_subr/config.c (revision 23052)
+++ subversion/libsvn_subr/config.c (working copy)
@@ -198,20 +198,14 @@
   
   *cfg = NULL;
 
- if (! config_dir)
- {
 #ifdef WIN32
- sys_reg_path = apr_pstrcat(pool, SVN_REGISTRY_SYS_CONFIG_PATH,
- category, NULL);
- usr_reg_path = apr_pstrcat(pool, SVN_REGISTRY_USR_CONFIG_PATH,
- category, NULL);
+ sys_reg_path = apr_pstrcat(pool, SVN_REGISTRY_SYS_CONFIG_PATH,
+ category, NULL);
+ usr_reg_path = apr_pstrcat(pool, SVN_REGISTRY_USR_CONFIG_PATH,
+ category, NULL);
 #endif /* WIN32 */
 
- SVN_ERR(svn_config__sys_config_path(&sys_cfg_path, category, pool));
- }
- else
- sys_cfg_path = NULL;
-
+ SVN_ERR(svn_config__sys_config_path(&sys_cfg_path, category, pool));
   SVN_ERR(svn_config__user_config_path(config_dir, &usr_cfg_path, category,
                                        pool));
   SVN_ERR(read_all(cfg,

  • application/pgp-signature attachment: stored
Received on Wed Jan 17 01:51:29 2007

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