Hi,
I am sorry about the confusion, it is a perl script and I did use the perl interpreter in the first line. Anyway, I used the "env -i ./post-revprop-change" option to run and i saw what the problem is. I am using wget inside my perl script..so svnserve is not able to find that.
Thanks a lot for helping me figure this out.
-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2006Q1@ryandesign.com]
Sent: Fri 1/27/2006 5:25 AM
To: Meeran, Noorie
Cc: users@subversion.tigris.org
Subject: Re: post-revprop-change Hook Script
On Jan 26, 2006, at 21:46, Meeran, Noorie wrote:
>> you must specify the absolute path to the file, for example:
>>
>> echo hello > /tmp/test
>
> I have written a perl script inside post-revprop-change hook file.
> When I run this perl (hook) script alone, I am able to run it
> without errors. But I am not able to run this script after a
> commit. My filename is still "post-revprop-change" without the .py
> extension.
Probably just a typo, but make sure you're not confusing Perl (.pl)
and Python (.py).
As Chris said, make sure the first line of the script points to the
proper interpreter, as in "#!/usr/bin/perl" or "#!/usr/bin/python".
Hook scripts run with an empty environment. This is why you need to
specify absolute paths to things. It can also cause other things to
break. If things work on a normal shell (with its normal environment)
but not when called from Subversion (with no environment) this is
often the reason.
You can simulate this on the shell by calling your script through the
"env" program with the "-i" option to ignore the shell's environment:
env -i ./post-revprop-change
And then thankfully you can see any output the script sends to stdout
or stderr to help you debug the problem.
You can even build this into the first line of the script by writing,
for example, "#!/usr/bin/env -i /usr/bin/perl".
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jan 27 16:21:40 2006