如何解决Mercurial变更集注释中的错误? [英] How to fix an error in a Mercurial changeset comment?

查看:80
本文介绍了如何解决Mercurial变更集注释中的错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果输入了错误的信息,是否可以重写hg commit消息?提交变更集时,我们始终会包含错误ID.例如:

Is there a way to rewrite the hg commit message if the wrong information was entered? We always include our Bug ID when we commit a changeset. For instance:

hg commit -m "Bug 14585: LastName field should be mandatory"

但是,如果我输入了错误的错误ID,一旦变更集已提交并推送到中央存储库,是否有办法(可能通过扩展名)修复注释?

But If I put the wrong bug ID, is there a way (through an extension maybe) to fix the comment once the changeset has been committed and pushed to a central repo?

推荐答案

histedit 扩展名可能就是您要寻找的.它允许您在事后编辑提交消息.它还允许您删除或折叠修订,就像git rebase --interactive.

The histedit extension might be what you are looking for. It allows you to edit commit messages after the fact. It also allows you to drop or fold revisions, much like git rebase --interactive.

请注意,您必须在要修复的存储库上启用并使用扩展名;无法编辑远程仓库的历史记录.另外,对于在中央存储库上使用它,我会非常谨慎.正如蒂姆·波斯特(Tim Post)指出的那样,商品变更集并不意味着会被更改.

Note that you have to enable and use the extension on the repo you'd like to fix; there is no way to edit the history of a remote repo. Additionally, I'd be very cautious about using this on a central repo. As Tim Post points out, mercurial changesets are not meant to be changed.

这篇关于如何解决Mercurial变更集注释中的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆