You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Geoffrey Myers <ge...@serioustechnology.com> on 2006/11/14 18:42:46 UTC

commit hooks

I've successfully set up a commit hook to send email, but I'm looking to 
send more info.  Thus far all I've seen as far as info this hook has 
knowledge of is the revision and repository.  I'd like to be able to 
include things like the user and actual file(s) committed.  Anyone know 
if this is possible?

Thanks, Geof

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

Re: commit hooks

Posted by Geoffrey Myers <ge...@serioustechnology.com>.
Ryan Schmidt wrote:

> The pre-commit hook is passed the path to the repository, and the 
> transaction ID. You simply pass those two parameters to svnlook so that 
> it can look into the transaction and extract any information you request.

Thank you.  That will make it faster for me then trying to grok the 
python code.

later, Geof


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

Re: commit hooks

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Nov 14, 2006, at 18:24, Geoffrey Myers wrote:

> Justin Patrin wrote:
>
>> On 11/14/06, Geoffrey Myers wrote:
>>
>>> I've successfully set up a commit hook to send email, but I'm  
>>> looking to
>>> send more info.  Thus far all I've seen as far as info this hook has
>>> knowledge of is the revision and repository.  I'd like to be able to
>>> include things like the user and actual file(s) committed.   
>>> Anyone know
>>> if this is possible?
>>
>> You can use the svnlook command to look up the info you need. See the
>> examples. I've got one here:
>> http://pear.reversefold.com/dokuwiki/doku.php?id=svn:pre-commit
>
> I've scanned your code, don't use python, so it'll take me a bit  
> more time, but quick question.  How do you know what was just  
> committed when that information is not passed to the post-commit  
> script?

The pre-commit hook is passed the path to the repository, and the  
transaction ID. You simply pass those two parameters to svnlook so  
that it can look into the transaction and extract any information you  
request.


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

Re: commit hooks

Posted by Geoffrey Myers <ge...@serioustechnology.com>.
Justin Patrin wrote:
> On 11/14/06, Geoffrey Myers <ge...@serioustechnology.com> wrote:
>> I've successfully set up a commit hook to send email, but I'm looking to
>> send more info.  Thus far all I've seen as far as info this hook has
>> knowledge of is the revision and repository.  I'd like to be able to
>> include things like the user and actual file(s) committed.  Anyone know
>> if this is possible?
>>
> 
> You can use the svnlook command to look up the info you need. See the
> examples. I've got one here:
> http://pear.reversefold.com/dokuwiki/doku.php?id=svn:pre-commit

I've scanned your code, don't use python, so it'll take me a bit more 
time, but quick question.  How do you know what was just committed when 
that information is not passed to the post-commit script?

Thanks, Geof

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

Re: commit hooks

Posted by Justin Patrin <pa...@gmail.com>.
On 11/14/06, Geoffrey Myers <ge...@serioustechnology.com> wrote:
> I've successfully set up a commit hook to send email, but I'm looking to
> send more info.  Thus far all I've seen as far as info this hook has
> knowledge of is the revision and repository.  I'd like to be able to
> include things like the user and actual file(s) committed.  Anyone know
> if this is possible?
>

You can use the svnlook command to look up the info you need. See the
examples. I've got one here:
http://pear.reversefold.com/dokuwiki/doku.php?id=svn:pre-commit

-- 
Justin Patrin

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