You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by wimpunk <yb...@spammotel.com> on 2011/08/11 22:50:08 UTC

Detecting where the commit has been send from

Hi,

I'm wondering if there is a way to detect where the commit has been
send from while doing a postcommit.  Is there a way to do this?

Regards,

wimpunk.


Re: Detecting where the commit has been send from

Posted by wimpunk <yb...@spammotel.com>.
On 2011-08-13, Ryan Schmidt <su...@ryandesign.com> wrote:
>
> On Aug 11, 2011, at 15:50, wimpunk wrote:
>
>> I'm wondering if there is a way to detect where the commit has been
>> send from while doing a postcommit.  Is there a way to do this?
>
> What do you mean by "where"? You should be able to figure out the username of the person who committed the change. If you want more info like their IP address then that is not available. 
>

I was trying to find the IP address... so it looks doesn't work by
default.

> My svnhookdispatcher adds extra hooks to Subversion by parsing the mod_dav_svn log; you might be able to hack it to parse out the IP address and send that to a modified post-commit hook, assuming you are serving your repository with apache.
>
> http://ryandesign.com/svnhookdispatcher/
>
> It's been years since I wrote svnhookdispatcher; since then, svnserve has gained a log too. Not sure if IP addresses are logged there.
>

I'll take a look, maybe I can modify it to get the IP address...

>
>


Re: Detecting where the commit has been send from

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 11, 2011, at 15:50, wimpunk wrote:

> I'm wondering if there is a way to detect where the commit has been
> send from while doing a postcommit.  Is there a way to do this?

What do you mean by "where"? You should be able to figure out the username of the person who committed the change. If you want more info like their IP address then that is not available. 

My svnhookdispatcher adds extra hooks to Subversion by parsing the mod_dav_svn log; you might be able to hack it to parse out the IP address and send that to a modified post-commit hook, assuming you are serving your repository with apache.

http://ryandesign.com/svnhookdispatcher/

It's been years since I wrote svnhookdispatcher; since then, svnserve has gained a log too. Not sure if IP addresses are logged there.