/category/mercurial/1/index.html
HTML | 294 lines | 262 code | 32 blank | 0 comment | 0 complexity | e938dcd33a65c1c0cbd04ac409dfcf45 MD5 | raw file
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-
- <title>Plunkett</title>
- <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="/feed" />
- <link rel="alternate" type="application/atom+xml" title="Atom 1.0"
- href="/feed/atom" />
- <link rel='stylesheet' href='/css/pygments_murphy.css' type='text/css' />
- <link rel='stylesheet' href='/css/site.css' type='text/css' />
- </head>
- <body>
- <div id="outer-wrapper">
- <div id="wrap2">
-
- <div id='header-wrapper'>
- <div class='header section' id='header'><div class='widget Header' id='Header1'>
- <div id='header-inner'>
- <div class='titlewrapper'>
- <h1 class='title'>
- Plunkett
- </h1>
- </div>
- <div class='descriptionwrapper'>
- <p class='description'><span>
- </span></p>
- </div>
- </div>
- </div></div>
- </div>
- <div id="content-wrapper">
- <div id="main-wrapper">
- <div id="main" class="main section">
-
-
- <div class="post hentry">
- <a name="the-dvcs-wars"></a>
- <h3 class="post-title entry-title"><a href="/2009/08/git-vs-mercurial.html" rel="bookmark" title="Permanent Link to The DVCS Wars">The DVCS Wars</a></h2>
- <small>August 02, 2009 at 02:42 AM | categories:
- <a href='/category/dvcs'>dvcs</a>, <a href='/category/mercurial'>mercurial</a>, <a href='/category/git'>git</a>
- | <a href="http://blog.charleso.org/2009/08/git-vs-mercurial.html#disqus_thread">View Comments</a>
- </small><p/>
- <div class="post_prose">
-
-
- What is it about us nerds that dictates every discussion must be a war of some
- description? It isn't enough that we have two (or more) great technologies at
- our disposal, we also have to fight about it and of-course we have to be
- <a href="http://xkcd.com/386/">right</a>. For example the age-old conflict between
- Vi and Emacs seems to continue today, as passionately as ever. And why not?
- There's nothing like a good ol' fashioned flame war to get the blood pumping.
- <br /><br />
- This post, in all fairness, should really be called "Why I switched from
- Mercurial to Git". I actually quite like Mercurial and it was the original DVCS
- that opened my eyes to a world beyond SVN. Upon first hearing about the
- exciting concept of DVCS I knew that I needed to get my hands on one ASAP. But
- of course it couldn't just be <span>any</span> DVCS, it had to be the best one.
- So I did some more reading, scoured blogs for any material I could find on the
- topic so I could make the perfect choice. And I did. Only I picked the wrong
- perfect one...
- <br /><br />
- Mercurial has so many good things going for it. The command line is clean and
- simple, and for SVN escapees feels very much like home. It's written in Python,
- which helps on Windows, and has a nice plugin architecture. In addition it has
- a good balance of speed and size, not requiring any silly garbage collection.
- Oh how I used to laugh at those poor Git fools, why couldn't they see the folly
- of their ways. So what changed? I guess curiosity got the better of me. I read
- <a href="http://www.rockstarprogrammer.org/post/2008/apr/06/differences-between-mercurial-and-git/">one</a>
- <a href="http://thunk.org/tytso/blog/2007/03/24/git-and-hg/">too</a> many
- pro-Git articles and realised I might just be missing something.
- <br /><br />
- What makes Git worth switching too then? In short,
- <a href="http://keithp.com/blogs/Repository_Formats_Matter/">the repository format</a>.
- Everything else, in my opinion, is just porcelain. The defining moment for me
- was when I learnt about
- <a href="http://www.gitready.com/intermediate/2009/02/09/reflog-your-safety-net.html">reflog</a>.
- So anything I commit is safely backed-up for 90 days regardless of what I do to
- the visible history? Count me in!
- <br /><br />
- The safety net of Git's repository format in this respect is liberating.
- Commands like rebase are not so much 'modifying history' as modifying your view
- of history, because you can always retrieve the old version (within 90 days) if
- you need it again. On the other hand when you modify the history in Mercurial
- you <span>really are</span><span> </span>modifying the history. Whoops you've
- just stripped that commit from your repository; I hope you made a backup. This
- is one of those fundamental differences between Git and Mercurial, carefully
- <a href="http://www.nabble.com/Advocacy-vs.-git-tp23221258p23226084.html">considered</a>
- and implemented by their original designers. It means that in Git you have the
- trade-off of having to run a gc occasionally to remove those pesky unused
- objects. I'm cool with that if it means I get my reflog and a rebase that is
- 100% refundable, no questions asked. I should hastily add that I've never
- 'lost' a commit and I'm certainly not trying to suggest that Mercurial is
- unsafe. For me personally it's about that extra layer of comfort and freedom
- that Git provides.
- <br /><br />
- After that everything else seemed to just fall into place. I'd never really
- liked Mercurial's (previous) answer to local branches:
- <a href="http://mercurial.selenic.com/wiki/MqExtension">MQ</a>. Having to learn a
- whole new set of commands to essentially do the same thing. I kept forgetting
- which 'q' command did what. Why should I even <span>have </span>to remember
- different commands, why can't I just commit and rebase later? Of course I'm
- being simplistic here, and MQ is a very powerful tool, but what I really wanted
- was a way to work as normal and <span> </span>decide
- <a href="http://tomayko.com/writings/the-thing-about-git"><span>later</span></a>
- how to sync my changes.
- <br /><br />
- I find something strangely fascinating about version control, and I don't think
- I'm the only one either. It seems to be a topic that draws an unusual amount of
- attention, much to the
- <a href="http://www.nabble.com/gnome-dvcs-survey-results-tp21297884p21368916.html">continual</a>
- <a href="http://www.nabble.com/Re%3A-how-to-squash-commits-p23049314.html">annoyance</a>
- of their creators I'm sure. Like everything in life, there is no absolute right
- or wrong in regards to version control, as much as we'd like to argue there is
- [1]. What is perfect for someone may be hell for another. Many people have
- happily switched from Git to Mercurial, and while I think they're crazy I think
- I understand why. My rookie mistake was not playing with all the alternatives
- in the beginning. Git has turned out to be the ideal tool<span>
- </span>for<span> me</span>; it compliments the way I work and think in a way
- that Mercurial didn't or can't by design.
- <br /><br />
- [1] Unless of course you prefer Clearcase, in which case you're ugly and
- stupid. :-P
- </div>
- </div>
- <div class="after_post"><a href="http://blog.charleso.org/2009/08/git-vs-mercurial.html#disqus_thread">Read and Post Comments</a></div>
- <hr class="interblog" />
- </div>
- </div><!-- End Prose Block -->
- <div id="sidebar-wrapper">
-
- <div class="right_sidebar">
- <div id="sidebar" class="sidebar section">
- <h3>Me</h3>
- <ul>
- <li><a href="http://twitter.com/charlesofarrell/">Twitter</a></li>
- <li><a href="http://github.com/charleso/">Github</a></li>
- <li><a href="http://au.linkedin.com/in/charlesofarrell">Linkedin</a></li>
- <li><a href="http://cv.charleso.org/">CV</a></li>
- </ul>
- <h3>Blog Archive</h3>
- <ul>
- <li><a href="/2011/08/taste-of-scala.html">A Taste of Scala</a></li>
- <li><a href="/2011/05/java-is-the-new-cobol.html">Java is the new COBOL</a></li>
- <li><a href="/2011/05/blogofile.html">Blogofile</a></li>
- <li><a href="/2011/05/who-needs-documentation-anyway.html">Who needs documentation anyway?</a></li>
- <li><a href="/2011/05/java-logging.html">Java logging and per-user tracing</a></li>
- <li><a href="/2011/05/death-of-clearcase.html">Death of a Clearcase</a></li>
- <li><a href="/2009/08/git-vs-mercurial.html">The DVCS Wars</a></li>
- <li><a href="/2009/07/clearcase-strikes-back.html">ClearCase strikes back</a></li>
- <li><a href="/2008/10/clearcase-for-git.html">A Clearcase for Git</a></li>
- <li><a href="/2008/08/flex-o-matic.html">Flex-o-matic</a></li>
- </ul>
- <h3>Subscribe</h3>
- <ul>
- <li><a href="http://feeds.feedburner.com/charleso">Site RSS</a></li>
- </ul>
- <h3>Categories</h3>
- <ul>
- <li>
- <a href="/category/automated">automated (1)</a><!--a href="/category/automated/feed">rss</a-->
- </li>
- <li>
- <a href="/category/blogger">blogger (1)</a><!--a href="/category/blogger/feed">rss</a-->
- </li>
- <li>
- <a href="/category/blogofile">blogofile (1)</a><!--a href="/category/blogofile/feed">rss</a-->
- </li>
- <li>
- <a href="/category/clearcase">clearcase (3)</a><!--a href="/category/clearcase/feed">rss</a-->
- </li>
- <li>
- <a href="/category/cobol">cobol (1)</a><!--a href="/category/cobol/feed">rss</a-->
- </li>
- <li>
- <a href="/category/documentation">documentation (1)</a><!--a href="/category/documentation/feed">rss</a-->
- </li>
- <li>
- <a href="/category/dvcs">dvcs (2)</a><!--a href="/category/dvcs/feed">rss</a-->
- </li>
- <li>
- <a href="/category/flex">flex (1)</a><!--a href="/category/flex/feed">rss</a-->
- </li>
- <li>
- <a href="/category/git">git (4)</a><!--a href="/category/git/feed">rss</a-->
- </li>
- <li>
- <a href="/category/github">github (1)</a><!--a href="/category/github/feed">rss</a-->
- </li>
- <li>
- <a href="/category/java">java (3)</a><!--a href="/category/java/feed">rss</a-->
- </li>
- <li>
- <a href="/category/linux">linux (1)</a><!--a href="/category/linux/feed">rss</a-->
- </li>
- <li>
- <a href="/category/logback">logback (1)</a><!--a href="/category/logback/feed">rss</a-->
- </li>
- <li>
- <a href="/category/logging">logging (1)</a><!--a href="/category/logging/feed">rss</a-->
- </li>
- <li>
- <a href="/category/markup">markup (1)</a><!--a href="/category/markup/feed">rss</a-->
- </li>
- <li>
- <a href="/category/mercurial">mercurial (1)</a><!--a href="/category/mercurial/feed">rss</a-->
- </li>
- <li>
- <a href="/category/python">python (2)</a><!--a href="/category/python/feed">rss</a-->
- </li>
- <li>
- <a href="/category/restructuredtext">restructuredtext (1)</a><!--a href="/category/restructuredtext/feed">rss</a-->
- </li>
- <li>
- <a href="/category/scala">scala (1)</a><!--a href="/category/scala/feed">rss</a-->
- </li>
- <li>
- <a href="/category/svn">svn (1)</a><!--a href="/category/svn/feed">rss</a-->
- </li>
- <li>
- <a href="/category/wordpress">wordpress (1)</a><!--a href="/category/wordpress/feed">rss</a-->
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="clear"> </div>
- </div><!-- End Main Block -->
- <div id="footer">
-
- <p id="credits">
- Powered by <a href="http://www.blogofile.com">Blogofile</a>.<br/>
- <br/>
- RSS feeds for <a href="http://feeds.feedburner.com/charleso">Entries</a>
- and <a
- href="http://charleso.disqus.com/latest.rss">Comments</a>.
- <br>
- </p>
- <script type="text/javascript">
- //<![CDATA[
- (function() {
- var links = document.getElementsByTagName('a');
- var query = '?';
- for(var i = 0; i < links.length; i++) {
- if(links[i].href.indexOf('#disqus_thread') >= 0) {
- query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
- }
- }
- document.write('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/charleso/get_num_replies.js' + query + '"></' + 'script>');
- })();
- //]]>
- </script>
- <script type="text/javascript">
- //<![CDATA[
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-23735205-1']);
- _gaq.push(['_trackPageview']);
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
- //]]>
- </script>
- </div> <!-- End Footer -->
- </div> <!-- End Content -->
- </div>
- </body>
- </html>