I have implemented the below code in my hook script file abc-pre-commit.bat to disallow commit if files contain the string cod_bank
abc-pre-commit.bat
cod_bank
SET
In Linux It works like this:
#!/bin/sh REPOS="$1" TXN="$2" SVNLOOK=/usr/bin/svnlook $SVNLOOK diff "$REPOS" -t "$TXN" | \ [[ grep "^+cod_bank">/dev/null exit 0 ]] || echo "Your commit has been blocked because it contains the keyword cod_bank" >&2 exit 1