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

pre-commit doesn't work

From: <c.marschalek_at_schrack-seconet.com>
Date: 2006-07-25 10:42:54 CEST

Hi everyone,

I have a simple pre-commit hook that checks if the log message is empty or
not:

-------------------------------- START OF SCRIPT
------------------------------------
#!/bin/sh

REPOS="$1"
TXN="$2"

SVNLOOK=/usr/bin/svnlook

LOG=`$SVNLOOK log $REPOS --transaction $TXN`
if [ -z "$LOG" ]
then
  echo "Log empty ($TXN)" >&2
  exit 1
fi

# All checks passed, so allow the commit.
exit 0;
---------------------------------- END OF SCRIPT
--------------------------------------

My commits only work after the second attempt to commit (with a log
message entered).
The first time I try to commit (with a log message entered), the
pre-commit fails and the
error text is empty. If I remember correctly, I've had this error over the
last few versions I
had installed. I've also tried the template which comes with subversion,
but the result is
the same.

My current version: svn, Version 1.3.0 (r17949)
My linux installation: SuSE 9.1

Any suggestions? :)

best regards,
Chris
Received on Tue Jul 25 10:44:11 2006

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