tags:

views:

40

answers:

2

What I would like to do is point the webroot from my dev webserver to some dir that is in some way linked to svn so when I commit changes they will be automatically visible on my dev webserver.

Any clue how I can do this?

EDIT

i'm creating a django project so i'm justing the Django development server

+1  A: 

You can make your wwwroot a working copy of the svn repository, by checking it out from the server. To get the automatic updates working, you'll either have to look into a post-commit hook or have a cron job (or similar) run a task to update the wwwroot every X minutes or so.

Sander Rijken
Or you could have a continuous integration process listen for commits and update your working copy.
Rohith
Either method you choose, it would be beneficial to consider (assuming your server is Apache) using a .htaccess file to disallow access to the contents of your .svn directory.
Gary Chambers
+1  A: 

Generally, you will want to check your website out into a directory that you use as your web root, and then set up a Subversion post-commit hook that will check out the latest version into that directory every time someone commits a new version.

Brian Campbell
Exactly, the web server cannot look at VCS repository and decide which versions will be current for the website or even read them as php or css or html files. A simple way would be to script the process of checking out from the latest release to the target server and a more sophisticated way would be to go for CI (Continuous Integration) with a tool like Hudson.
PurplePilot