[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: Marilyn Davis <marilyn_at_deliberate.com>
Date: 2005-01-08 22:03:55 CET

On Sat, 8 Jan 2005, Christopher Ness wrote:

> 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.

I'm sorry, I didn't realize it was relevent:

---
REPOS="$1"
REV="$2"
/usr/local/bin/svnadmin dump "$REPOS" -r "$REV" --incremental > /backup/increments/"$REV"
/bin/cat > /backup/increments/mailer << EOF
From: fishgills@fishgills.net
To: md@deliberate.com
Subject: Commited: "$REV"
EOF
/bin/cat /backup/increments/"$REV" >> /backup/increments/mailer
/usr/exim/bin/exim -oMr DM_OUTSIDE_0_DELIVER_Inbox_none -t -f fishgills@fishgills.net < /backup/increments/mailer
---
I fixed up the paths; I emptied my PATH; I ran it on the command line
-- fine.
But no go when I do a commit.
Is there a log or error output somewhere that I can be looking at?
BTW, I wanted to use mailer.py but it needed imports that didn't seem
to come in with the subversion distribution so I gave that up. I wrote
a little shell script just to get things going.  It's better if I
don't bring up another python interpreter to do this anyway.
Thank you for your help.
Marilyn
> 
> 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
> 
-- 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Jan 8 22:09:25 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.