]>
git.saurik.com Git - wxWidgets.git/blob - misc/scripts/svn/hooks/pre-commit
6 SVNLOOK
=/usr
/bin
/svnlook
11 $SVNLOOK $cmd "$REPOS" -t "$TXN" $
*
16 # exclude all third-party files from consideration, we don't want to do any
18 all_changed_files
=`svnl changed | \
21 egrep -v "src/(tiff|regex|jpeg|stc/scintilla)" | \
22 egrep -v "_wrap.cpp" | \
23 egrep -v "wxPython/.*/docs/.*\.html$"`
25 # analyze the changed files to find all non-binary and all source files
26 for f
in $all_changed_files; do
27 mimetype
=`svnl proplist -v $f |
28 fgrep "svn:mime-type" |
29 sed 's/^ svn:mime-type : //'`
39 changed_text_files
="$changed_text_files $f"
43 changed_sources
="$changed_sources $f"
48 for f
in $changed_sources; do
49 if svnl
cat $f | fgrep
-q ' '; then
50 echo "Please remove TABs from $f before committing." >&2
56 # This file defines _T() for compatibility so don't check it.
60 if svnl
cat $f | fgrep
-qw '_T'; then
61 echo "Please use wxT() instead of _T() in $f." >&2
68 for f
in $changed_text_files; do
69 if ! svnl
cat $f | iconv -f utf8
-t WCHAR_T
> /dev
/null
; then
70 echo "File $f doesn't use UTF-8, please convert it before committing." >&2
71 echo "(or set svn:mime-type property correctly if the file is binary)." >&2