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

Pre-commit hook problem

From: BRAMAN, JULIA M (JSC-ER711) <julia.m.braman_at_nasa.gov>
Date: Wed, 19 May 2010 11:48:21 -0500

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)
julia.m.braman_at_nasa.gov
Received on 2010-05-19 18:49:03 CEST

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

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