路径: svn库所在 \ 上传项目 \ hooks 文件夹
D:\SVN_Repositories\dev_sample\hooks
D:\SVN_Repositories\dev_sample\hooks
@echo off
setlocal
set REPOS=%1
set TXN=%2
rem 保证输入8个字符
svnlook log %REPOS% -t %TXN% | findstr "......" > nul
if %errorlevel% gtr 0 goto :err_action
rem 过滤空格字符
svnlook log %REPOS% -t %TXN% | findstr /ic:" " > nul
if %errorlevel% gtr 0 goto :success
:err_action
echo *******************forbit commit empty log***************** >&2
goto :err_exit
:err_exit
exit 1
:success
exit 0