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

Re: commit hooks

From: Ryan Schmidt <subversion-2006d_at_ryandesign.com>
Date: 2006-11-15 03:13:54 CET

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
Received on Wed Nov 15 03:14:40 2006

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.