You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Annick Collet <An...@eumetsat.int> on 2005/11/21 15:45:21 UTC
Subversion Hook to enforce a bug ID in the log commit message
Dear all,
I'm looking for example of pre-commit hook to enforce a bug ID to be
entered in the log msg when performing a commit in a repository.
Thanks, Ann.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Subversion Hook to enforce a bug ID in the log commit message
Posted by Chris Jensen <cj...@edex.com.au>.
> I'm looking for example of pre-commit hook to enforce a bug ID to be
> entered in the log msg when performing a commit in a repository.
Off the top of my head, how about something like
REPOS="$1"
TXN="$2"
$SVNLOOK log -t "$TXN" "$REPOS" | \
egrep -iq "bug \#[0-9]" || echo "No bug id" && exit 1
This will abort unless the log message contains something like "bug #5"
Chris
--
---------------------------------------------------------------------
Chris Jensen cjensen@edex.com.au
Educational Experience (Australia)
Postal Address: PO Box 860, Newcastle NSW 2300
Freecall: 1-800-025 270 International: +61-2-4923 8222
Fax: (02) 4942 1991 International: +61-2-4942 1991
Visit our online Toy store! http://www.toysandmore.com.au/
---------------------------------------------------------------------