Published by breki on 11 Sep 2010 at 08:11 pm
Storing Your Source Code
UPDATE: I received a very helpful comment, which seems to invalidate some of my statements in the post. Be sure to read the comment. I’ll make further updates when I do some more investigating on the matter.
For the past three or four years I’ve been using Subversion installed on my local development machine. Initially I used a custom installation on Apache, which took me quite a few hours to set up (basically if you want to have more than one repository, Apache is a must). Later, after couple of years, I started using VisualSVN Server, which is a great free self-contained SVN server installation.
This all works great, but the biggest problem is accessing the repository from the outside world, both in terms of security and in terms of me not wanting to have my SVN repository computer running all of the time (I’m a believer in keeping machines turned off if you’re not using them).
On the other hand, I started using distributed VCS systems like git and Mercurial for my open-source projects. The biggest benefit I see in the fact that you keep your own repository on your development computer, so you can have the history of changes, which isn’t really an option when you’re working with SVN in an offline mode.
So I started thinking about experimenting with a commercial VCS hosting solution like Assembla or xp-dev.com for my closed-source projects. Apart from the decision on which provider to use (they both seem to get good reviews), the biggest question is: which VCS?
Although git and Mercurial are all the rage now, I don’t see much benefit in using them for a one-man projects on a VisualStudio platform. Let me explain why.
Integration With VisualStudio
I got so much used to AnkhSVN, that I simply cannot work without it. Renaming files, moving them around the solution, automatic refactoring using Resharper, that’s all handled pretty well by AnhkSVN. I still use TortoiseSVN for commits, but in VisualStudio, Ankh is the king. I never use SVN from the command line and I don’t need to. AnkhSVN is simply a great productivity booster.
And this is why using git or Mercurial is such a pain in VisualStudio. I frequently use “Rename class” refactoring in Resharper and it renames the class file, too. This gets undetected by git and Mercurial and I end up with “missing files” when committing.
Local Repositories
While having your own repositories on development computers is a truly great thing, not having them isn’t such an issue if your online SVN repository is available most of the time. And the problem with VS integration far outweighs other benefits of a distributed VCS when you’re running a one-man shop.
Decisions, Decisions…
So I’ll probably start using a commercial SVN hosting option, at least as a trial. Most of the providers offer limited free plans, so it’s a good place to start…



Face on 11 Sep 2010 at 21:24 #
FYI: Mercurial has VisualHg to cope with VisualStudio renames and refactoring. Git induces renames (most of the time), so it doesn’t need such integration at all.
Git/Hg have some advantages for one-man shops over SVN, too:
There are disadvantages, too: 1. No partial checkout. Shouldn’t matter too much if you are all local, though. 2. No “shallow” checkout – i.e. you have to clone everything, you can’t just get the last 10 commits or so. Shouldn’t matter if you’re local, too. 3. Distributed model is not good for binaries (uncompressable, unmergable). Again no biggy in the one-man case. BUT: ATM, both Git and Hg have problems with really big files in the repository, because they shove every file through memory. So the maximum file size is limited by system memory. SVN copes way better with them. 4. Can’t track empty directories. This could be a problem if you depend heavily on directory structures. A easy workaround are dummy-files…
Taking the above list into account I can’t see a reason for lone software developers to not use a DVCS. My advice for you (since you are talking about VisualStudio: Windows) would be a setup with TortoiseHg and VisualHg, hosting on BitBucket on a free plan (1GB space, 1 free private repo, unlimited public repos).
igorbrejc.net » Storing Your Source Code « Amazing Source on 11 Sep 2010 at 22:13 #
[...] On the other hand, I started using distributed VCS systems like git and Mercurial for my open-source projects. The biggest benefit I see in the fact that you keep your own repository on your development computer, so you can have the … source codes – Google Blog Search [...]
breki on 12 Sep 2010 at 11:00 #
@Face,
Thanks very much for you comment. I didn’t know about VisualHG, looks like I was searching in the wrong direction (looking for something like AnkhHG
). And your points about Hg/git’s advantages are very interesting, I must admit I wasn’t aware about some of them.
I’m already using bitbucket for some public repos, I’ll give VisualHG a go with them.