Ivan Zhakov <[email protected]> writes:
> On Wed, Apr 3, 2013 at 4:38 AM, Ben Reser <[email protected]> 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