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