You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Philip Radford <ph...@chycor.com> on 2005/09/26 08:22:12 UTC
Commit to repository and send changes somewhere else
Hi all,
Can anyone recommend best working practices when using subversion with web development projects specifically with apache and php.
We have subversion up and running and our developers can extract a working copy to their local workstation hard drive (e.g. Drive C).
However when they commit their changes back to the repository I need to be able to also copy the change to our development server which is where apache is set to serve the files for testing purposes.
Is this something that can be done using subversion or by the use of a hook script. My initial research suggests a hook script but all samples, references seem to refer to only sending out an email and not anything else.
Any help or guidance on this will be greatly appreciated.
Regards
Philip Radford.
Re: Commit to repository and send changes somewhere else
Posted by Greg Thomas <th...@omc.bt.co.uk>.
On Mon, 26 Sep 2005 12:20:09 +0200, Ryan Schmidt
<su...@ryandesign.com> wrote:
>On Sep 26, 2005, at 10:22, Philip Radford wrote:
>
>> However when they commit their changes back to the repository I
>> need to be able to also copy the change to our development server
>> which is where apache is set to serve the files for testing purposes.
>
>It's a FAQ:
>
>http://subversion.tigris.org/faq.html#website-auto-update
>
>Note that I would expect developers to generally check in only
>working code.
Depending on the scenario, one might expect developers to check in
module tested code, ready for a wider system test. In which case, the
post-commit hook could be written to only update the WWW site when a
tag is created, which would typically be after a system test schedule.
Greg
--
This post represents the views of the author and does
not necessarily accurately represent the views of BT.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Commit to repository and send changes somewhere else
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 26, 2005, at 10:22, Philip Radford wrote:
> However when they commit their changes back to the repository I
> need to be able to also copy the change to our development server
> which is where apache is set to serve the files for testing purposes.
It's a FAQ:
http://subversion.tigris.org/faq.html#website-auto-update
Note that I would expect developers to generally check in only
working code. That means their working copy should also be under a
web server document root that they can use to test their code
*before* they commit it.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Commit to repository and send changes somewhere else
Posted by Ximon Eighteen <xi...@int.greenpeace.org>.
> Is this something that can be done using subversion or by the use of a hook script. My initial research suggests a hook script but all samples, references seem to refer to only sending out an email and not anything else.
I do this using a hook script and my content on the webserver is a
working copy checkout of the content in the subversion repository.
If the webserver is local to the subversion server (e.g. I use
Subversion to update the non-svn content server by my subversion powered
apache instance) then I do:-
cd /path/to/html/content/working/copy
svn update
If however your webserver is another machine you could use SSH to send a
remote update command, e.g.
ssh user@webserver "cd /path/to/html/working/copy ; svn update"
You'll probably want to setup automatic login (via .ssh/authorized_keys)
for ssh and use a limited privilege user just for the purpose. An
alternate approach is to use a timed svn update on the webserver in say
a cron job.
Ximon
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org