[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

pre-commit hook: disallow-tabs

From: Scott Lawrence <slawrence_at_pingtel.com>
Date: 2004-06-02 03:37:04 CEST

I've attached a script that I hope will be useful to others who
constantly find indentation and whitespace-only differences because some
editors use tabs and others don't.

This script is designed to be invoked from your pre-commit hook script
as follows:


#... other tests ...
# Check for tab characters in source files
if ! disallow-tabs "$REPOS" "$TXN" c cpp h html java
    # disallow-tabs prints error itself
exit $DisallowCommit

  disallow-tabs <repository> <transaction> <suffix>...

Specify a set of file suffixes (as written, they must be preceded by
'.', but that would be easy to change); files matching any suffix are
searched and the commit rejected if any tab characters are found.

(I've also posted this as a patch to the developers list for inclusion
in the distribution if you think it worthwhile).

Scott Lawrence
Consulting Engineer
Pingtel Corp.   
+1.781.938.5306 x162
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jun 2 03:37:36 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.