Sunday, March 22, 2009

Distributed revision control

As mentioned before I wanted to have versioning setup when getting into coding again. Subversion was a nice way of doing this while I was working on my stationary computer. I had pretty few overhead by Subversion since I only accessed it via "file://" instead of "svn://" of "http://" but this of course only works good as long as you only work on one computer.

My new toy

So the other day I got myself an old iBook (yes, iBook.... I said old :-) ). Mostly to be a bit more flexible. Having a laptop now changes the situation in regards to versioning. If I would always be in my network I could use it, but I want to use it somewhere else, too. So I found myself a couple of different options:
  • creating another Subversion repository on my laptop and manually copying back and forth
  • changing the Subversion access from file to ssh and configuring my router to be available over the internet
  • changing the Subversion access from file to ssh and not having versioning when not logged in my network
  • changing to a centrally available repository (not in my network)
I don't want my router and my pc to be running all time so option two is out. Option 1 means too much manual work and option three simply disqualifies itself by loosing the one thing that mattes to me.... versioning.

A new concept... at least for me
 
I got reminded of an article that I read some time ago. It was about decentralized / distributed versioning systems. Instead of one central repository that you need online to update your working copies, you can copy the repository to your local computer, work on it and later submit the changes back. All of this with keeping full history.
The idea sounded good as it would enable versioning on different computers, even when they are not connected.
Thinking about this more and more I got reminded that Linus Torvalds (creator / godfather of the Linux kernel) uses one of those systems because centralized systems wouldn't fit the needs.

After some surfing I chose Mercurial for a try. It's lightweight and runs on Mac OS X. The only bad thing about it, is that it does not have any Xcode integration. However it works (just as git probably). And I like it.

No comments: