1、打开VisualSVN管理控制台
2、右键你要设置的代码仓库
3、所有任务 —>Manage Hooks
4、编辑“Pre-commit hook
将下面的内容粘贴进去
下面 svnlook 路径更改为自己svnlook 路径
@echo off
::
:: Stops commits that have empty log messages.
::
@echo off
set svnlook="D:\Program Files\VisualSVN Server\bin\svnlook.exe"
setlocal
rem Subversion sends through the path to the repository and transaction id
set REPOS=%1
set TXN=%2
rem check for an empty log message
%svnlook% log %REPOS% -t %TXN% | findstr . > nul
if %errorlevel% gtr 0 (goto err) else exit 0
:err
echo 本次提交失败,请输入本次修改的日志信息后再进行提交! 1>&2
exit 1