Subversion/Pre-commit prevent changes to directory
From Sidvind
- #!/bin/sh
- set -e
- set -o pipefail
- REPOS="$1"
- TXN="$2"
- if svnlook dirs-changed -t "${TXN}" "${REPOS}" | grep "^PATH/TO/BLOCK"; then
- echo "Message to display" > 1>&2
- exit 1
- fi
Put in /path/to/repo/hooks and chmod +x