Occasionally I commit some code to the repository, add a comment/summary, then read the summary back and realise I've made a mistake or should have included a bit more information. It is possible to edit the summary after a commit in TortoiseHg? I'm using version 1.1
In the TortoiseHg client's Commit dialog, right-click the needed file and then click Revert.
hg amend [OPTION]... [ FILE]... aliases: refresh. combine a changeset with updates and replace it with a new one. Commits a new changeset incorporating both the changes to the given files and all the changes from the current parent changeset into the repository.
Use mercurial queues to convert the change-sets to patches, then strip those change-sets and re-apply the patches back to your repository.
When the patches are created, they are stored in the .hg/patches folder in your repository and you can edit these (including the commit message) before you re-apply them.
If that is the last commit, you can press "Undo" button in the commit dialog (it is an interface to hg rollback) and then commit the same files again with a new message. If this is a commit in a middle of the tree, you need to use mq extension to delete all later commits and reapply them. And if the commit with an incorrect summary is pushed to a public repo, you should accept and live with that, because you should not change published commits.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With