Visual SVN服务器

1、Visual SVN server:提交内容时,必须输入备注的脚本设置

打开repositories的设置:

 

设置脚本:

 

@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

set findstr="C:\Windows\System32\findstr.exe"

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
echo 抱歉!由于您未填写修改日志,提交中止。 1>&2
echo 请仔细填写修改日志并再次提交,谢谢! 1>&2
echo 给您带来的不便,敬请谅解! 1>&2
exit 1

猜你喜欢

转载自7wolfs.iteye.com/blog/2286791