3

I've come across these questions: Incorrect Commit Message In Mercurial and Is qrefresh harmful. However, I'm still confused about my specific problem.

I cloned a repository and have since made about 10 commits. Before pushing, I realized that I should have included a certain phrase in each commit I made. So basically I need to edit the commit message for my last 10 commits to fix this. qrefresh has been mentioned, but in a confusing way that makes me worry about losing data. I'm still a very basic Mercurial user so it would be helpful if someone could help me out with detailed instructions so I don't lose anything.

Also, the server I'm using is running Mercurial 1.0.1 (I know it's old!)

EDIT:

I've come across the answer I needed in another question as one of its answers. It worked, but I also think it's necessary to read up on MQ to really understand what is going on.

4

2 に答える 2

4

qrefreshコマンドは、 MercurialQueuesを使用している場合にのみ役立ちます。あなたはまだHg初心者だと言っているので、そうではないと思います。ただし、キューを使用している場合は、現在のパッチのコミットメッセージを次のコマンドで編集できます。

hg qrefresh -e "new commit message"

繰り返しになりますが、Mercurial Queues(またはMQ)は高度なトピックであり、ここで読むことをお勧めします

MQは強力ですが、Mackeが述べたように、それらに慣れるまでは、HistEditが良い方法です。

于 2011-03-16T14:41:51.140 に答える
3

一連のコミット全体の編集(名前の変更、ファイルの変更、結合、削除など)に役立つHistEditExtensionを確認することをお勧めします。

また、通常、サーバーが使用するバージョンはそれほど重要ではありません。それはあなたがローカルで使用しているものについてです。

于 2011-03-16T14:38:17.560 に答える