]>
git.saurik.com Git - wxWidgets.git/blob - misc/scripts/svn/hooks/pre-commit
6 SVNLOOK
=/usr
/bin
/svnlook
9 $SVNLOOK cat "$REPOS" -t "$TXN" $1
12 all_changed_files
=`$SVNLOOK changed "$REPOS" -t "$TXN" | \
16 # notice that breaking all_changed_files into several lines by replacing spaces
17 # with new lines only works as long as we don't have any files with spaces in
18 # them -- which is the case for now, but if it ever changes we'd probably need
19 # to use a shell array for all_changed_files or just rerun svnlook here again
20 changed_sources
=`echo $all_changed_files | \
22 egrep "\.(cpp|h|py)$" | \
23 egrep -v "src/(tiff|regex|jpeg|stc/scintilla)"`
29 for f
in $changed_sources; do
30 if svn_cat
$f | fgrep
-q ' '; then
31 echo "Please remove TABs from $f before committing." >&2
36 for f
in $all_changed_files; do
37 if ! svn_cat
$f | iconv -f utf8
-t WCHAR_T
> /dev
/null
; then
38 echo "File $f doesn't use UTF-8, please convert it before committing." >&2