

This article attempts to translate my lengthy research among this mire into a helpful article suited to those entering the year 2009. While there are many articles about how to set up and use a source code control system, I found many were limited, dated, or uncompleted or they dealt with a much larger team approach to coding. In this article I'll describe how to transition from simply saving your code in folders on your computer, to using a revision control system which should safeguard your code and allow code "tinkering" without destructive or irreversible consequences.

Ultimately, this created too much extra work and sweat. Needless to say, I've lost work due to hardware failures, inadvertent deletion, and just plain "breaking" my working code.

Assuming you checked in everything you cared about before the move, you can simply delete your working copy and then re-fetch it using SVN Checkout.Though I've been programming computers as a hobby since 1980, most of this was done on single machines by myself. Assuming nothing has changed since you moved the repository, this should take just a few seconds to complete. In the dialog that comes up, enter the new location of the repository, and click OK. If you are using TortoiseSVN (and I’m sure there’s a command line tool for this as well, but I’m using Tortoise), you can simply right-click on your existing working copy folder and select TortoiseSVN –> Relocate. Of course, once the server is moved and you’ve shut down access to the old location, what do you do with your existing working copies that are linked to the old location? There are two options: The whole move with the above steps should require less than 15 minutes (unless transferring the files takes you longer than this due to their size and/or your bandwidth). My recommendation is to shut down the old location’s server (or set the specific repository’s permissions to just Everyone : No Access). I didn’t have to worry about this, but Pete also has info on what to do if someone commits to the old location while you’re in mid-move. Otherwise, you may panic when you see the load is done but only some of your repository has been restored. If you use VisualSVN to look at the repository as it is in mid-load, you may need to refresh it after the load is complete.

Svnadmin load /path/repositoryfolder < repositoryname.svn_dump
