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

Re: Warn if files match list of extensions

From: Anders Munch <ajm_at_flonidan.dk>
Date: Fri, 28 Aug 2009 16:27:40 +0200

Ryan J Ollos wrote:
> It seems to me that any server side repository hook would only be
> effective in *blocking* commits. I don't see how a warning can be
> issued through a repository hook.

It is possible. I call it the 'magic word' technique.

The idea is to default to rejecting a suspicious commit, but provide a
way to override that by including a magic word in the commit message.
So the first suspicious commit attempt is rejected with a "you didn't
use the magic word" message. If the committer really wants to add
those suspicious files, they just add the magic word to the commit
message and resubmit.

In the case of a suspicious file extension, my preferred magic word is
the name of the file itself.

I've attached a slightly modified copy of my own pre-commit hook,
which you might be able to adapt to your purposes.

regards, Anders

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2388288

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].

Received on 2009-08-28 16:33:18 CEST

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

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