windows下svn提交版本时强制写日志

到版本库中hooks目录下,将pre-commit.tmpl文件复制为pre-commit.bat文件,然后将pre-commit.bat 文件内容改为:
setlocal
set REPOS=%1
set TXN=%2
rem check that logmessage contains at least 5 characters
svnlook log "%REPOS%" -t "%TXN%" | findstr ".........." > nul
if %errorlevel% gtr 0 goto err
exit 0
:err
echo 提交必须写日志!>&2
exit 1

你可能感兴趣的:(windows,SVN)