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.
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.
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.
You just do hg qrefresh -m "new commit message"
.
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