@echo off
setlocalset REPOS=%1set TXN=%2rem check that logmessage contains at least 10 charactersrem ..代表2个字符
svnlook log "%REPOS%" -t "%TXN%" | findstr ".." > nulif%errorlevel%gtr0goto err
exit0
:err
echo Log Message at least two characters. Commit aborted! 1>&2exit1
4:linux环境编辑pre-commit.tmpl
REPOS="$1"
TXN="$2"# Make sure that the log message contains some text.
SVNLOOK=/usr/local/bin/svnlook
SVNLOOKlog−t"TXN""$REPOS" | \
grep"[a-zA-Z0-9]" > /dev/null || exit1# Check that the author of this commit has the rights to perform# the commit on the files and directories being modified.
commit-access-control.pl "REPOS""TXN" commit-access-control.cfg || exit1# All checks passed, so allow the commit.exit0
主要以window版本为主:(1)安装svn,安装完成后,生成svn目录(2)备份文件pre-commit.tmpl(3)添加bat文件pre-commit.bat(windows)@echo offsetlocalset REPOS=%1set TXN=%2rem check that logmessage contains at least 10 charactersrem ..代表2个字符sv