巫师的蜕变

导航

 

在Windows环境

在SVN的Repositories路径,E:\Repositories\demo20170408\hooks;

创建pre-commit.bat批处理文件。

文件内容:

 1 @echo off
 2 set SVNLOOK="D:\Program Files\VisualSVN Server\bin\svnlook.exe"
 3 setlocal
 4 set REPOS=%1
 5 set TXN=%2
 6 rem check that logmessage contains at least 10 characters
 7 %SVNLOOK% log "%REPOS%" -t "%TXN%" | findstr ".........." > nul
 8 if %errorlevel% gtr 0 goto err
 9 exit 0
10 :err
11 echo Empty log message not allowed. Commit aborted! 1>&2
12 exit 1

 

posted on 2017-04-08 19:20  jacunjpg  阅读(3220)  评论(0编辑  收藏  举报