Using Subversion on a live web site?

Using Subversion on a live web site?

Posted by: rtjohn
Posted on: 2009-08-07 10:00:00

Hi,

I work for a small building supply company with a custom online store which was developed by an outside consultant. He used to provide a development version of the site where we could make changes which were submitted via Subversion, and which would be reflected at the development site's url.

Since he is no longer providing this service I'm trying to set up a similar configuration. I've set up a hosting account here with Dreamhost, and I can upload our sites code to it and get it working. I can also set up a Subversion repository, but I can't get Dreamhost to serve the files in the repository as if they were just a normal website. When I visit the subversion repository in the browser it just shows me the content of the files, rather than running the php code or serving the html files as html.

Can anyone point me in the right direction to get things working the way I want them to?

Thanks!

Re: Using Subversion on a live web site?

Posted by: erikjacobsen
Posted on: 2009-08-07 12:27:00

You will have to check your files out of SVN, and then upload them to the directory for the website.

A simple advice is to make a subdirectory for SVN, different from the website. You may get conflicts if they are the same.

Re: Using Subversion on a live web site?

Posted by: Atropos7
Posted on: 2009-08-07 13:24:00

There is an expalantion of post-commit hook here:

http://subversion.tigris.org/faq.html#website-auto-update


Customer since 2000 cool openvein.org

Re: Using Subversion on a live web site?

Posted by: Atropos7
Posted on: 2009-08-08 12:45:00

In reply to:

Since he is no longer providing this service I'm trying to set up a similar configuration. I've set up a hosting account here with Dreamhost, and I can upload our sites code to it and get it working. I can also set up a Subversion repository, but I can't get Dreamhost to serve the files in the repository as if they were just a normal website. When I visit the subversion repository in the browser it just shows me the content of the files, rather than running the php code or serving the html files as html.


Think of the repository like a fancy zip file. If you want to use the files, you have to extract them. The repository is not meant to be used as a "working copy" itself. As with a zip file, when a developer commits a change "adds a file" then someone else can checkout a revision "extract a file". The difference is the repository is meant to track changes, not save space/package files up.




Customer since 2000 cool openvein.org

Tags: dreamhostsubversionphp codehtml filesright directionrepository