I love source control, but I tend not to use it for my “at-home” development for the simple fact that setting up a separate server is overkill, and I don’t like to have random server processes running on my personal machine. Unfortunately, this means that I lose out on my favorite use for source control – the ability to test and try out new code and features without worrying about screwing up the “main” development.
However, after recently spending a fair amount of time undoing and redoing some changes to a website I am working on, I have decided that enough is enough, and I set out to install a local source control system on my development computer.
Initially I decided to look into Git. It certainly seemed to fit my need, so I began to look into using it. It wasn’t long before I realized that I had to get a “special” version of git to run on my windows box. This was less than ideal for me, especially when began reading about how much work was left to be done on the Windows version. The last thing I need is an unstable version control system.
After having experienced a failure in my attempt to use the new and exciting tools (and yes, I am aware of Mercurial – it certainly seemed like a better fit for me), I decided to try to see if I could get the tried and true Subversion to do what I wanted. It took me all of about 5 minutes of searching to determine that I could in fact use subversion to access a local repository, with no need for for a server or network access.
This was perfect. I downloaded the Tortoise-SVN client, and sure enough there was an option right there in the client to create a local repository.

So I created a folder (“c:\svn”) off my root and created a repository there. All that was left was to import my existing files into the repository. Again, tortoise-svn made it simple. I navigated to the root of the project I wanted to add, selected the root folder, and chose the “import” item.

Unfortunately, this is where I hit my first snag. According to the documentation, to connect to a local repository, you simply use the “file://” protocol, followed by the full path to the desired repository directory (in my case, “c:\svn”). So, I attempted the url “file://c:\svn\”, but received an error:
Unable to open an ra_local session to URL
Unable to open repository ‘file://c:/svn/’
This was not a very helpful error. I knew the repository existed at the location “c:\svn”, but how could I connect to it? Looking online for the error message did not seem to provide much in the way of resolution for me, so I began to try various combinations of the protocol and the path. Finally, I found that “file://” plus “/svn/” successfully connected. In hind-sight it seemed obvious subversion would expect a linux-style notation, but the examples I found online all used a windows-style volume and path notation.
Once I had imported my existing data into the repository, all that remained was for me to check out a copy back into my original directory.

Clicking OK popped up a warning that the directory was not empty, which I accepted, and the files were all “checked out” from the repository and were ready to be worked on.
That’s all there was to it. I now have a fully working local source control client without the need for a server.