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

Re: Post-commit hook updating code on another machine?

From: Ryan Schmidt <subversion-2008b_at_ryandesign.com>
Date: Thu, 19 Jun 2008 23:19:57 -0500

On Jun 19, 2008, at 9:33 PM, Waynn Lue wrote:

> I have two machines, A and B. B serves live code for my website,
> and A hosts my repository. How can I use a post-commit hook to get
> code from A to B every time someone checks in code? My current
> solution involves wget and a php script that calls exec, which
> seems sub-optimal (and I'm having trouble getting it to work).

I suppose that depends on the facilities available in the operating
systems on the two machines.

If these are two *nix machines (Linux, *BSD, Mac OS X, etc.) then you
could "scp" or "rsync" the changes from A to B. Even easier, on B,
check out a working copy of the part that you want to have auto-
updated. Then, in the post-commit hook on A, run something like "ssh
B 'svn update /path/to/workingcopy'".

To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-06-20 06:20:48 CEST

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.