What do you do with MQ?

Matt Mackall mpm at selenic.com
Tue Dec 13 23:44:45 UTC 2011


On Tue, 2011-12-13 at 23:15 +0000, Haszlakiewicz, Eric wrote:
> > -----Original Message-----
> > From: mercurial-bounces at selenic.com [mailto:mercurial-
> > 
> > Sam Steingold <sds at gnu.org> writes:
> > 
> > >> * Arne Babenhauserheide <near_ono at jro.qr> [2011-12-13 06:46:57 +0100]:
> > >> * shelve away changes, commit something else, get them back.
> > >>    hg qnew stash-work-in-progress; hg qpop
> > >>    hg qpush; hg qfinish tip; hg strip -k tip
> > 
> > I don't like the last line -- it feels quite unnatural to me to finish
> > a
> > patch just to strip it. I've certainly never used mq like that.
> > Somehow,
> > I feel that people that insist on getting the changes "out" of mq have
> > misunderstood it -- you can just keep the changes in mq and work with
> > them there.
> 
> Except that you can't because important operations are missing.  An example of one of the most basic things that you can't easily do:
>   hg stat
> 
> Not being able to see what files I'm working with makes mq very difficult for me to work with.

Seems like you're actually having a conceptual difficulty. Mantra: an
applied MQ patch is a changeset. So if you know how to work with
changesets, you know how to work with MQ changesets. So:

hg log -vr .  # show current changeset log including files
hg status --change .
hg diff -c .
hg log -vpr . --stat

For qrefresh, you'd like to know things relative to the combination of
"the latest commit" and "what's in the working directory" because
qrefresh will add those together. And that's basically:

hg diff -r .^  # diff of working directory against parent of parent
hg qdiff       # same as above
hg status --rev .^ # "qstatus"
hg qdiff --stat

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list