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

RE: [TSVN] 1.0.7 - Commit Log Message

From: Lübbe Onken <l.onken_at_rac.de>
Date: 2004-07-21 10:42:01 CEST

Hi Folks,

> As far as a pre-commit script, when a script decides to abort
> a commit, can it provide a reason that would then bubble back
> to a client such as TSVN?

Add these lines to your pre-commit hook script. It's bash, but you should
get the same thing to work in the windows shell. The important part is the
1>&2 which redirects the output to stderr. This is passed back to TSVN and
will be displayed.

---SNIP---
# 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. Übertragung
abgebrochen!\nEmpty log message not allowed. Commit aborted!" 1>&2
  exit 1
fi
---SNIP---

Cheers
-Lübbe

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Jul 21 11:43:38 2004

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

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