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

Re: how to usage check-mime-type.pl?

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2006-01-10 13:37:14 CET

On Jan 10, 2006, at 08:17, Zoom Quiet wrote:

>> #!/bin/sh
>>
>> REPOS="$1"
>> TXN="$2"
>>
>> # Make sure that the log message contains some text.
>> SVNLOOK=/usr/bin/svnlook
>> $SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null
>>
>> if [ $? != 0 ]; then
>> echo "Commit message may not be empty." 1>&2
>> exit 1
>> fi
>>
>> # All checks passed, so allow the commit.
>> exit 0
>
> simple add u scipt into pre-commit hook;
> it working, anti empty commit-log , but in TortoiseSVN not the
> alert message
> "Commit message may not be empty." show!
>
> the TortoiseSVN bad or the echo ... 1>&2 can not return?
> My hook:
> ...
> # Make sure that the log message contains some text.
> SVNLOOK=/usr/local/bin/svnlook
> $SVNLOOK log -t "$TXN" "$REPOS" | \
> grep "[a-zA-Z0-9]" > /dev/null || exit 1

Take out the "|| exit 1" at this point.

I just tested the script I provided again. It works fine, from the
command line. (I don't use Windows or TortoiseSVN so I can't speak to
that. But I'm led to believe it TortoiseSVN should display the
message too.)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jan 10 13:55:24 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.