强制SVN提交时写注释
在项目的hook目录下,创建pre-commit.bat文件,内容如下:
@echo off
setlocal
set REPOS=%1
set TXN=%2
rem check that logmessage contains at least 10 characters
svnlook log "%REPOS%" -t "%TXN%" | findstr ".........." > nul
if %errorlevel% gtr 0 goto err
exit 0
:err
echo Empty log or less 10 characters log message not allowed. Commit aborted! 1>&2
exit 1
这样就强制输入注释了。