Assuming you have already committed a new changeset but not yet pushed it; let's say your history looks like this:
A--B--C--★
where C is the recently committed changeset you wish to do away with, but leave its modifications in the working folder. And ★ is the working directory (not an actual changeset itself).
There is more than one way to do this. One approach is the following...
hg up B
This leaves your history looking like this:
A--B--★
\
C
Then do
hg revert -r C
which in effect copies whatever changes were in C into your working folder.
Then you could do (optional)
hg strip C
which eradicates C from history:
A--B--★
An advantage of this approach is that it removes C entirely, like it never existed.
(I mentioned that using strip
is optional in this sense: if you did leave C in place, it causes little harm. And you'd never need to push it if it is marked secret. But personally I would clean it up by stripping.)