You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ryan Schmidt <su...@ryandesign.com> on 2007/05/10 08:09:32 UTC

Re: Passing client information from server to hook scripts

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

Re: Passing client information from server to hook scripts

Posted by Kenneth Porter <sh...@sewingwitch.com>.
On Thursday, May 10, 2007 3:09 AM -0500 Ryan Schmidt 
<su...@ryandesign.com> wrote:

> 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?

I have a shared lab machine and I'd like to identify commits performed 
there instead of in one's office. I could look at the info in my commit 
emails. It would also be nice if I could see the information in "svn log" 
output.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org