Windows SVN pre-commit-hook
At a current project I work on, we use a Windows server to run our subversion repository.
I wanted to set up the pre-commit hook so that commits with empty comment are automatically rejected.
All commit-hook example files that go with Subversion are written in bash (as unix servers tend to be the normal).
Here is a the pre-commit hook rewritten as a windows .bat file.
November 8th, 2010 at 17:30 (GMT-1)
Below is a section of my pre-hook. It only assigns the first word to the log message and not the entire log. Any idea what is wrong?
rem Subversion sends through the path to the repository and transaction id
set REPOS=%1
set TXN=%2
for /f “tokens=* delims= ” %%a in (‘svnlook log %REPOS% -t %TXN%’) do (set LogMessage=%%a)
February 5th, 2011 at 20:04 (GMT-1)
@ocpjp
Doesn’t you practically override the log message with each iteration of your loop so at the end you only have one word?