If it is already pressed, there are only two things you can do now:
1) If you can delete the central repository and replace it with another:
You can clone the central repository, but tell Mercurial to clone only until the c changeset .
Then you can take this repository (which does not have the wrong changes) and replace the "old" central repository (the one that has the wrong changes) with it.
Disadvantage: if someone has already pulled unwanted commits and then clicked again, they are again in the repository.
Therefore, you need to make sure that either no one was mistaken, or everyone who deleted his clone.
2) If option 1 is not possible, you can use hg backout
to undo the effects of the wrong changes, rather than the changes themselves.
Quote from the link:
Relapse works by applying a set of changes that will be reversed in the opposite of the set of changes. This new set of changes is tied to the repository and ultimately merged.
Thus, three incorrect change sets will remain in the repository, plus three more will be added, each of which will return the effects of one of the three incorrect change sets.
If you do it this way, it doesn't matter if someone else pulled the wrong changes ... as soon as he pulls out three “backup” sets of changes, everything will be okay again.
source share