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

[contrib] Hook script for svn:keywords and binary files

From: Larry Shatzer, Jr. <larrys_at_gmail.com>
Date: Thu, 15 May 2008 09:38:09 -0600

I have a hook script that will either disallow all svn:keywords from being
set on binary files, or allow them if they are using the fixed width version
of the keyword.

The approach I am using to determine if it is binary is everything is binary
by default. The way it determines if a file is non binary (text), is if it
has svn:eol-style set, then it is text. If it has svn:mime-type of text/*,
then it is text. I also have a command line flag you can set multiple times
to add extensions to always consider as text (.txt, .java, .c, etc.) There
is no default for that list.

I figure this might be useful to others, so I am attaching the script for
consideration to be added to the contrib/hook-scripts directory.

-- Larry

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-05-15 17:38:33 CEST

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

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