Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating Commit Message in Mercurial MQ extension

After using hg qnew and hg qrefresh to create and update a patch that I want to apply to my repository, but the commit message that I wrote when I did hg qnew was not very good, it did not reference the ticket number from trac, and I would like to say something in it about some of the issues that my commit addresses.

How do I do something like hg qrewritemycommitmessage. I have examined the docs on the website and I have come up blank.

like image 296
Jerub Avatar asked Apr 06 '10 07:04

Jerub


People also ask

How do I change commit message in Mercurial?

Since version 2.2, the commit command has a --amend option that will fold any changes into your working directory into the latest commit, and allow you to edit the commit message. hg commit --amend can in fact be used on any changeset that is a (topological) branch head, that is, one that has no child changesets.

How do you use hg commit -- amend?

You can also use the --amend option to modify the list of files in the commit. Just use hg add and hg rm to modify the index, then make a hg commit --amend to re-commit the changes.


1 Answers

You just do hg qrefresh -m "new commit message".

like image 50
kuy Avatar answered Oct 05 '22 22:10

kuy