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

Fail commit if certain text in the commit

From: Steve Williams <stevewilliams_at_kromestudios.com>
Date: 2005-06-09 09:57:05 CEST

Some of the guys here want a commit to fail if there is a certain piece
of text in the commit. They want this because they often accidentally
commit files that they have temporarily changed, so if they add this
keyword to the temporary changes, the commit will fail if they forget to
deselect that file in TSVN (which they often do).

I have tried adding the following to the template pre-commit hook
(server running on RH9).

if $SVNLOOK diff -t "$TXN" "$REPOS" | grep -i "nocommit" >/dev/null
then (echo "Contains nocommit keyword"; exit 1)
fi

but it doesn't seem to catch the keyword. Is it my Bash scripting (i'm
a total newbie to Bash) or my use of the pre-commit hook? The
pre-commit hook currently works for catching empty log messages, but I
have no idea why this one is not working.

-- 
Sly
This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 9 10:10:41 2005

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