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

pre-commit hook that examines content

From: Sven Brueggemann <SBrueggemann_at_gmx.net>
Date: 2006-05-05 19:31:02 CEST

Hello,

some of my users use (Windows) text editors that can't
display non-printable characters and so from time to
time it happens that there are control codes (like 0x1A)
in the source files.

These control codes break our unix build process, so
I'd like to warn the user if he tries to commit a text
file containing certain control characters.

Can anyone provide a pre-commit hook that examines
text files for buzz words or special characters that I
could use as a starting point for writing my own one?

I played around with svnlook but since I'm not that
familiar with shell scripts, I need a template showing
how to iterate through the files in a transaction,
determine if they are text or binary, and examine
their content.

Any help appreciated. Thanks!

Kind regards

Sven

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri May 5 19:32:12 2006

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.