unshelve: changed Corruptedstate error msg from ui.warn to error.Abort
This changes the message type of Corruptedstate error in case of `hg unshelve --abort`
to error.Abort from warning message. This is done so as to avoid the return statement
after the warning.
Differential Revision: https://phab.mercurial-scm.org/D6636
# extension to emulate interrupting filemerge._filemerge
from __future__ import absolute_import
from mercurial import (
error,
extensions,
filemerge,
)
def failfilemerge(filemergefn,
premerge, repo, wctx, mynode, orig, fcd, fco, fca,
labels=None):
raise error.Abort("^C")
return filemergefn(premerge, repo, mynode, orig, fcd, fco, fca, labels)
def extsetup(ui):
extensions.wrapfunction(filemerge, '_filemerge',
failfilemerge)