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

Reply via email to