![]() ![]() Whether you install from source or from a binary, it’s important to at least know what version of Subversion each server is running. In our case, we have our source-server repository running Subversion 1.6.6 on Ubuntu Server 10.04 LTS, and I set up the free version of VisualSVN 2.06 (bundled with Subversion 1.6x) on a Windows 7 PC. More details in Chapter 9: Subversion Repository Mirroring in the SVN Book. Why? As of Subversion 1.7, you can now use svnsync with the new -allow-non-empty option, which is designed for exactly the situation of starting to sync a mirror when it already has content in it. I purposely downloaded an older version of VisualSVN 2.06 bundled with Subversion 1.6.17, and later found out I would’ve been better off running the latest VisualSVN 2.5.3 bundled with Subversion 1.7.3. Unfortunately, I didn’t realize that when I started. ![]() What’s interesting to note here is that unlike most database replication setups, with Subversion, it doesn’t matter too much what version the server is, or what platform you want to run it on. ![]() We’ll call that mirror-server from here on out. The first step is to set up a second Subversion server to be used as a mirror. We’ll call that source-server from now on. This guide assumes you’re already running Subversion on one server. Step One: Set up Subversion on a 2nd Server Following are the steps and a few gotchas I learned this week as I finally had a chance to set up a proper Subversion mirror replication slave server. If you’re familiar with master-slave database replication, Subversion repository replication is quite similar. The best way to do this is to create a mirror repository on another server, and use the svnsync program to create a replica of your primary Subversion repository, or repositories, if you have multiple. To extend the insurance metaphor, as great as it is having the code on your laptop backed up to a central Subversion server, it makes just as much sense to protect yourself from the possibility that your Subversion server’s hard drive will crash. Granted you can do the same thing with a master Git repository on or your own server in the cloud, but unlike Git, Subversion is meant to be run somewhere other than your laptop or workstation. Every time you commit, you’re sending that code to another server. One of the primary benefits of using Subversion as your SCM solution is that it’s like having an insurance policy against your local machine breaking, your laptop being stolen, or your hard drive crashing. That is, when you use Git to commit hundreds or even thousands of revisions to your local machine… what happens if your hard drive crashes? Unless you also have set up a remote repository and get familiar with pull requests and merges - Git actually requires a little more effort to get this big benefit - and it’s built into Subversion by design. Tons of developers love Git, and although Git does have some really great features when compared to Subversion, there’s one particular benefit to using Subversion that Git users rarely consider. An SCM is indispensable for any team of more than one developer, but it’s just as useful if you’re on your own. Both Git and Subversion are free to use, relatively simple to set up, and give you snapshots to go back to anytime you break something in your code. There are just too many great reasons for using version control. Source Code Management system, or SCM) as part of their workflow, I become a little shocked and horrified. Whenever I talk to another developer and find out they’re not using version control (a.k.a. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |