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

Re: [svn 1.3.0] post-commit can not running?

From: Zoom Quiet <zoom.quiet_at_gmail.com>
Date: 2006-01-08 14:30:50 CET

2006/1/8, Ryan Schmidt <subversion-2006Q1@ryandesign.com>:
> On Jan 8, 2006, at 13:33, Ryan Schmidt wrote:
>
> > The hooks run with NO environment, not even a PATH, not even the
> > notion of what the current directory is. There is no such thing as
> > "./" in a hook. You must specify the entire absolute path. So, your
> > post-commit should contain this:
> >
> >
> > #!/bin/sh
> >
> > REPOS="$1"
> > REV="$2"
> >
> > /usr/local/svnrepos/pyblosxom/hooks/post-commit.py
> >
> >
> > And, of course, post-commit.py will need 755 permissions, but I
> > imagine you've done that already.
>
> And of course you have to actually pass the arguments along:
>
>
> #!/bin/sh
>
> REPOS="$1"
> REV="$2"
>
> /usr/local/svnrepos/pyblosxom/hooks/post-commit.py "$REPOS" "$REV"
>
>
thanx for ur answer.
hookscript is very cool action in SVN, because it clean than CVSROOT's
hook script, but in SVNbook, there not any info. for howto debug
hooksript...

thanx again for ur explain , i'll try in next day, if success,
 i'll publish as SVN tip in Chinese for help others SVN adminstrator.

> But you already knew that. I just forgot it in my example.
>
>
> I also wanted to point out that the post-commit.tmpl file provided
> with Subversion 1.3.0 already explains the current directory problem:
>
> > # The default working directory for the invocation is undefined, so
> > # the program should set one explicitly if it cares.
>
> And of course:
>
> > # The hook program typically does not inherit the environment of
> > # its parent process. For example, a common problem is for the
> > # PATH environment variable to not be set to its usual value, so
> > # that subprograms fail to launch unless invoked via absolute path.
> > # If you're having unexpected problems with a hook program, the
> > # culprit may be unusual (or missing) environment variables.
>
>

--
# Time is unimportant, only life important!
## 面朝开源,我心自由!
Received on Sun Jan 8 14:32:33 2006

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.