#!/bin/bash # PRE-REVPROP-CHANGE HOOK # # The pre-revprop-change hook is invoked before a revision property # is added, modified or deleted. Subversion runs this hook by invoking # a program (script, executable, binary, etc.) named 'pre-revprop-change' # (for which this file is a template), with the following ordered # arguments: # # [1] REPOS-PATH (the path to this repository) # [2] REVISION (the revision being tweaked) # [3] USER (the username of the person tweaking the property) # [4] PROPNAME (the property being set on the revision) # [5] ACTION (the property is being 'A'dded, 'M'odified, or 'D'eleted) # # [STDIN] PROPVAL ** the new property value is passed via STDIN. # REPOS="$1" REV="$2" USER="$3" PROPNAME="$4" ACTION="$5" if [ "$ACTION" = "M" ]; then if [ "$PROPNAME" = "svn:log" ] || [ "$PROPNAME" = "svn:author" ]; then exit 0; fi fi echo "You may only 'edit' the log & author properties" exit 1