hg equivalent of git stash

anatoly techtonik techtonik at gmail.com
Mon Dec 12 16:45:35 CST 2011


On Tue, Dec 13, 2011 at 1:13 AM, Matt Mackall <mpm at selenic.com> wrote:

> On Tue, 2011-12-13 at 00:40 +0300, anatoly techtonik wrote:
> > On Mon, Dec 12, 2011 at 8:47 PM, Masklinn <masklinn at masklinn.net> wrote:
> >
> > > On 2011-12-12, at 18:09 , anatoly techtonik wrote:
> > > > I am puzzled. After 'hg qref -X .', 'hg qdiff' and 'hg diff' show the
> > > same
> > > > info. Did I break something?
> > > `hg qref -X` removes everything from the MQ patch, so you now have:
> > > * A working copy in its original (dirty) state
> > > * A completely empty applied MQ patch
> > >
> > > It's perfectly normal that qdiff and diff show the same output, as
> qdiff
> > > is the sum of the current mq patch and the current working copy diff.
> If
> > > the patch is empty, it is the same thing as a direct diff.
> > >
> >
> > It appears that misunderstood `hg qdiff` command from the moment I first
> > used it (and it was a while since then). =) I thought it is used to show
> > the contents of current patch.
>
> The fundamental thing to understand about MQ is that an applied patch IS
> A CHANGESET. Thus all commands that can show the diff of an existing
> changeset will work, no special MQ-specific commands are necessary.
>
> So you can use:
>
> - hg log -vpr <rev>
> - hg diff -c <rev>
> - hg export <rev>
> - hg outgoing -p
>
> etc..


I see. They are like committed revisions when pushed. Then the 'strip -k'
command without 'qrecord' mentioned in previous replies starts to make
sense.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20111213/29dcdab1/attachment.html>


More information about the Mercurial mailing list