Pre-commit hook. Svnlook can't find the path “.tmp\format”

倖福魔咒の 提交于 2019-12-12 18:36:20

问题


I've made pre-commit.bat script, but it doesn't work properly.
I want it to prevent sending commits without proper message("Ticket xxxxx").

Here's the code:

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  

And here's what I get when I try to commit:

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 ...]"

Settings for the hook are:
Working copy path - D:\test\testwc
Command line to execute - D:\test\hooks\pre-commit.bat

Subversion client - TortoiseSVN

I'm trying to commit changes of the "D:\test\testwc\test.txt" file.

Thank you in advance!

来源:https://stackoverflow.com/questions/37917892/pre-commit-hook-svnlook-cant-find-the-path-tmp-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!