[prev in list] [next in list] [prev in thread] [next in thread]
List: subversion-commits
Subject: svn commit: r1307479 - in /subversion/trunk/subversion: libsvn_repos/hooks.c mod_dav_svn/mod_dav_svn
From: danielsh () apache ! org
Date: 2012-03-30 15:42:16
Message-ID: 20120330154216.6A5B62388993 () eris ! apache ! org
[Download RAW message or body]
Author: danielsh
Date: Fri Mar 30 15:42:15 2012
New Revision: 1307479
URL: http://svn.apache.org/viewvc?rev=1307479&view=rev
Log:
SVNHooksEnv: default to a NULL, rather than empty, hash.
This has two consequences:
- INHERIT_VALUE() will correctly use the parent's SVNHooksEnv setting when a
child has no SVNHooksEnv configured
- On Windows, configurations that don't use SVNHooksEnv will pass a NULL
environment to APR. Therefore r1292246 (the revert of r1240999) is
reverted too.
* subversion/mod_dav_svn/mod_dav_svn.c
(create_dir_config): Initialize HOOKS_ENV to NULL.
(SVNHooksEnv_cmd): Allocate HOOKS_ENV if necessary.
(The choice of pool is modelled after the precedent in SVNReposName_cmd().)
* subversion/libsvn_repos/hooks.c
(env_from_env_hash): Return an empty array on an empty hash.
Modified:
subversion/trunk/subversion/libsvn_repos/hooks.c
subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c
Modified: subversion/trunk/subversion/libsvn_repos/hooks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/hooks.c?rev=1307479&r1=1307478&r2=1307479&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/hooks.c (original)
+++ subversion/trunk/subversion/libsvn_repos/hooks.c Fri Mar 30 15:42:15 2012
@@ -172,7 +172,7 @@ env_from_env_hash(apr_hash_t *env_hash,
const char **env;
const char **envp;
- if (!env_hash || apr_hash_count(env_hash) == 0)
+ if (!env_hash)
return NULL;
env = apr_palloc(result_pool,
Modified: subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c?rev=1307479&r1=1307478&r2=1307479&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c Fri Mar 30 15:42:15 2012
@@ -195,7 +195,7 @@ create_dir_config(apr_pool_t *p, char *d
conf->root_dir = svn_urlpath__canonicalize(dir, p);
conf->bulk_updates = CONF_FLAG_ON;
conf->v2_protocol = CONF_FLAG_ON;
- conf->hooks_env = apr_hash_make(p);
+ conf->hooks_env = NULL;
return conf;
}
@@ -544,6 +544,9 @@ SVNHooksEnv_cmd(cmd_parms *cmd, void *co
const char *name;
const char *val;
+ if (! conf->hooks_env)
+ conf->hooks_env = apr_hash_make(cmd->pool);
+
name = apr_pstrdup(apr_hash_pool_get(conf->hooks_env),
APR_ARRAY_IDX(var, 0, const char *));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic