Add check for _T() to svn pre-commit hook.
_T() shouldn't be used in any new code so don't allow committing it. We could have used "svnlook diff" instead of "svnlook cat" and check only for _T() not being added but in practice there shouldn't be any difference and using "cat" is simpler. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -52,6 +52,19 @@ for f in $changed_sources; do
 | 
			
		||||
         echo "Please remove TABs from $f before committing." >&2
 | 
			
		||||
         rc=1
 | 
			
		||||
     fi
 | 
			
		||||
 | 
			
		||||
     case $f in
 | 
			
		||||
        */wx/chartype.h)
 | 
			
		||||
            # This file defines _T() for compatibility so don't check it.
 | 
			
		||||
            ;;
 | 
			
		||||
 | 
			
		||||
        *)
 | 
			
		||||
            if  svnl cat $f | fgrep -qw '_T'; then
 | 
			
		||||
                echo "Please use wxT() instead of _T() in $f." >&2
 | 
			
		||||
                rc=1
 | 
			
		||||
            fi
 | 
			
		||||
            ;;
 | 
			
		||||
    esac
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
for f in $changed_text_files; do
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user