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

hooks and env

From: Chia-liang Kao <clkao_at_clkao.org>
Date: 2005-02-26 05:19:11 CET

Hi,

So I'm trying to implement a pre-commit hook that is going to be installed by
svk for the repositories it touches, to prevent accidental commits into mirrored
paths by non-svk clients, which would lead to inconsistent states.

So I have to distinguish the program invoking the commit. An obvious way is to
set SVK environment variable from the svk library, and check so in the hook.

However the run_hook_cmd in libsvn_repos has:

  err = svn_io_run_cmd (".", cmd, args, &exitcode, &exitwhy, FALSE,
                        stdin_handle, null_handle, write_errhandle, pool);

The FALSE indicates the hook is run under clean environment. So the $ENV{SVK}
thing won't work.

What can I do to implement what I want in the hook?

Cheers,
CLK

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Feb 26 05:25:02 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.