<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Posts tagged mercurial  - Entropy and Ecstasy</title><link>http://aaron.maenpaa.ca/blog/tags/mercurial/</link><description>The most recent ranting and ravings of a madman.</description><lastBuildDate>Sun, 22 May 2016 05:32:35 GMT</lastBuildDate><generator>PyRSS2Gen-1.0.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Top Ten (Mercurial) Commands</title><link>http://aaron.maenpaa.ca/blog/entries/2010/12/04/top_ten_mercurial_commands/</link><description>&lt;p&gt;Since &lt;a class="reference external" href="http://mercurial.selenic.com/"&gt;Mercurial&lt;/a&gt; took top spot in the &lt;a class="reference external" href="http://aaron.maenpaa.ca/blog/entries/2010/11/30/top_ten_commands_redux/"&gt;top ten commands&lt;/a&gt; post, I though it might be interesting to take a look at the break down of which Mercurial sub-commands I end up using:&lt;/p&gt;
&lt;pre class="literal-block"&gt;aaron@ares ~$ history | grep hg | awk '{print $3}' | sort | uniq -c | sort -rn | head
  97 st
  21 commit
  20 push
  14 addremove
   8 diff
   7 qrefresh
   4 qnew
   4 qfinish
   3 up
   3 revert
&lt;/pre&gt;
&lt;p&gt;&lt;tt class="docutils literal"&gt;hg st&lt;/tt&gt; takes the top spot, indicating that &amp;quot;What the hell have I changed?&amp;quot; is a pretty important question to have answered. The fact that &lt;tt class="docutils literal"&gt;hg commit&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;hg push&lt;/tt&gt; are at the top while &lt;tt class="docutils literal"&gt;hg pull&lt;/tt&gt; is nowhere to be seen is a bit of an anomaly due to the fact that I'm the only one working on the repositories in question. I would expect  the results to be very different if you did the same experiment on my work machine. The &lt;tt class="docutils literal"&gt;hg q*&lt;/tt&gt; are all commands that are part of the &lt;a class="reference external" href="http://mercurial.selenic.com/wiki/MqExtension"&gt;Mercurial Queues&lt;/a&gt; extension that I use for shaping my changesets and rewriting history.&lt;/p&gt;
&lt;div class="section" id="extensions"&gt;
&lt;h3&gt;Extensions&lt;/h3&gt;
&lt;p&gt;I make pretty heavy use of both the Mercurial Queues and &lt;a class="reference external" href="http://mercurial.selenic.com/wiki/RebaseExtension"&gt;Rebase&lt;/a&gt; extensions. In tandem, they give me the ability to make my changesets to be exactly what I want them to be and to move my local branches to tip before I push (which I use so that I don't have to add trivial merge changesets). My workflow has a tendecy to look like this:&lt;/p&gt;
&lt;pre class="literal-block"&gt;$ # do work
$ hg qnew -f -m &amp;quot;A pithy commit message bugzid: 1234567&amp;quot; a_patch.diff
$ hg qpush -a
applying first.diff
now at: first.diff
$ hg pull --rebase
pulling from /a/repository
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
$ hg qpop
popping first.diff
now at: a_patch.diff
$ hg qfinish -a
$ hg push
pushing to /a/repository
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
$ hg qpush
applying first.diff
now at: first.diff
$ # do more work
$ hg qrefresh
$ hg pull --rebase
pulling from /a/repository
searching for changes
no changes found
$ hg qfinish -a
$ hg push
pushing to /a/repository
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
&lt;/pre&gt;
&lt;p&gt;Sure, I could live in the world of &lt;a class="reference external" href="http://mercurial.selenic.com/wiki/FetchExtension"&gt;hg fetch&lt;/a&gt; and type fewer commands, but I feel like having nice atomic changesets, commit messages without typos and a nice clean history is worth the extra typing.&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">http://aaron.maenpaa.ca/blog/entries/2010/12/04/top_ten_mercurial_commands/</guid><pubDate>Sat, 04 Dec 2010 16:55:44 GMT</pubDate></item></channel></rss>