Enabling revision of props

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

Advertisements

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s