Issue
I am web developer who currently works mostly on his own but, some projects require outside coding help (my brother.) Anyway, after running in to the problem of "working on the same files" and "saving over each others edits" I decided to research ways to avoid this.
Through the help of stackoverflow I decided on subversion. My setup is the following: A windows 2008 server with a clean install. My desktop which is on the local network of the server. Then my brothers desktop which is at his house, not on lan. We both prefer to use netbeans for development.
My Questions:
How do we set this thing up correctly and most optimally. Here is my current setup and work flow.
dev site: in the past I just created sub domains with my web host for test sites (company1.bythepixel.com, company2.bythepixel.com), and editted those sites with netbeans set up having remote sources (ftp). how do i set up my netbeans now? should I set it up with remote sources? I guess I may need to set up a web server on my local server. I'm just not sure of the work flow. When i hit save in netbeans.. will it update the repository.. then do i need to update the site from the repository somehow?
live site: when going live, i would just copy all the files from the dev site into the live site. from what i gather i should be able to update the site from the dev repository?
Currently I am toying with VisualSVN Server (https://www.visualsvn.com/server/) on my local server. It looks like it is set up to use the http protocol. Is there advantages to this or should I consider something that does the file//. Do you recommend any other subversion software that would run on my 2008 box?
how will my brother connect? should i set up a permanent vpn from his house to mine? suggestions?
(not that important) how do I deal with databases, there anyway to do subversion on database?
I know I have a lot of questions and I am trying to read / make sense of the free online subversion book, but its all so overwhelming! Wish there was a small subversion for dummies guide :)
Solution
You work as normal in Netbeans until you decide that you want to commit your changes to Subversion, or update your working copy with revisions that have been committed by other users.
You would be able to update the live site from the dev repository - you need a Subversion client on the live site's host machine to do this.
The mod_dav_svn plugin for apache2 allows access to a Subversion repository over the web. I haven't used VisualSVN Server as I've always used Apache. It probably has everything you need and might be easier to set up. I've used TortoiseSVN as a Subversion client in the past and found it useful.
If you secure your web server your brother could connect over HTTPS, but VPN would work just as well and might be easier to set up securely.
Subversion can store its data in BerkelyDB, however I have always used a file system repository (FSFS) and found this to be fine.
There are beginners' guides to Subversion, e.g. from the Pragmatic Programmers bookshelf, and O'Reilly.
Answered By - richj