I have a HG repository with revs 1, 2, 3, 4, 5 and 6.
When I committed rev 4, I unknowingly botched some changes in rev3 that I should not have. I did not notice th
You want hg backout
Revert/undo the effect of an earlier changeset...
Backout works by applying a changeset that's the opposite of the changeset to be backed out. That new changeset is committed to the repository, and eventually merged...
You can use the MQ extension:
hg qinit
hg qimport -r 4:tip
hg qpop -a
hg qdelete 4.diff
hg qpush -a
hg qfinish -a
The above is how you rewrite history, which is what you want I believe.
You can also use hg backout
but that undoes a commit in your working directory and you can commit that.