Is it possible to edit a summary after a commit using TortoiseHg?

前端 未结 7 1644
清酒与你
清酒与你 2021-01-04 01:30

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 info

7条回答
  •  梦谈多话
    2021-01-04 02:16

    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.

    • Enabled the Mercurial Queues extensions (MQ)
    • Right-click and select Import Revision to MQ for each change-set to convert them into patches in the patch queue
    • Enable the patch queue window from the view menu
    • Select the Un-apply All Patches arrow in the patch queue to strip the change-sets away
    • Edit the patch files in .hg/patches
    • Select Apply All Patches
    • Right-click on the patch and select Finish Applied to close down the queue

提交回复
热议问题