# pwd
/svn/www.wangshui.com/hooks
# vim pre-commit
#!/bin/sh
REPOS="$1"
TXN="$2"
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
LOGMSG=$($SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" | wc -c)
if [ "$LOGMSG" -lt 1 ]; then
echo -e "\n 提交文件时必须添加注释,提交中止."1>&2
exit 1
fi