Reputation: 2929
I have an applied patch in my Mercurial queue, how do I convert this patch into uncommited changes in my working copy (as though I'd never created the patch using qnew)?
Upvotes: 0
Views: 74
Reputation: 177610
Tell Mercurial to refresh the patch but exclude all files. This will leave all changes in the patch uncommitted in your working folder. You are left with an empty applied patch that can be popped off and deleted.
hg qref -X *
hg qpop -f
hg qdel <patch>
Upvotes: 1
Reputation: 2929
Well, in the absence of other answers, here's what I ended up doing:
First pop the patch off the patch stack so it is no longer applied
hg qpop thepatchname --keep-changes
I'm not sure if the --keep-changes
was necessary, but I had local uncommitted changes I wanted to keep.
Next I had to shelve some uncommitted changes in my working copy so I could apply a patch
hg shelve
Now apply the patch, stored in .hg/patches using the import
command, with the --no-commit option so the patch is not commited to your repository.
hg import .hg/patches/thepatchname --no-commit
You can now delete the patch if you like.
Upvotes: 1