Mercurial 中的哪些功能可以为我提供“检查点”?我可以在不进行频繁的、破坏性的、小的改变的情况下进行比较吗?
我正在开发一个项目,并且正在进行一些小的、探索性的改变。每次更改后,我都想与之前的版本进行比较。但是,我不想将这些小更改中的每一个都提交到永久历史记录中,直到我确信最终的更改应该成为永久的。然后我想一次性提交。
Mercurial 中有哪些功能可以让我执行此操作?
I'm developing a project, and I am making small, exploratory changes. After each change, I'd like to diff against the previous version I had. However, I don't want to commit each of these small changes to the permanent history until I'm satisfied that the final change should be made permanent. Then I'd like to commit it in one go.
What's the feature in Mercurial that lets me do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您正在寻找善变的队列...它允许您维护一组针对源代码的补丁,而无需提交它们。您可以推送和弹出补丁,直到一切顺利为止,然后根据需要提交。
这里有一篇不错的博客文章 http:// /www.canonware.com/~ttt/2008/04/using-mercurial-patch-queues-for-daily.html
或此处的官方文档 http://hgbook.red-bean.com/read/advanced-uses-of-mercurial-queues.html
I think you're looking for mercurial queues... it allows you to maintain a set of patches against source without committing them. You can push and pop patches until you get things right, then commit as appropriate.
Nice blog post here http://www.canonware.com/~ttt/2008/04/using-mercurial-patch-queues-for-daily.html
Or official documentation here http://hgbook.red-bean.com/read/advanced-uses-of-mercurial-queues.html
您可以像 Sam 提到的那样使用 MQ,或者您可以照常提交,然后使用 折叠扩展 或 HistEdit 扩展 将“中间”变更集折叠在一起。您只需要确保同时不会将它们推到任何地方即可。
You can use MQ as Sam mentioned, or you could just commit as usual and then use the Collapse extension or the HistEdit extension to fold the "intermediate" changesets together. You would just need to make sure you don't push them anywhere in the mean time.