+# exclude all third-party files from consideration, we don't want to do any
+# checks for them
+all_changed_files=`svnl changed | \
+ grep "^[AU]" | \
+ sed 's/^....//' | \
+ egrep -v "src/(tiff|regex|jpeg|stc/scintilla)" | \
+ egrep -v "_wrap.cpp"`
+
+# analyze the changed files to find all non-binary and all source files
+for f in $all_changed_files; do
+ mimetype=`svnl proplist -v $f |
+ fgrep "svn:mime-type" |
+ sed 's/^ svn:mime-type : //'`
+ case $mimetype in
+ ''|text/*)
+ ;;
+
+ *)
+ continue
+ ;;
+ esac
+
+ changed_text_files="$changed_text_files $f"
+
+ case $f in
+ *.cpp|*.h|*.py)
+ changed_sources="$changed_sources $f"
+ ;;
+ esac
+done