I want to configure the following:
I get error at step 1 itself. I tried by adding a pre-commit hook to check if the revision property is set. I am not able to do this in a pre-commit hook. I wrote a pre-commit.BAT
file and used svn propget as below:
"C:\Program Files\Subversion\bin\svn.exe" propget "CodeReview" -t %TXN% %REPOS% >property FIND "%property%" "C:\repos\hooks\requiredproperties.txt">Null
If %ERRORLEVEL% EQU 0 goto OK1
This gives error -- complains about -t.
Can anyone help me with the scripts for the three steps?
As already noted, you have to use svnlook on step 1. But situation is even more worse: it's strongly not recommended (while not prohibited) to modify transaction content in pre-commit hook in order to avoid unpredictable results, but you want to do it on your step 2
And, JFYI, property (any svn property) is attribute of file or directory, you tried to propget from transaction, which will be never successful
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With