mercurial/localrepo.py
changeset 44409 f935b680860d
parent 44382 f0027a3dd7cb
child 44437 6a34e438461b
--- 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