[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: Zoom Quiet <zoom.quiet_at_gmail.com>
Date: 2006-01-10 16:35:35 CET

2006/1/10, Ryan Schmidt <subversion-2006Q1@ryandesign.com>:
> 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.)
>
Yeah!!! i working perfect!!

thanx for all!!! the crazy hookscript! i'love it!

thanx for all!

>
>

--
# Time is unimportant, only life important!
## 面朝开源,我心自由!
Received on Tue Jan 10 16:53:00 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.