在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

 

相关文章:

  • 2021-09-06
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2021-08-20
  • 2021-11-30
猜你喜欢
  • 2021-08-05
  • 2021-05-02
  • 2021-08-12
  • 2021-11-07
  • 2021-07-20
  • 2022-12-23
相关资源
相似解决方案