]> git.saurik.com Git - wxWidgets.git/blame - misc/scripts/svn/hooks/pre-commit
Add the initial version of svn pre-commit hook.
[wxWidgets.git] / misc / scripts / svn / hooks / pre-commit
CommitLineData
078a94e0
VZ
1#!/bin/sh
2
3REPOS="$1"
4TXN="$2"
5
6SVNLOOK=/usr/bin/svnlook
7
8changed_cpp_files=`$SVNLOOK changed "$REPOS" -t "$TXN" | \
9 grep "^[AU]" | \
10 sed 's/^....//' | \
11 egrep "\.(cpp|h|py)$" | \
12 egrep -v "src/(tiff|regex|jpeg|stc/scintilla)" `
13
14rc=0
15
16set -e
17for f in $changed_cpp_files; do
18 if $SVNLOOK cat "$REPOS" -t "$TXN" $f | fgrep -q ' '; then
19 echo "Please remove TABs from $f before committing." >&2
20 rc=1
21 fi
22done
23
24exit $rc