Why is Kiln supporting Mercurial over Git (or another SCM) - Kiln Knowledge Exchange most recent 30 from http://kiln.stackexchange.com2013-05-25T15:26:31Zhttp://kiln.stackexchange.com/feeds/question/187http://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://kiln.stackexchange.com/questions/187/why-is-kiln-supporting-mercurial-over-git-or-another-scmWhy is Kiln supporting Mercurial over Git (or another SCM)beewoolie2009-10-23T23:57:23Z2013-03-25T20:21:22Z
<p>I'm not asking the question "why don't you support my favorite feature X?". Instead, I'm interested to understand the decision. If there is something that I don't know about Mercurial (or Git for that matter), I'd like to know as I may counsel my teams to use Mercurial instead of Git.</p>
<p>I get a lot of push-back from the developers on Git. We know that SVN is a poor choice for what we do. We know that we need bona fide branching. What about Mercurial made it the choice for the first implementation?</p>
http://kiln.stackexchange.com/questions/187/why-is-kiln-supporting-mercurial-over-git-or-another-scm/189#189Answer by Benjamin Pollack for Why is Kiln supporting Mercurial over Git (or another SCM)Benjamin Pollack2009-10-24T19:17:30Z2013-03-25T20:21:22Z<p>UPDATE: Kiln Harmony now supports both Git and Mercurial, natively, with the same repositories! Read more <a href="http://fogcreek.com/kiln" rel="nofollow">here</a>.</p>
<p>When you ask why Kiln chose Mercurial, there's really two questions:</p>
<ol>
<li>Why is Kiln based around a DVCS?</li>
<li>Why did Kiln choose Mercurial, specifically?</li>
</ol>
<h2>Why is Kiln based around a DVCS?</h2>
<p>Because <strong>DVCSes provide real branching</strong>. As you know, managing branches in Subversion, CVS, and similar tools inevitably proves to be an extremely frustrating experience. Because Subversion before 1.5 does not record merge history at all, and even the most recent versions cannot use that metadata constructively, merging always ends up being an incredibly labor-intensive, error-filled process. As such, maintaining branches, even if technically possible, ends up being such an incredible pain that developers generally try to avoid using branches at all costs. Instead, what inevitably ends up happening is you end up with developers always developing in trunk, and, on rare occasion, making "branches" that are little more than snapshots of your point releases.</p>
<p>All of the modern, DAG-based DVCSes, including Git, Mercurial, and Bazaar, know exactly when and where you last merged. They have special "merge" objects in their histories, and even <em>bring over the history of everything you're merging in</em>. As a result, they can trivially handle complicated merges automatically that cause Subversion and similar tools to vomit, and you yourself can trivially see, at any point, what you have and have no merged between branches.</p>
<p>And why does that matter? Because real software shops have to maintain several versions of a product simultaneously. Just because you shipped version 2.0 doesn't (usually) mean that you can quit providing support for version 1.0. In a classic VCS, such as Subversion, you've got to make separate commits to the bug fix on every branch you care about. There won't be any direct indication that it's the same fix in both versions, no way to track what fixes got merged and when. Verifying that any given feature actually got in becomes complicated.</p>
<p>In a DVCS, that's not true. Merging goes easy, because the tool knows what you want to merge. Verifying that the bug fixes to 1.0 ended up in 2.0 is as easy as making sure that the commits from 1.0 appear in 2.0. Parallel development suddenly becomes really easy.</p>
<p>This is the killer feature that we believe make <em>all</em> DVCSes awesome, and a <em>huge</em> step forwards from tools like Subversion and CVS. And it's why Fog Creek has decided to place itself solidly in the DVCS proponent camp with Kiln. </p>
<h2>Why did Kiln choose Mercurial over other DVCSes, such as Git?</h2>
<p>We'll be honest: we love Git. It's ridiculously fast, the Ruby community loves it, it's powerful enough to handle massive projects like the Linux kernel, and it has a really cool community built up around sites like GitHub, which is kind of like a Facebook for developers.</p>
<p>But we also like Mercurial. It's nearly as fast as Git, it's really extensible, it has <a href="http://tortoisehg.bitbucket.org/" rel="nofollow">really great Linux and Windows GUIs</a>, it also manages really big projects like Firefox, Python, Java's OpenJDK, and OpenSolaris, and it has a really awesome community of its own through Google Code and Bitbucket.</p>
<p>In fact, both Mercurial and Git are so close from a features perspective that we honestly don't understand the bickering. They're both DAG-based DVCSes. They both do kickass merges, they both have the same geek features<a href="http://fogcreek.com/kiln" rel="nofollow">1</a>, they both have big community support (such as Linux, Ruby, and X for Git, or Python, Java, and Google for Mercurial), they're both ridiculously fast. Really, it comes down to personal preference.</p>
<p>So, really, both tools are absolutely awesome. In fact, we're pretty convinced that if you like one, you'll probably like the other--and that if you're using a tool like Subversion, using either would be a tremendous improvement. But, at the end of the day, we had to pick one to base Kiln on, at least for the initial release, and after a lot of looking around, we think that Mercurial's a bit easier-to-use for people new to DVCSes, without sacrificing any of the power of Git.</p>
<p>The important thing, from where we sit, is to help usher in the DVCS revolution. The exact tool people use doesn't really matter so much. We personally have a slight preference for Mercurial, others have a slight preference for Git. Focus on DVCSes vs. the monolithic tools; the rest isn't really that relevant.</p>
<p><a href="http://fogcreek.com/kiln" rel="nofollow">1</a> Those geek features include things like rebasing (<code>git rebase</code> and <code>hg rebase</code>), partial commits (Git index and <code>hg record</code>), history editing (<code>git rebase --interactive</code> and Mercurial's ridiculously powerful MQ facility), signed patches, and so on. Seriously, there's equivalents for basically everything in one tool and the other.</p>
http://kiln.stackexchange.com/questions/187/why-is-kiln-supporting-mercurial-over-git-or-another-scm/4760#4760Answer by Arthur for Why is Kiln supporting Mercurial over Git (or another SCM)Arthur2012-04-30T14:25:57Z2012-04-30T14:25:57Z<p>I agree that Git and Mercurial are very similar and enjoy both. I think my "slight preference for Git" comes from the different way in which each handles changesets. Mercurial requires you to instruct it to forget changed files that are not in your .hgignore file. Git takes a more proactive approach in that it requires you to add any changed files to your next commit. I think Git's approach is superior in that it is more explicit. I've also found merges with Git to be far smoother, but I can't substantiate that.</p>
http://kiln.stackexchange.com/questions/187/why-is-kiln-supporting-mercurial-over-git-or-another-scm/5114#5114Answer by Matt for Why is Kiln supporting Mercurial over Git (or another SCM)Matt2013-02-25T18:49:35Z2013-02-25T18:49:35Z<p><a href="http://qa.debian.org/popcon-graph.php?packages=git%20mercurial%20bazaar&show_installed=on&show_vote=on&want_legend=on&want_ticks=on&from_date&to_date&hlght_date&date_fmt=%25Y-%25m&beenhere=1" rel="nofollow">http://qa.debian.org/popcon-graph.php?packages=git%20mercurial%20bazaar&show_installed=on&show_vote=on&want_legend=on&want_ticks=on&from_date&to_date&hlght_date&date_fmt=%25Y-%25m&beenhere=1</a></p>