Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is using distributed source control like Mercurial worthwhile for a team of one?

I currently use Subversion for my one-person software company. Is it worthwhile moving to Hg (Mercurial)? Or are the benefits only realisable with a multiperson team?

like image 489
Steve McLeod Avatar asked Nov 29 '22 11:11

Steve McLeod


2 Answers

I think it's worthwhile, even for a single person — but I'm sort of biased since I'm a Mercurial developer :-) Even if you never branch and merge, Mercurial is a better Subversion for the basic operations like commit and tag:

  • hg commit: very fast so you'll tend to make more fine-grained commits than with Subversion. A commit is also truly atomic in Mercurial since we have no mixed revisions. I count that as an advantage, but people may obviously disagree here.
  • hg tag: points to a specific point in the history, not a copy under /tags. The problem with Subversion tags is that the copy may or may not be identical to how /trunk looked at a specific revision. Subversion really has no built in tags, and while emulating them, it's possible to mess up in ways that you cannot do in Mercurial.

Because Mercurial is so fast, people are using it in different ways than you would use Subversion. A good example of this is hg bisect. You use it to find the first revision where a particular error is present. It works by binary search, where you halve the search interval in each step. You could definitely do this with Subversion too, but there are no built in support for it and it would be slower because you need to contact a server over the network.

The record extension is another really nice feature of Mercurial. It lets you commit only some of the modifications inside a file. This is nice since it lets you make small and self-contained commits.

like image 75
Martin Geisler Avatar answered Dec 04 '22 05:12

Martin Geisler


From my experience , Git and Mercurial are currently more suitable for open source project or small team or single person team. So, in your case, I would recommand them. Subversion is more suitable for big organizations that need centralized repo and more fine-grained access control.

like image 33
bo bo Avatar answered Dec 04 '22 04:12

bo bo