Tips for subversion setup


Diamond Member
Dec 24, 2000
We have 2 servers (server1 and server2). Our live site is on server1 and our "dev" area is on server2. I installed subversion on server2 and installed tortoisesvn on my local box which is a windows box. The idea is to have version control and eventually push out the code to server1 with a simple command (i.e. svn update).

It makes sense in my head if the user was on a local unix box and he/she checks it out on their box but the user doesnt have Unix and is using Windows. So if the user commits his/her changes from their windows box it pushes it out to the subversion repository on server1. BUT, someone still needs to go on server1 to run "svn update" to get the latest code so ppl can see what looks like.

Does this make sense?


Diamond Member
Jan 21, 2001
here is what you should do

setup with svn, pointing to a 3rd server that runs svn...project should be www or live or something like that
setup with svn, pointint to the 3rd server, project named wwwdev, dev, or something like that.

remember, SVN checks out the latest version, and copies it local. So OS doesn't matter. Then when you commit, it updates the files and bumps the rev. If someone commits a change with an older version, it should do resolution and ONLY update the lines of code they modified, or tell them it's not up to date.

Then, when you are happy with, you svn checkout the dev SVN, copy all those files to the www svn project, commit changes, and svn update the www server.

make sense?


Diamond Member
Jul 5, 2001
Lilcam - I've set up the exact same scenario that you have. Our office has a Live server for production code and a Dev server for testing code. Basically in your SVN repository you have a Dev folder and a Trunk folder.

Trunk is for production code and Dev is for code to be tested on Dev. On your Dev server in /var/www/<sitename> (or wherever your apache point to) you svn co <path to svn>/Dev .

Then on your Live server you svn co <path to svn over web>/Trunk .

Then for publishing files, we create Branches.

For each new project we do an svn copy from Trunk to a folder in Branch, say 243 (for fix 243) make the modifications there and commit them to the Branch folder. Then we cd into the directory that needs to be updated and svn merge -r <revision at which branch was created>:HEAD <path to Branch folder> Then you svn update in that directory and it is published.

I created a php front end to this so that my Project managers can publish files instead of bothering me with it, but that is the functionality out of the script. We also have revert functionality built into the script (in case a publish breaks something, it is trivially easy to revert those changes in a matter of seconds)

Let me know if this helped, or if you need more info.


Diamond Member
Jul 14, 2000
The first part of this is some very good tips on how to organize your repository. This is specific for TortoiseSVN but the concepts are universal no matter what svn client you use.