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

RE: Make developers write messages when commiting

From: Lübbe Onken <l.onken_at_rac.de>
Date: 2006-10-05 09:20:32 CEST

Martin Hantzschel wrote:
> Hello,
> Is there a way to obligue developers to write a message
> when commiting?

Here's a unix pre-commit hook that does the job. It checks if the user has
entered at least 10 alphanumeric characters. I doesn't prevent the user from
entering "AAAAAAAAAAAAAAAAAAAAAAAAAAAAA" of course.

---SNIP---
#!/bin/sh
REPOS="$1"
TXN="$2"
SVNLOOK=/usr/bin/svnlook

# check that logmessage contains at least 10 alphanumeric characters
LOGMSG=`$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" | wc -c`
if [ "$LOGMSG" -lt 10 ];
then
  echo -e "\nLeere Log-Meldung ist nicht zulaessig. Uebertragung
abgebrochen!\nEmpty log message not allowed. Commit aborted!" 1>&2
  exit 1
fi
---SNIP---

Cheers
- Lübbe

--
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Thu Oct 5 09:20:47 2006

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.