]>
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 
  19 # Also don't impose any constraints on commits to previous 2.x branches. 
  20 all_changed_files
=`svnl changed | \ 
  23                     egrep -v "branches/WX_2_" | \ 
  24                     egrep -v "wxWidgets/vendor" | \ 
  25                     egrep -v "src/(expat|tiff|regex|jpeg|stc/scintilla|zlib)" | \ 
  26                     egrep -v "src/msw/version.rc" | \ 
  27                     egrep -v "_wrap.cpp" | \ 
  28                     egrep -v "wxPython/.*/docs/.*\.html$"` 
  30 # analyze the changed files to find all non-binary and all source files 
  31 for f 
in $all_changed_files; do 
  32     mimetype
=`svnl proplist -v $f | 
  33                 fgrep "svn:mime-type" | 
  34                 sed 's/^ svn:mime-type : //'` 
  44     changed_text_files
="$changed_text_files $f" 
  48             changed_sources
="$changed_sources $f" 
  53 for f 
in $changed_sources; do 
  54      if  svnl 
cat $f | fgrep 
-q '       '; then 
  55          echo "Please remove TABs from $f before committing." >&2 
  61             # This file defines _T() for compatibility so don't check it. 
  64         */docs
/doxygen
/overviews
/changes_since28.h
) 
  65             # And this one describes changes from _T() to wxT(). 
  69             if  svnl 
cat $f | fgrep 
-qw '_T'; then 
  70                 echo "Please use wxT() instead of _T() in $f." >&2 
  77 for f 
in $changed_text_files; do 
  78     if ! svnl 
cat $f | iconv -f utf8 
-t WCHAR_T 
> /dev
/null
; then 
  79         echo "File $f doesn't use UTF-8, please convert it before committing." >&2 
  80         echo "(or set svn:mime-type property correctly if the file is binary)." >&2