Created attachment 2052 [details] A test demonstrating the bug If an "hg unshelve" is in-progress and you run $ hg merge --abort this aborts the merge portion of the in-progress unshelve, but the unshelve is still in-progress -- many hg commands still return "abort: unshelve already in progress". But then, aborting the unshelve fails: $ hg unshelve --abort unshelve of 'default' aborted abort: working directory parents do not match unshelve state The working directory is still at the "pending changes temporary commit" created by the unshelve. From here, it's easy to accidentally create more commits on top of this temporary commit. In this situation, I would expect "hg merge --abort" to fail, directing the user to use "hg unshelve --abort". See the attachment for a test demonstrating this bug.
Fixed by https://mercurial-scm.org/repo/hg/rev/b8d54f4625cb Taapas Agrawal <taapas2897@gmail.com> merge: disallow merge abort in case of an unfinished operation (issue6160) This patch disallows `hg merge --abort` in case an operation of higher precedence i.e unshelve, rebase, histedit are in unfinished states. This is done so as to avoid partial abort of these operations in case merge abort is called at an interrupted step. The patch adds a `cmdutil.getunfinishedstate` function which checks for operations under progress and returns a `statecheck` object for it. Differential Revision: https://phab.mercurial-scm.org/D6607 (please test the fix)
Bug was set to TESTING for 7 days, resolving