Hi,
I have a svn 1.6.5 repository that I'm trying to implement a pre-commit hook on
(below). I've started with the template, and changed it only slightly.
#!/bin/sh
REPOS="$1"
TXN="$2"
# Make sure that the log message contains some text.
SVNLOOK=/opt/CollabNet_Subversion/bin/svnlook
GREP=/bin/grep
$SVNLOOK log -t "$TXN" "$REPOS" | \
$GREP "[a-zA-Z0-9]" > /dev/null || exit 1
# All checks passed, so allow the commit.
exit 0
The paths are correct for my system, and I've successfully tested the
functionality using existing revisions by replacing the -t flag with the -r
flag for svnlook. The extension has been changed from .tmpl to .sh and the
permissions for both the directory and the file are correct (executable by
all). However, when I test this by committing a revision with no log message
from my TortoiseSVN client (1.6.8, and svn 1.6.11), the commit happens no
problem. Checking the TortoiseSVN docs says that server-side hook scripts
should still work. I have no client side hook scripts.
Any idea what I'm missing?? Any help is much appreciated.
Julia Braman
Robotic Systems Technology Branch (ER4)
[email protected]