2

我已经制作了pre-commit.bat脚本,但它不能正常工作。
我希望它防止在没有正确消息的情况下发送提交(“Ticket xxxxx”)。

这是代码:

set REPOS=%1  
set TXN=%2  
svnlook log %REPOS% -t %TXN% | findstr /r "^Ticket [0-9]{5}" > nul || echo   "Follow the format [Ticket xxxxx ...]" 1>&2 && exit 1  
exit 0  

这就是我尝试提交时得到的结果:

The hook script returned an error:  
svnlook: E720003: Can't open file 'C:\Users\EDUARD~5.LI\AppData\Local\Temp\3\svn4FA6.tmp\format': The system cannot find the path specified.    
"Follow the format [Ticket xxxxx ...]"

挂钩的设置是:
工作副本路径 - D:\test\testwc
要执行的命令行 - D:\test\hooks\pre-commit.bat

颠覆客户端- TortoiseSVN

我正在尝试提交对“D:\test\testwc\test.txt”文件的更改。

先感谢您!

4

0 回答 0