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

Re: STDOUT and Hook Scripts

From: David Weintraub <qazwart_at_gmail.com>
Date: Wed, 10 Mar 2010 19:35:23 -0500

On Wed, Mar 10, 2010 at 1:31 PM, Ted Stern <dodecatheon_at_gmail.com> wrote:
> What about this basic shell manipulation?
>
> #!/bin/sh
>
> exec 1>&2    # combine stdout with stderr
>
> # do stuff that generates stdout
>
> if [ <condition> ] ; then
>   exit 1       # return non-zero exit every time there's stdout
> fi

I know that hooks don't return STDOUT to the user, but does
Subversion's hooks eat STDOUT, or can I pass it on to the next
program. That's what I want to know.

What you recommend would send STDOUT to the user by sending STDOUT to
STDERR and purposefully failing the script. That's not what I want.

What I want to do is have a script that builds a list of notification
and then passes that along to another program to actually do the
notifications. This way, I can allow the user to choose the method of
sending notifications.

However, I'm taking a slightly different task by simply having
multiple notification subroutines in my script and allowing the user
to select the one they want.

-- 
David Weintraub
qazwart_at_gmail.com
Received on 2010-03-11 01:35:57 CET

This is an archived mail posted to the Subversion Users mailing list.