#!/bin/sh SVNLOOK=/usr/bin/svnlook REPOS="$1" TXN="$2" # Block commits with trailing spaces $SVNLOOK diff -t "$TXN" "$REPOS" | grep '^+' | grep ' $' if [ $? -eq 0 ] ; then echo "" > /dev/stderr echo "Mateusz likes code to contain trailing spaces NOT. Young padawans shall know" > /dev/stderr echo "that trailing spaces on the dark side of the force are. Use your lightsaber" > /dev/stderr echo "to strip them, and again try to commit." > /dev/stderr exit 1 fi exit 0