How can I do "hg shelf apply"?
Asked Answered
J

2

10

I would like to copy some changes from my Mercurial shelf to my working directory, leaving an unchanged copy in the shelf.

Git would let me do that with git stash apply, however I can't see a way to get TortoiseHg to let me do the same.

Is there any way to retrieve to copy the changes from the shelf, rather than move them?

Jeffry answered 9/9, 2014 at 20:42 Comment(1)
Switch to MQ, which have nice GUI in TortoiseHG?!Brickey
B
11
  1. unshelve command has option --keep (see hg help shelve)

  2. Shelve extension stores shelves in .hg/shelves. If you stored named shelf, you can copy file, named as shelf, before hg unshelve NAME

Brickey answered 10/9, 2014 at 6:42 Comment(3)
Thanks: that will be the one Hg command I have to drop into the command line for, pending an option within TortoiseHg!Jeffry
In fact, TortoiseHg seems to use a separate shelf entirely. The command line and GUI both have shelves that work independently but don't interact. Does anyone know why?Jeffry
@StevePitchers IIRC the THG shelf feature was developed first.Bernard
A
6

hg help unshelve

says that:

hg unshelve --keep     keeps shelve after unshelving

So I assume this is what you are looking for.

Adenovirus answered 10/9, 2014 at 6:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.