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

Re: Multiple apache vhosts with one repo - which host did the commit came from, and how to record?

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Mon, 15 Sep 2008 17:28:08 -0500

On Sep 15, 2008, at 11:40, Eric Johnson wrote:

> (Subversion 1.4.6, Apache 2.2, Gentoo Linux - although I think all
> but the linux part doesn't change anything.)
>
> I've got two Apache vhosts (different ports on the same server)
> connecting to the same SVN repository. This configuration lets me
> use Apache LDAP authorization against two different LDAP servers.
> This configuration works just fine.
>
> We've now gotten to to the point that we want to make sure we
> record which vhost the request came in on, for a small collection
> of reasons.
>
> Since Subversion specifically removes almost all environment
> variables when executing hook scripts, whatever information Apache
> might provide is not available to the hook scripts that I'm writing.

You could probably abuse my svnhookdispatcher script to solve this
problem.

http://www.ryandesign.com/svnhookdispatcher/

My script exists so that you can run implement hook scripts after
checkouts, updates, switches and exports (hooks which Subversion
doesn't provide). It works by parsing Apache's Subversion access log.
That log can contain the hostname, port and whatever other standard
Apache information you're looking for. svnhookdispatcher doesn't pass
this on to the hooks it implements, though it could be enhanced to do
so. svnhookdispatcher also doesn't call the standard post-commit or
post-revprop-change hooks since Subversion already handles that,
though again it could be changed to do so.

If you end up implementing any of this, I wouldn't be opposed to
receiving patches. :)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-16 00:28:36 CEST

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

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