subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Sperling <s...@elego.de>
Subject Re: svnserve not reading hooks-env?
Date Thu, 10 Nov 2016 16:40:10 GMT
On Thu, Nov 10, 2016 at 02:56:26PM +0000, Steven Simpson wrote:
> I'm starting to think that hooks-env with svnserve is a documented
> unfeature.  ;-)  I don't see it in the 1.7 docs, but it is in 1.8:
> 
> <http://svnbook.red-bean.com/en/1.8/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.ref.general>
> 
> I think I will have to do it the old-fashioned way.
> 
> Cheers!
> 

This looks like a bug where svnserve forgets about applying
a hook environment config after opening the repository.
So hooks always run in an empty environment with svnserve.

Ooops. I'm amazed it took so long for someone to notice :-)

This should fix it:

Index: subversion/svnserve/serve.c
===================================================================
--- subversion/svnserve/serve.c	(revision 1768932)
+++ subversion/svnserve/serve.c	(working copy)
@@ -3867,6 +3867,7 @@ find_repos(const char *url,
   if (hooks_env)
     hooks_env = svn_dirent_internal_style(hooks_env, scratch_pool);
 
+  SVN_ERR(svn_repos_hooks_setenv(repository->repos, hooks_env, scratch_pool));
   repository->hooks_env = apr_pstrdup(result_pool, hooks_env);
 
   return SVN_NO_ERROR;


Mime
View raw message