预提交钩子。 Svnlook找不到路径“.tmp \ format”

时间:2016-06-20 08:36:11

标签: batch-file svn pre-commit-hook svn-repository svnlook

我已经制作了 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

Subversion客户端 - TortoiseSVN

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

提前谢谢!

0 个答案:

没有答案
相关问题