<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Mercurial on Craig Pardey</title>
    <link>https://www.craigpardey.com/tags/mercurial/</link>
    <description>Recent content in Mercurial on Craig Pardey</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 26 Mar 2013 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.craigpardey.com/tags/mercurial/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>hg clone fails with 255 error</title>
      <link>https://www.craigpardey.com/post/2013-03-26-hg-clone-fails-with-255-error/</link>
      <pubDate>Tue, 26 Mar 2013 00:00:00 +0000</pubDate>
      <guid>https://www.craigpardey.com/post/2013-03-26-hg-clone-fails-with-255-error/</guid>
      <description>&lt;p&gt;I recently encountered an issue with cloning a Mercurial repository where it&#xA;would fail with an obtuse error stating that &amp;ldquo;&lt;code&gt;[command returned code 255 Mon Mar 25 11:39:55 2013]&lt;/code&gt;&amp;rdquo;. My initial Googling implied that this was caused by a&#xA;server timeout but the problem persisted even after increasing the timeout on&#xA;our Apache web server.&lt;/p&gt;&#xA;&lt;p&gt;The clone was always failing on one particular file - a 600Mb binary. (Don&amp;rsquo;t&#xA;ask&amp;hellip;)&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to show which .hgrc Mercurial is using</title>
      <link>https://www.craigpardey.com/post/2012-11-22-how-to-show-which-hgrc-mercurial-is-using/</link>
      <pubDate>Thu, 22 Nov 2012 00:00:00 +0000</pubDate>
      <guid>https://www.craigpardey.com/post/2012-11-22-how-to-show-which-hgrc-mercurial-is-using/</guid>
      <description>&lt;p&gt;Mercurial loads a bunch of different configuration files and overlays their&#xA;values on top of each other. The &lt;a href=&#34;http://www.selenic.com/mercurial/hgrc.5.html&#34;&gt;hgrc man&#xA;page&lt;/a&gt; shows the order in which&#xA;these files are loaded.&lt;/p&gt;&#xA;&lt;p&gt;I encountered an issue recently where I knew that hg was using an erroneous&#xA;setting but I had no idea where the setting was coming from.&lt;/p&gt;&#xA;&lt;p&gt;The magic answer is&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;hg --debug showconfig  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This will output all the current settings, along with the name of the file&#xA;that it got each setting from. Very useful indeed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to take local in Mercurial without a merge conflict</title>
      <link>https://www.craigpardey.com/post/2012-11-12-how-to-take-local-in-mercurial-without-a-merge-conflict/</link>
      <pubDate>Mon, 12 Nov 2012 00:00:00 +0000</pubDate>
      <guid>https://www.craigpardey.com/post/2012-11-12-how-to-take-local-in-mercurial-without-a-merge-conflict/</guid>
      <description>&lt;p&gt;When there&amp;rsquo;s a merge conflict in Mercurial, TortoiseHG will give you the&#xA;option to &amp;rsquo;take local&amp;rsquo; or &amp;rsquo;take other&amp;rsquo; in addition to resolving the conflict.&lt;/p&gt;&#xA;&lt;p&gt;However, sometimes you may want to &amp;rsquo;take local&amp;rsquo; or &amp;rsquo;take other&amp;rsquo; when there&amp;rsquo;s&#xA;&lt;em&gt;no&lt;/em&gt; merge conflict.&lt;/p&gt;&#xA;&lt;p&gt;To take local:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;hg merge --tool internal:local &amp;lt;rev&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;To take other:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;hg merge --tool internal:other &amp;lt;rev&amp;gt;  &#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Slow Mercurial clone</title>
      <link>https://www.craigpardey.com/post/2012-10-25-slow-mercurial-clone/</link>
      <pubDate>Thu, 25 Oct 2012 00:00:00 +0000</pubDate>
      <guid>https://www.craigpardey.com/post/2012-10-25-slow-mercurial-clone/</guid>
      <description>&lt;p&gt;I recently set up a Mercurial server (Windows, Apache, ActiveDirectory and&#xA;hgweb.wsgi). However, cloning our 1Gb repository took an hour or more and&#xA;often failed.&lt;/p&gt;&#xA;&lt;p&gt;The only information in the Apache log was&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;mod_wsgi (pid=1234: Exception occurred processing WSGI script&#xA;&#39;C:/hg/hgweb/hgweb.wsgi&#39;  &#xA;IOError: failed to write data  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The solution was to disable compression by adding the following lines to&#xA;hgweb.config&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;[server]  &#xA;preferuncompressed = true  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;By default, Mercurial will compress everything before sending it down the&#xA;pipe. This makes sense if you have a powerful server and a slow network, but&#xA;the opposite was true for us - Mercurial&amp;rsquo;s hosted on an old dual-core Windows&#xA;VM connected to a 1Gb corporate LAN.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mercurial ignore file for Maven projects</title>
      <link>https://www.craigpardey.com/post/2012-06-21-mercurial-ignore-file-for-maven-projects/</link>
      <pubDate>Thu, 21 Jun 2012 00:00:00 +0000</pubDate>
      <guid>https://www.craigpardey.com/post/2012-06-21-mercurial-ignore-file-for-maven-projects/</guid>
      <description>&lt;p&gt;I find it hard to remember all the .hgignore settings for a new Mercurial&#xA;repository that I need, so here&amp;rsquo;s a bootstrap version&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;syntax: glob&#xA;.hgignore&#xA;*/target/**&#xA;*/.settings/**&#xA;*/.classpath&#xA;*/.project&#xA;*.log&#xA;*.orig&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Tools of the trade</title>
      <link>https://www.craigpardey.com/post/2011-07-11-tools-of-the-trade/</link>
      <pubDate>Mon, 11 Jul 2011 00:00:00 +0000</pubDate>
      <guid>https://www.craigpardey.com/post/2011-07-11-tools-of-the-trade/</guid>
      <description>&lt;p&gt;Many large companies have explicit policies around which development tools to&#xA;use. For example, &amp;ldquo;Here at Really Big Corporation we use CVS, Ant and&#xA;Eclipse&amp;rdquo;. I understand that companies need to limit the proliferation of tools&#xA;to ensure familiarity and supportability, but sometimes a little flexibility&#xA;would be nice.&lt;/p&gt;&#xA;&lt;p&gt;When I hire a tradesman to do work on my house I don&amp;rsquo;t tell him that we use&#xA;handsaws here, not tablesaws. I trust him to use the tools that make him the&#xA;most productive.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mercurial changes how you work</title>
      <link>https://www.craigpardey.com/post/2010-03-09-mercurial-changes-how-you-work/</link>
      <pubDate>Tue, 09 Mar 2010 00:00:00 +0000</pubDate>
      <guid>https://www.craigpardey.com/post/2010-03-09-mercurial-changes-how-you-work/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently started using &lt;a href=&#34;http://mercurial.selenic.com/&#34;&gt;Mercurial&lt;/a&gt;, which&#xA;is a &lt;a href=&#34;http://en.wikipedia.org/wiki/Distributed_revision_control&#34;&gt;distributed version control&#xA;system&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;DVCSs initially struck me as a solution looking for a problem. SubVersion&#xA;seemed good enough for our purposes at work, but we decided to try out&#xA;Mercurial for one iteration to see what all the fuss was about.&lt;/p&gt;&#xA;&lt;p&gt;Perhaps the most significant difference between SubVersion and Mercurial is&#xA;that Mercurial uses a local repository. This subtle distinction significantly&#xA;changes how you work because you can commit your changes without having to&#xA;publish them. A &amp;lsquo;commit&amp;rsquo; in Mercurial is like a savepoint in database-speak -&#xA;it gives you a safe place to roll back to if things go awry. Once you&amp;rsquo;re happy&#xA;with your changes you can use the patch queue to fold all your commits into a&#xA;single changeset and &amp;lsquo;push&amp;rsquo; (i.e. publish) your changes to the central&#xA;repository.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
