Mercurial: qrefresh to edit multiple commit messages?

I came across these questions: Incorrect message in Mercurial and Is dangerous qrefresh . However, I am still confused about my specific problem.

I cloned the repository and since then made about 10 commits. Before pushing, I realized that I had to include a certain phrase in every transaction I made. So basically I need to edit the commit message for my last 10 commits to fix this. Qrefresh was mentioned, but confusing it makes me worry about data loss. I am still a very simple Mercurial user, so it would be helpful if someone could help me with detailed instructions so that I don’t lose anything.

In addition, Mercurial 1.0.1 is running on the server I use (I know that it is old!)

EDIT:

I met the answer that I need in another question, as one of his answers. It worked, but I also find it necessary to read MQ to really understand what is happening.

+3
source share
2 answers

The qrefresh command is only useful if you are using Mercurial Queues . You say that you are still a newbie to Hg, so I assume you did not. But yes, if you used queues, the current patch commit message can be edited using the following command:

hg qrefresh -e "new commit message"

Again, Mercurial Queues (or MQ) is an extended topic, and I would suggest you read it here.

MQ is powerful, but until you feel comfortable, HistEdit is a good way, as Macke said.

+4
source

, HistEditExtension, (, , , , ..)

, , . , .

+3

All Articles