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

Re: send error messages back to the client in hook scripts..

From: aaron smith <beingthexemplarylists_at_gmail.com>
Date: 2007-08-09 23:48:30 CEST

Hey man, really appreciate the example.. unfortunatley that didn't do it..
Maybe it's my client? I'm using TextMate with subversion, although it's
strange as i've seen error messages come back to textmate previously.. I'm
still looking for reasons why this isn't working..

On 8/9/07, Rainer Sokoll <R.Sokoll@intershop.de> wrote:
>
> On Thu, Aug 09, 2007 at 04:55:05PM -0400, aaron smith wrote:
> > just trying a quick example.. here is my pre commit hook..
> >
> > #make sure that the log message contains some text.
> > REPOS="$1"
> > TXN="$2"
> > SVNLOOK=/usr/bin/svnlook
> > $SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null || exit
> > "Please enter a commit message"
> >
> > It denies me commits if no text is entered, but I don't see the message,
> is
> > this the correct way to send it back to the client? Thanks all..
>
> You have to use to STDERR, like this (example):
>
> $SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]"
> if [ $? -ne 0 ] ; then
> echo "Empty Log Messages not allowed - Yours sincerly, Aaron" >&2
> exit 1
> fi
>
>
> Rainer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
Received on Thu Aug 9 23:46:48 2007

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.