diff -r 6cf92d6c0ad5 -r f935b680860d mercurial/localrepo.py --- a/mercurial/localrepo.py Fri Feb 28 10:49:13 2020 -0800 +++ b/mercurial/localrepo.py Fri Feb 28 10:30:18 2020 -0800 @@ -2944,6 +2944,9 @@ self, status, text, user, date, extra ) + ms = mergemod.mergestate.read(self) + mergeutil.checkunresolved(ms) + # internal config: ui.allowemptycommit allowemptycommit = ( wctx.branch() != wctx.p1().branch() @@ -2958,9 +2961,6 @@ if merge and cctx.deleted(): raise error.Abort(_(b"cannot commit merge with missing files")) - ms = mergemod.mergestate.read(self) - mergeutil.checkunresolved(ms) - if editor: cctx._text = editor(self, cctx, subs) edited = text != cctx._text