PageRenderTime 64ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/category/mercurial/1/index.html

https://github.com/charleso/charleso.github.com
HTML | 294 lines | 262 code | 32 blank | 0 comment | 0 complexity | e938dcd33a65c1c0cbd04ac409dfcf45 MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  6. <title>Plunkett</title>
  7. <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="/feed" />
  8. <link rel="alternate" type="application/atom+xml" title="Atom 1.0"
  9. href="/feed/atom" />
  10. <link rel='stylesheet' href='/css/pygments_murphy.css' type='text/css' />
  11. <link rel='stylesheet' href='/css/site.css' type='text/css' />
  12. </head>
  13. <body>
  14. <div id="outer-wrapper">
  15. <div id="wrap2">
  16. <div id='header-wrapper'>
  17. <div class='header section' id='header'><div class='widget Header' id='Header1'>
  18. <div id='header-inner'>
  19. <div class='titlewrapper'>
  20. <h1 class='title'>
  21. Plunkett
  22. </h1>
  23. </div>
  24. <div class='descriptionwrapper'>
  25. <p class='description'><span>
  26. </span></p>
  27. </div>
  28. </div>
  29. </div></div>
  30. </div>
  31. <div id="content-wrapper">
  32. <div id="main-wrapper">
  33. <div id="main" class="main section">
  34. <div class="post hentry">
  35. <a name="the-dvcs-wars"></a>
  36. <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>
  37. <small>August 02, 2009 at 02:42 AM | categories:
  38. <a href='/category/dvcs'>dvcs</a>, <a href='/category/mercurial'>mercurial</a>, <a href='/category/git'>git</a>
  39. | <a href="http://blog.charleso.org/2009/08/git-vs-mercurial.html#disqus_thread">View Comments</a>
  40. </small><p/>
  41. <div class="post_prose">
  42. What is it about us nerds that dictates every discussion must be a war of some
  43. description? It isn't enough that we have two (or more) great technologies at
  44. our disposal, we also have to fight about it and of-course we have to be
  45. <a href="http://xkcd.com/386/">right</a>. For example the age-old conflict between
  46. Vi and Emacs seems to continue today, as passionately as ever. And why not?
  47. There's nothing like a good ol' fashioned flame war to get the blood pumping.
  48. <br /><br />
  49. This post, in all fairness, should really be called "Why I switched from
  50. Mercurial to Git". I actually quite like Mercurial and it was the original DVCS
  51. that opened my eyes to a world beyond SVN. Upon first hearing about the
  52. exciting concept of DVCS I knew that I needed to get my hands on one ASAP. But
  53. of course it couldn't just be <span>any</span> DVCS, it had to be the best one.
  54. So I did some more reading, scoured blogs for any material I could find on the
  55. topic so I could make the perfect choice. And I did. Only I picked the wrong
  56. perfect one...
  57. <br /><br />
  58. Mercurial has so many good things going for it. The command line is clean and
  59. simple, and for SVN escapees feels very much like home. It's written in Python,
  60. which helps on Windows, and has a nice plugin architecture. In addition it has
  61. a good balance of speed and size, not requiring any silly garbage collection.
  62. Oh how I used to laugh at those poor Git fools, why couldn't they see the folly
  63. of their ways. So what changed? I guess curiosity got the better of me. I read
  64. <a href="http://www.rockstarprogrammer.org/post/2008/apr/06/differences-between-mercurial-and-git/">one</a>
  65. <a href="http://thunk.org/tytso/blog/2007/03/24/git-and-hg/">too</a> many
  66. pro-Git articles and realised I might just be missing something.
  67. <br /><br />
  68. What makes Git worth switching too then? In short,
  69. <a href="http://keithp.com/blogs/Repository_Formats_Matter/">the repository format</a>.
  70. Everything else, in my opinion, is just porcelain. The defining moment for me
  71. was when I learnt about
  72. <a href="http://www.gitready.com/intermediate/2009/02/09/reflog-your-safety-net.html">reflog</a>.
  73. So anything I commit is safely backed-up for 90 days regardless of what I do to
  74. the visible history? Count me in!
  75. <br /><br />
  76. The safety net of Git's repository format in this respect is liberating.
  77. Commands like rebase are not so much 'modifying history' as modifying your view
  78. of history, because you can always retrieve the old version (within 90 days) if
  79. you need it again. On the other hand when you modify the history in Mercurial
  80. you <span>really are</span><span> </span>modifying the history. Whoops you've
  81. just stripped that commit from your repository; I hope you made a backup. This
  82. is one of those fundamental differences between Git and Mercurial, carefully
  83. <a href="http://www.nabble.com/Advocacy-vs.-git-tp23221258p23226084.html">considered</a>
  84. and implemented by their original designers. It means that in Git you have the
  85. trade-off of having to run a gc occasionally to remove those pesky unused
  86. objects. I'm cool with that if it means I get my reflog and a rebase that is
  87. 100% refundable, no questions asked. I should hastily add that I've never
  88. 'lost' a commit and I'm certainly not trying to suggest that Mercurial is
  89. unsafe. For me personally it's about that extra layer of comfort and freedom
  90. that Git provides.
  91. <br /><br />
  92. After that everything else seemed to just fall into place. I'd never really
  93. liked Mercurial's (previous) answer to local branches:
  94. <a href="http://mercurial.selenic.com/wiki/MqExtension">MQ</a>. Having to learn a
  95. whole new set of commands to essentially do the same thing. I kept forgetting
  96. which 'q' command did what. Why should I even <span>have </span>to remember
  97. different commands, why can't I just commit and rebase later? Of course I'm
  98. being simplistic here, and MQ is a very powerful tool, but what I really wanted
  99. was a way to work as normal and <span> </span>decide
  100. <a href="http://tomayko.com/writings/the-thing-about-git"><span>later</span></a>
  101. how to sync my changes.
  102. <br /><br />
  103. I find something strangely fascinating about version control, and I don't think
  104. I'm the only one either. It seems to be a topic that draws an unusual amount of
  105. attention, much to the
  106. <a href="http://www.nabble.com/gnome-dvcs-survey-results-tp21297884p21368916.html">continual</a>
  107. <a href="http://www.nabble.com/Re%3A-how-to-squash-commits-p23049314.html">annoyance</a>
  108. of their creators I'm sure. Like everything in life, there is no absolute right
  109. or wrong in regards to version control, as much as we'd like to argue there is
  110. [1]. What is perfect for someone may be hell for another. Many people have
  111. happily switched from Git to Mercurial, and while I think they're crazy I think
  112. I understand why. My rookie mistake was not playing with all the alternatives
  113. in the beginning. Git has turned out to be the ideal tool<span>
  114. </span>for<span> me</span>; it compliments the way I work and think in a way
  115. that Mercurial didn't or can't by design.
  116. <br /><br />
  117. [1] Unless of course you prefer Clearcase, in which case you're ugly and
  118. stupid. :-P
  119. </div>
  120. </div>
  121. <div class="after_post"><a href="http://blog.charleso.org/2009/08/git-vs-mercurial.html#disqus_thread">Read and Post Comments</a></div>
  122. <hr class="interblog" />
  123. </div>
  124. </div><!-- End Prose Block -->
  125. <div id="sidebar-wrapper">
  126. <div class="right_sidebar">
  127. <div id="sidebar" class="sidebar section">
  128. <h3>Me</h3>
  129. <ul>
  130. <li><a href="http://twitter.com/charlesofarrell/">Twitter</a></li>
  131. <li><a href="http://github.com/charleso/">Github</a></li>
  132. <li><a href="http://au.linkedin.com/in/charlesofarrell">Linkedin</a></li>
  133. <li><a href="http://cv.charleso.org/">CV</a></li>
  134. </ul>
  135. <h3>Blog Archive</h3>
  136. <ul>
  137. <li><a href="/2011/08/taste-of-scala.html">A Taste of Scala</a></li>
  138. <li><a href="/2011/05/java-is-the-new-cobol.html">Java is the new COBOL</a></li>
  139. <li><a href="/2011/05/blogofile.html">Blogofile</a></li>
  140. <li><a href="/2011/05/who-needs-documentation-anyway.html">Who needs documentation anyway?</a></li>
  141. <li><a href="/2011/05/java-logging.html">Java logging and per-user tracing</a></li>
  142. <li><a href="/2011/05/death-of-clearcase.html">Death of a Clearcase</a></li>
  143. <li><a href="/2009/08/git-vs-mercurial.html">The DVCS Wars</a></li>
  144. <li><a href="/2009/07/clearcase-strikes-back.html">ClearCase strikes back</a></li>
  145. <li><a href="/2008/10/clearcase-for-git.html">A Clearcase for Git</a></li>
  146. <li><a href="/2008/08/flex-o-matic.html">Flex-o-matic</a></li>
  147. </ul>
  148. <h3>Subscribe</h3>
  149. <ul>
  150. <li><a href="http://feeds.feedburner.com/charleso">Site RSS</a></li>
  151. </ul>
  152. <h3>Categories</h3>
  153. <ul>
  154. <li>
  155. <a href="/category/automated">automated&nbsp;(1)</a><!--a href="/category/automated/feed">rss</a-->
  156. </li>
  157. <li>
  158. <a href="/category/blogger">blogger&nbsp;(1)</a><!--a href="/category/blogger/feed">rss</a-->
  159. </li>
  160. <li>
  161. <a href="/category/blogofile">blogofile&nbsp;(1)</a><!--a href="/category/blogofile/feed">rss</a-->
  162. </li>
  163. <li>
  164. <a href="/category/clearcase">clearcase&nbsp;(3)</a><!--a href="/category/clearcase/feed">rss</a-->
  165. </li>
  166. <li>
  167. <a href="/category/cobol">cobol&nbsp;(1)</a><!--a href="/category/cobol/feed">rss</a-->
  168. </li>
  169. <li>
  170. <a href="/category/documentation">documentation&nbsp;(1)</a><!--a href="/category/documentation/feed">rss</a-->
  171. </li>
  172. <li>
  173. <a href="/category/dvcs">dvcs&nbsp;(2)</a><!--a href="/category/dvcs/feed">rss</a-->
  174. </li>
  175. <li>
  176. <a href="/category/flex">flex&nbsp;(1)</a><!--a href="/category/flex/feed">rss</a-->
  177. </li>
  178. <li>
  179. <a href="/category/git">git&nbsp;(4)</a><!--a href="/category/git/feed">rss</a-->
  180. </li>
  181. <li>
  182. <a href="/category/github">github&nbsp;(1)</a><!--a href="/category/github/feed">rss</a-->
  183. </li>
  184. <li>
  185. <a href="/category/java">java&nbsp;(3)</a><!--a href="/category/java/feed">rss</a-->
  186. </li>
  187. <li>
  188. <a href="/category/linux">linux&nbsp;(1)</a><!--a href="/category/linux/feed">rss</a-->
  189. </li>
  190. <li>
  191. <a href="/category/logback">logback&nbsp;(1)</a><!--a href="/category/logback/feed">rss</a-->
  192. </li>
  193. <li>
  194. <a href="/category/logging">logging&nbsp;(1)</a><!--a href="/category/logging/feed">rss</a-->
  195. </li>
  196. <li>
  197. <a href="/category/markup">markup&nbsp;(1)</a><!--a href="/category/markup/feed">rss</a-->
  198. </li>
  199. <li>
  200. <a href="/category/mercurial">mercurial&nbsp;(1)</a><!--a href="/category/mercurial/feed">rss</a-->
  201. </li>
  202. <li>
  203. <a href="/category/python">python&nbsp;(2)</a><!--a href="/category/python/feed">rss</a-->
  204. </li>
  205. <li>
  206. <a href="/category/restructuredtext">restructuredtext&nbsp;(1)</a><!--a href="/category/restructuredtext/feed">rss</a-->
  207. </li>
  208. <li>
  209. <a href="/category/scala">scala&nbsp;(1)</a><!--a href="/category/scala/feed">rss</a-->
  210. </li>
  211. <li>
  212. <a href="/category/svn">svn&nbsp;(1)</a><!--a href="/category/svn/feed">rss</a-->
  213. </li>
  214. <li>
  215. <a href="/category/wordpress">wordpress&nbsp;(1)</a><!--a href="/category/wordpress/feed">rss</a-->
  216. </li>
  217. </ul>
  218. </div>
  219. </div>
  220. </div>
  221. <div class="clear">&nbsp;</div>
  222. </div><!-- End Main Block -->
  223. <div id="footer">
  224. <p id="credits">
  225. Powered by <a href="http://www.blogofile.com">Blogofile</a>.<br/>
  226. <br/>
  227. RSS feeds for <a href="http://feeds.feedburner.com/charleso">Entries</a>
  228. and <a
  229. href="http://charleso.disqus.com/latest.rss">Comments</a>.
  230. <br>
  231. </p>
  232. <script type="text/javascript">
  233. //<![CDATA[
  234. (function() {
  235. var links = document.getElementsByTagName('a');
  236. var query = '?';
  237. for(var i = 0; i < links.length; i++) {
  238. if(links[i].href.indexOf('#disqus_thread') >= 0) {
  239. query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
  240. }
  241. }
  242. document.write('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/charleso/get_num_replies.js' + query + '"></' + 'script>');
  243. })();
  244. //]]>
  245. </script>
  246. <script type="text/javascript">
  247. //<![CDATA[
  248. var _gaq = _gaq || [];
  249. _gaq.push(['_setAccount', 'UA-23735205-1']);
  250. _gaq.push(['_trackPageview']);
  251. (function() {
  252. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  253. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  254. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  255. })();
  256. //]]>
  257. </script>
  258. </div> <!-- End Footer -->
  259. </div> <!-- End Content -->
  260. </div>
  261. </body>
  262. </html>