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

Re: perl hooks

From: Toby Thain <toby_at_telegraphics.com.au>
Date: Tue, 16 Dec 2008 12:53:11 -0500

On 16-Dec-08, at 9:43 AM, Andy Levy wrote:

> On Tue, Dec 16, 2008 at 09:21, Ilan Yaniv
> <Ilan.Yaniv_at_timetoknow.org> wrote:
>> ...
>> How do I send messages as output of the hook?
>
> Hook scripts are not interactive. Using a GUI library is a waste of
> your time and may be counterproductive. Send your message to STDERR
> and it will go back to the client AND stop the commit from happening.
> You cannot produce a "warning" in the pre-commit hook - if you send
> output back to the client, it WILL fail the transaction.
>
> If you need to send a "warning" while allowing the hook to end
> successfully, send an email.

Or append to a log file and 'tail -f' on the server to monitor it.

Or use a jabber client* to send alerts back to a multi-user chat (or
a specific user).

--Toby

e.g. http://www.telegraphics.com.au/svn/jabberbots/trunk/

> "How do I send email in a Perl script?"
> is outside the scope of this mailing list but there are plenty of Perl
> hook scripts you can find via Google which may serve as examples.
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=985127

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2008-12-16 18:54:25 CET

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.