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

pre-commit hooks work at first, but then stop

From: Gregory MacDonald <gtmacdonald_at_link.com>
Date: 2005-07-28 22:22:34 CEST

I'm having an odd error with my pre-commit hook. It works fine for about
5 or 6 commit attempts (blocking and letting through what I want), but
then stops working entirely. After which the client (GUI or commandline)
just hangs forever. Here's a copy of my hook. I've tried running
svnserve as root with no luck. I've checked permissions as well. Thanks
in advance.

-Greg MacDonald

#!/bin/sh

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

# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook

if ! $SVNLOOK log -t "$TXN" "$REPOS" | /bin/grep "[a-zA-Z0-9]"
then
  echo "Please_enter_a_comment." 1>&2
  exit 1
fi

if $SVNLOOK changed -t "$TXN" "$REPOS" | /bin/grep -Eo "^A .*/[\._][^/]+$"
then
   echo "Please_do_not_commit_configuration_files." 1>&2
   exit 1
fi

if $SVNLOOK changed -t "$TXN" "$REPOS" | /bin/grep -Eo "^A .*temp$"
then
   echo "Please_do_not_commit_temp_files." 1>&2
   exit 1
fi

if $SVNLOOK changed -t "$TXN" "$REPOS" | /bin/grep -Eo "^A .*tmp$"
then
   echo "Please_do_not_commit_tmp_files." 1>&2
   exit 1
fi

if $SVNLOOK changed -t "$TXN" "$REPOS" | /bin/grep -Eo "^A
.*/[^/]*[A-Z]+[^/]*$"
then
   echo "Please_do_not_use_capitals." 1>&2
   exit 1
fi

# All checks passed, so allow the commit.
exit 0

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 28 21:25:12 2005

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.