In defense of qnext and qtop
Greg Ward
greg at gerg.ca
Fri Sep 4 13:00:39 CDT 2009
So I find that I have been avoiding using crew-stable because of the
removal of qtop and qnext (back in b8dc3eba4f9d, if you weren't paying
attention). Even before Dirkjan put those commands out to pasture, I
liked qnext for things like
hg qfold `hg qnext`
hg qrm `hg qnext`
hg qmv `hg qnext` <newname>
Recently I've been doing some heavy lifting with MQ, doing lots of
reordering and folding in long and complex patch queue. After
resolving a hairy conflict and before doing 'qrefresh', it's nice to
confirm that I have not accidentally dropped part of the patch:
diff -U0 .hg/patches/`hg qtop` <(hg qdiff)
Bottom line: qtop and qnext help me to get the most out of the command
line. They let me avoid a slow and awkward fumble for mouse, click,
drag, copy, paste and instead just type a few more characters.
Granted this is not the sort of trick that would occur to most people,
but it sure is fun for us command-line junkies.
(Incidentally, I still remember the minute I went from thinking that
Mercurial looked interesting to knowing that it's the tool for me:
when I figured out that "rm -f `hg st -un`" is a low-rent purge.
Then, a few minutes later, when I figured out "hg st -un -0 | xargs -0
rm -f", I was hooked. Discovering the purge extension was mere icing
on the cake. Mercurial was obviously designed for command-line
junkies like me, so please let's not break beautiful shortcuts like
qtop and qnext.)
Greg
More information about the Mercurial-devel
mailing list