SVN服务器端日志必须输入设置

来源:互联网 发布:黑帽seo最新技术 编辑:程序博客网 时间:2024/06/04 18:28
@echo off


setlocal


rem get input parameters


set REPOS=%1
set TXN=%2


rem get log information to judge whether to commit or not

cd [svn的bin路径]


svnlook log %REPOS% -t %TXN% | findstr . > nul
if %errorlevel% gtr 0 goto err


exit 0


rem if you want to control ther character size of inputted  comment , do it as follows
rem for example,the commet should exceed 10 character 
rem svnlook log %REPOS% -t %TXN% | findstr .......... > nul


:err
echo 1>&2
echo Your commit has been blocked because you didn't give any log message 1>&2
exit 1
原创粉丝点击