本文介绍了是否可以撤消意外的“汞搁置"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,我的项目中还有几百行代码,分散了六类,而且我不希望一一追踪它们.

Now my there's an extra few hundred lines of code in my project, scattered over half a dozen classes, and I'm not looking forward to tracking them down one by one.

推荐答案

否,但这是可以避免的问题

执行hg commit --secret,而不是执行hg shelve.这将在存储库中创建一个实际"提交,可以对该提交进行重新设置或删除( hg strip ),当您不再需要它时.也可以使用hg histedithg fold将其折叠为另一个变更集(后者需要Evolve扩展名,该扩展名在撰写本文时是试验性的,而前者是交互式的,可能很难编写脚本).

Instead of doing hg shelve, do hg commit --secret. This will create a "real" commit in the repository, which can be rebased or stripped (hg strip) when you no longer need it. It can also be folded into another changeset using hg histedit or hg fold (the latter requires the Evolve extension, which is experimental at the time of writing, while the former is interactive and may be hard to script).

--secret标志确保在您手动对变更集运行hg phase -d REV之前,不会意外推送变更集.

The --secret flag ensures the changeset will not be accidentally pushed until you manually run hg phase -d REV on the changeset.

这篇关于是否可以撤消意外的“汞搁置"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 17:22