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

Re: svn:ignore pattern question

From: Ryan Schmidt <subversion-2009a_at_ryandesign.com>
Date: Fri, 27 Feb 2009 17:41:51 -0600

On Feb 27, 2009, at 13:46, mimi huhu wrote:

> Might I ask what's the best way to enforce to commit certain file
> extensions?
>
> For example, I would like to user to commit those extensions
> (.sh, .pl, .sql, ...) only.
> I checked the link, but I did not see the syntax I might needed.

For that, you need to write a pre-commit hook. In it, you will
examine the incoming transaction using "svnlook changed" and compare
each changed file (which includes added files) with your list of
allowed extensions, and if any file isn't allowed, you print a
message explaining that and exit with a non-zero exit code, which
terminates the commit.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1241464

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-02-28 00:42:53 CET

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