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

pre commit hook not working

From: Prachi Khade <Prachi.Khade_at_kpitcummins.com>
Date: Tue, 29 Jan 2013 08:09:48 +0000

hi All,

I am currently trying to make my Review Board work with svn on a fedora machine using pre commit hook.

precommit:
#!/bin/sh
REPOS="$1"
REV="$2"
echo $REV
/usr/bin/python "/home/svn/ovip/hooks/svn-hook-postcommit-review.py" "$REPOS" "$REV" || exit 1

but when this hook gets a call by a commit on repo i get the following error :
svn: Commit failed (details follow):
svn: Commit blocked by pre-commit hook (exit code 1) with output:
Parameter <rev> must be an int, was given 36-4m

Relevant piece of code from svn-hook-postcommit-review.py :
def main():
if len(sys.argv) != 3:
sys.stderr.write('Usage: %s <repos> <rev>\n' % sys.argv[0])
sys.exit(1)

repos = sys.argv[1]
rev = sys.argv[2]

# verify that rev parameter is an int
try:
int(rev)
except ValueError:
sys.stderr.write("Parameter <rev> must be an int, was given %s\n" % rev)
sys.exit(1)

Not able to understand what is wrong here [http://www.svnforum.org/images/smilies/icon_sad.gif]

Any help is greatly appreciated.
Thanks,
Prachi
Received on 2013-01-29 13:34:13 CET

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.