进入相应SVN仓库hooks目录,编辑文件pre-commit
#!/bin/sh
REPOS="$1"
TXN="$2"
SVNLOOK=/usr/bin/svnlook #根据你的SVN目录而定
LOGMSG=`$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" | wc -c`
if [ "$LOGMSG" -lt 10 ];
then
#echo "Log message can't be empty! you must input more than 10 chars as comment!." 1>&2
echo "请输入文件修改的更新日志,否则提交失败!!!" 1>&2
exit 1
fi
保存退出,赋予pre-commit文件可执行权限
chown +x pre-commit