[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: Bob Proulx <bob_at_proulx.com>
Date: 2006-06-30 08:55:07 CEST

I. E. Smith-Heisters wrote:
> You can also get a bit more fancy about it. If you run "svn up" on the
> root of your working directory, it has to churn through the whole
> directory, which can take quite some time depending on the size of
> your codebase. Instead, you can use post-commit's arguments to
> specifically update files, which, IME, cuts the update time to about
> 1/10th of the time. Here's an example in Perl:

Very nice! Thanks for sharing that example. It definitely is more
efficient than my brute force example However I think as an example
the brute force one is more clear. Learn one and then expand to the
other? :-)

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

Thanks again for the script!
Bob

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