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: 
Well, I used to do this way:

Imagine, you have 500 commits, and your erroneous commit message is in r.498.

```
hg qimport -r 498:tip
hg qpop -a
joe .hg/patches/498.diff
(change the comment, after the mercurial header)
hg qpush -a
hg qdelete -r qbase:qtip

```
One hack i use if the revision i want to edit is not so old:

Let's say you're at rev 500 and you want to edit 497.

```
hg export -o rev497 497
hg export -o rev498 498
hg export -o rev499 499
hg export -o rev500 500

```

Edit rev497 file and change the message. (It's after first lines preceded by "#")

```
hg import rev497
hg import rev498
hg import rev499
hg import rev500

```