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

Re: post-commit not happening

From: Christopher Ness <chris_at_nesser.org>
Date: 2005-01-08 21:25:31 CET

On Sat, 2005-08-01 at 11:58 -0800, Marilyn Davis wrote:
> On Sat, 8 Jan 2005, Max Bowsher wrote:
>
> > Marilyn Davis wrote:
> > > It works just fine from the command line:
> > >
> > > [root@maildance /]# /safe/hooks/post-commit /safe 48
> > > * Dumped revision 48.
> >
> > Hooks are run with an empty environment, i.e. no PATH.
>
> Thank you Max. But I guess I need a bigger hint. I'm not aware that
> I'm relying on PATH. I just used the whole path to show where I have
> the script.

Seeing as I like to read minds, I'll give it a shot. But since you
wrote the script you really should post it so we don't have to GUESS.

Run this command, it will print the PATH variable for you.
    echo $PATH

I'm assuming your script does something like this.
    svnadmin dump -r $rev $url

Now what is the "path" to your svnadmin binary. On my machine I get
this output when running the `whereis` program.

[nesscg@heidrun ~]$ whereis svnadmin
svnadmin: /usr/bin/svnadmin /usr/share/man/man1/svnadmin.1.gz

So my binary is stored in /usr/bin/ I would bet /usr/bin is in your
PATH variable (but isn't for the hook script!). Now edit your script to
use the fully qualified path.

    /usr/bin/svnadmin [put arguments here]

You need to do this for all your programs in the hook script.

Cheers,
Chris

-- 
Software Engineering IV,
McMaster University
PGP Public Key: http://www.nesser.org/pgp-key/
15:18:19 up 2:00, 2 users, load average: 0.41, 0.41, 0.34 
http://www.fsf.org/philosophy/no-word-attachments.html

Received on Sat Jan 8 21:32:03 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.