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

Re: Passing client information from server to hook scripts

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-05-10 10:09:32 CEST

On May 9, 2007, at 16:57, Kenneth Porter wrote:

> On Wednesday, May 09, 2007 3:23 PM -0500 Russell E Glaue wrote:
>
>> If this is so, then Subversion will not re-pass the variables from
>> Apache
>> as well. In apache, mod_dav_svn is used, which then calls the
>> hook-scripts.
>
> So to implement this purely in a hook, we'd need some changes to
> mod_dav_svn and svnserve to pass more information about the client
> to the hooks.
>
> Is there other information available in the server network layers
> that might be desirable to attach to revision properties, or to
> otherwise use in hook scripts? Perhaps the goal I initially
> suggested should be generalized in this way.

Perhaps not exactly what you're looking for, since you mention
svnserve too, but I've written a script which implements a few extra
Subversion hooks: "post-checkout-or-export" and "post-update":

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

It only works with Apache and mod_dav_svn, and works by parsing the
Apache log information. The script does not currently pass the
hostname or IP of the client to the hook script, but it could be
easily modified to do so. It also could be easily modified to call a
new enhanced post-commit script (like "post-commit2") to which the
hostname / IP could then also be passed. Should be possible for the
other existing post-* hooks too.

Your new post-commit2 script could then take the hostname or IP of
the client and set it in a new revision property of the just-
committed revision. That would be fairly tidy, if you merely want to
document it in the revision

Searching properties is however not possible without getting help
from another utility (one which indexes Subversion properties, for
example). What do you intend to do with this hostname / IP information?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu May 10 10:10:26 2007

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.