Pre-commit hook. Svnlook can't find the path “

2019-07-14 04:26发布

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!

0条回答
登录 后发表回答