It is useful to be able to alter the log messages of SVN revisions but this isn’t possible with a default installation.
By default Subversion disallows the revision of properties on folders. These props aren’t under source control so it makes sense as you could end up with no-blame, uncontrolled alterations. In the ‘hooks’ folder of the repository there are a bunch of templates. Take the pre-revprop-change.tmpl and change the extension to .bat. If it was just left empty then the exit code would allow Subversion to make prop changes to revision. The following DOS batch file, however, limits those changes to log messages only.
@ECHO OFF
REM pre-revprop-change.bat
SET REPOS=%1
SET REV=%2
SET USER=%3
SET PROPNAME=%4
SET SVNLOG=svn:log
IF %PROPNAME% == %SVNLOG% GOTO :LOGEXIT
EXIT 1
:LOGEXIT
EXIT 0
Thanks for good script! Now I see that it’s very simple, but I couldn’t write it by myself;))))
By: vlkv on June 27, 2008
at 4:14 pm