Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hg shelve equivalent of git stash drop

I have the hg shelve (not attic) extension installed, and I want to drop a patch. In git it would be git stash drop. How do I do this using the shelve extension?

like image 854
undefined Avatar asked Apr 03 '12 20:04

undefined


2 Answers

From the Mercurial shelve documentation (or using hg help shelve):

To delete specific shelved changes, use "--delete". To delete all shelved changes, use "--cleanup".

options:

-d --delete delete the named shelved change(s)

So if your patch was called my-patch, then you would delete it using:

hg shelve -d my-patch 
like image 143
BennyMcBenBen Avatar answered Nov 12 '22 13:11

BennyMcBenBen


If you don't want to use shelves, you can do it the following way.

hg diff > mylocalchanges.txt hg revert -a # Do your merge here, once you are done, import back your local mods hg import --no-commit mylocalchanges.txt 
like image 32
minaz Avatar answered Nov 12 '22 14:11

minaz