hg equivalent of git stash

anatoly techtonik techtonik at gmail.com
Mon Dec 12 21:56:00 UTC 2011


On Mon, Dec 12, 2011 at 8:51 PM, Masklinn <masklinn at masklinn.net> wrote:

> On 2011-12-12, at 18:27 , anatoly techtonik wrote:
> >> hg qpush
> >> hg qfinish
> > abort: no revisions specified
> >
> > It is not clear which revisions should I (as a user) specify.
> either `tip`, or just use the `-a` flag to finish "all applied patches"
> (there's only one).
>
> > I understand
> > that I should commit with 'qfinish' first to be able to do 'hg strip -k'
> > after.
> It's not necessary.
>

Let's summarize this another way:
# stashing
git> git stash save "work in progress"
hg> hg qnew stash-work-in-progress
hg> hg qpop

# restoring
git> git stash apply
hg> hg qpush
hg> hg qfinish tip
patch stash-work-in-progress finalized without changeset message
hg> hg strip -k tip

Not very intuitive either, but at least easier to remember. This solution
is better in a way that it doesn't require me to remember the name of the
patch with stash, but worse, because I can forget to specify -k argument
one day and lose changes. I also did not understand how can it be so that
it is not necessary to do `qfinish` before `strip -k`? From what I can see
`strip` doesn't work with queues.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20111213/f44e84f9/attachment-0002.html>


More information about the Mercurial mailing list