在svn的库数据文件的hooks文件夹下面 有pre-commit.tmpl,我们把它备份一下pre-commit-bk.tmpl,
然后新增加一个 pre-commit.bat,里面填入如下脚本 即可。
@echo off setlocal set REPOS=%1 set TXN=%2 rem check that logmessage contains at least 5 characters svnlook log "%REPOS%" -t "%TXN%" | findstr "....." > null if %errorlevel% gtr 0 goto err exit 0 :err echo Empty log message not allowed. Commit aborted! 1>&2 exit 1
原文:http://www.cnblogs.com/skyaccross/p/svn_force_comment.html