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

Re: post-commit/commit-email issue

From: Paul L Lussier <pll_at_lanminds.com>
Date: 2003-05-15 16:19:16 CEST

In a message dated: Wed, 14 May 2003 15:54:10 EDT
Chien-Lung Wu said:

>perl commit-email.pl "$REPOS" "$REV" cwu@deltartp.com?

Why are you invoking this as 'perl commit-email.pl...' ?

The /bin/sh environment may or may not pick up the path to the perl
executable (it should, but there are no guarantees), especially since
the environment invoking the post-commit hook is not a real user
environment with a robust PATH configuration.

I'd re-write this as:

        /path/to/commit-email.pl "$REPOS" "$REV" cwu@deltartp.com

I'm assuming here that the commit-email.pl script has a #!/path/to/perl
line at the top. If that's not the case, then do:

        /path/to/perl /path/to/commit-email.pl "$REPOS" "$REV" cwu@deltartp.com

just to be safe.

Of course, to avoid this in the future, you may want to create a
env.sh file which has things like PATH and other environment settings
in it, which then gets sourced by each pre/post commit-hook script.

That way, you can configure all your settings once for all your
scripts (and, even make conditional decisions about the environment
based on which hook is sourcing it).

Just my sysadmin $.000002 :)

-- 
Seeya,
Paul
--
Key fingerprint = 1660 FECC 5D21 D286 F853  E808 BB07 9239 53F1 28EE
	It may look like I'm just sitting here doing nothing,
   but I'm really actively waiting for all my problems to go away.
	 If you're not having fun, you're not doing it right!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 15 16:20:54 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.