Mercurial 队列:无法提交且无法 qpop

Mercurial Queues: cannot commit and cannot qpop

我已将一些调试内容添加到现有的工作代码中并制作了一个 mq 补丁。 (调试的东西实际上破坏了应用程序,但我需要它来调试我添加的功能,这就是为什么我想让一个单位负责更改,一个补丁就可以了。) 然后我修改了工作代码,现在我想提交我所做的。 这个想法是提交更改而不是调试内容。

但是没有用:

$ hg ci
abort: cannot commit over an applied mq patch
$ hg qpop
abort: local changes found, refresh first
$ hg qseries
debug-stuff
$ hg qapplied
debug-stuff

如何暂时取消应用调试更改并提交有用的更改? (然后我需要重新应用调试更改并继续开发。)

$ hg qnew -f a-lot
$ hg qpop -a
// manually editing .hg/patches/series to swap the two patches
$ hg qpush

现在我将更改作为 mq 补丁,同时我想提交它们。

$ hg qapplied
a-lot
$ hg qfinish a-lot
patch a-lot finalized without changeset message
$ hg qapplied
$

现在 'hg log' 显示更改已提交。

我仍然想知道 qfinish 是否可以在不进行额外操作的情况下完成这项工作。

  1. "hg shelve" 保存您未提交的工作
  2. qpop 补丁
  3. "hg unshelve" 恢复您​​的功能

然后您可以提交该功能。