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

Re: Updating a live website with a post-commit hook script

From: Ryan Schmidt <subversion-2006q2_at_ryandesign.com>
Date: 2006-06-30 12:48:47 CEST

On Jun 30, 2006, at 08:55, Bob Proulx wrote:

>> open (P, "/usr/bin/svnlook changed $REPOS|");
>> system("/usr/bin/svn up $working_dir/Website/$file");
> Lots of hard coded paths! If /usr/bin is not in path then there is a
> problem. Hard coded paths to programs have always come back to bite
> me. I recommend avoiding them.\

Um, since /usr/bin/svnlook is explicitly specified, /usr/bin does not
need to be within the path. This is in fact the whole point, because
in Subversion hooks, the path is not set, so you must use absolute
paths or it won't work. It might be better to define variables (or
constants, depending on language) for the programs used, right at the
top of the script, so that if you need to change the path, they're
all in one place.

The actual problem with the script above was that the svnlook command
is not passed the $REV argument.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jun 30 12:50:12 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.