Visual SVN服务器

prettyice 2016-03-28

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

打开repositories的设置:
Visual SVN服务器
 

设置脚本:
Visual SVN服务器
 

@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

相关推荐

leehbhs / 0评论 2020-03-04