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

Re: Opening the repository hooks environment file

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Wed, 03 Apr 2013 12:01:41 +0100

Ivan Zhakov <ivan_at_visualsvn.com> writes:

> On Wed, Apr 3, 2013 at 4:38 AM, Ben Reser <ben_at_reser.org> wrote:
>> I've gone ahead and moved the default hooks-env to hooks-env.tmpl.
>> We'll still try to open the file but we won't bother to read it in or
>> parse a completely commented out file unless the user puts a file in
>> place. The .tmpl is a common pattern with hooks already so it should
>> add any confusion.
>>
> I'm going to implement reading hooks environment file just before hook
> execution instead of repository open.

The current API is:

svn_error_t *
svn_repos_hooks_setenv(svn_repos_t *repos,
                       const char *hooks_env_path,
                       apr_pool_t *result_pool,
                       apr_pool_t *scratch_pool);

With your change svn_repos_hooks_setenv no longer needs scratch_pool.
It does still require result_pool to be the same pool used to allocate
svn_repos_t and that's a bit ugly. Perhaps we should add a pool member
to svn_repos_t and store the pool when allocating the struct? Perhaps
we should remove svn_repos_hooks_setenv and pass the path to a new
svn_repos_open3?

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
Received on 2013-04-03 13:02:27 CEST

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