操作方法:在SVN的Repositories下,找到要配置的项目,在项目目录下找到hooks文件夹,在其下创建pre-commit.bat文件,把下面复制进去就可以了(无需重启,如果改动,保存bat文件,配置就生效)
================= bat文件内容 开始===================
@echo off
setlocal
set SVN_BINDIR=C:/Program Files/VisualSVN Server/bin
set REPOS=%1
set TXN=%2
rem check that logmessage contains at least 10 characters
svnlook log "%REPOS%" -t "%TXN%" | findstr ".........." > nul
endlocal
if %errorlevel% gtr 0 goto err
exit 0
:err
echo please input log message ,at least 10 characters(请认真填写注释信息,至少5个汉字). Commit aborted! 1>&2
exit 1
================= bat文件内容 结束===================
文章出处:http://blog.csdn.net/ygh_0912/article/details/9701821
时间: 2024-10-23 07:53:39