Edit Mercurial Earlier Commit Message - TortoiseHg

sdoca picture sdoca · Feb 20, 2014 · Viewed 9.7k times · Source

Is there a way to edit a commit message in Mercurial on a commit after other commits have occured using TortoiseHg? I've read these posts:

How to edit incorrect commit message in Mercurial?

Mercurial: how to amend the last commit?

and have been able to update a "regular" commit message when it is the latest commit on a branch (using TortoiseHg). However, I haven't been able to figure out how to edit a commit message when other commits have occurred after the one I want to edit. It always edits the last commit.

Based on Ed Cottrell's comment, I did a test where I made two commits without pushing to the central repo, and I still have the same issue - only the last commit message can be edited.

EDIT: I should clarify that I am looking to update a changeset that has been pushed.

Answer

Lazy Badger picture Lazy Badger · Feb 20, 2014

Histedit extension (bundled with TortoiseHG now) has a mess command for changing the commit message of historical changesets.

Unfortunately, this command is not supported by the TortoiseHG GUI so you need to run the command from command line.