Question: I am currently using TortoiseHg (Mercurial) and accidentally committed an incorrect commit message. How do I go about editing this commit message in the repository?

Answer: 
I did it this way. Firstly, don't push your changes or you are out of luck. Grab and install the [collapse](http://mercurial.selenic.com/wiki/CollapseExtension) extension. Commit another dummy changeset. Then use collapse to combine the previous two changesets into one. It will prompt you for a new commit message, giving you the messages that you already have as a starting point. You have effectively changed your original commit message.
There is another approach with the MQ extension and the [debug commands](http://hgtip.com/tips/advanced/2010-04-23-debug-command-tricks/). This is a general way to modify history without losing data. Let me assume the same situation as [Antonio](https://stackoverflow.com/a/1188083/153133).

```
// set current tip to rev 497
hg debugsetparents 497
hg debugrebuildstate
// hg add/remove if needed
hg commit
hg strip [-n] 498

```