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

Re: pre-commit hooks to detect subversion access protocol

From: Blair Zajac <blair_at_orcaware.com>
Date: Fri, 24 Apr 2009 18:12:54 -0700

Andy Levy wrote:
> On Fri, Apr 24, 2009 at 18:54, Robert Mohr <lists_at_mohrr.net> wrote:
>> Sorry, should have replied to the list.
>> SSH sets a couple of environment variables: SSH_CLIENT and
>> SSH_CONNECTION (and, in an interactive mode, SSH_TTY). You could
>> check for the presence of those.
>> I've never checked, but I bet Apache sets an environment variable or
>> two. If not, you should look at mod_env.
>> I don't know how you could detect the svn protocol except for it not
>> being one of the above.
> Subversion hooks execute with a nearly-empty environment. There's only
> maybe 2 or 3 environment variables set.

That's right. The environment is deliberately cleared in all of the hook scripts.


Blair Zajac, Ph.D.
CTO, OrcaWare Technologies
Subversion training, consulting and support
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-04-25 03:13:47 CEST

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