Wednesday, December 05, 2007

Subversion pre-revprop-change hook

Another small batch file hook for those running subversion on windows. This hook will allow users to update a log message on the old check-in.

Note: Property changes are not versioned, so you will permanently loose the old message.

Place this in a pre-revprop-change.cmd
-------------
IF %5 EQU M GOTO CONT1
GOTO FAIL
:CONT1
IF %4 EQU svn:log GOTO OK
:FAIL
echo "Changing revision properties other than svn:log is prohibited" >&2
exit 1
:OK
exit 0
------------

 

Technorati Tags: , ,

4 comments:

Anonymous said...

Thank you for posting this!!!

Hard to find windows solution when you are in a hurry :)

Tim A said...

This came in real handy. Thanks for posting.

Anonymous said...

Thanks for posting this.

Coach P said...

Thanks soooooo much! Although one comment sticks to multiple files committed in one version, this was great to allow me to generalize the comment. (I'm a stickler on checkin comments)

Thanks for preserving my sanity! :)