mercurial/cmdutil.py
changeset 36978 c479692690ef
parent 36939 45bfcd16f27e
parent 36844 eeb87b24aea7
child 36986 afac8ab37c2c
--- a/mercurial/cmdutil.py	Fri Mar 16 12:10:15 2018 -0700
+++ b/mercurial/cmdutil.py	Sat Mar 17 21:46:17 2018 -0400
@@ -32,6 +32,7 @@
     logcmdutil,
     match as matchmod,
     merge as mergemod,
+    mergeutil,
     obsolete,
     patch,
     pathutil,
@@ -2357,6 +2358,11 @@
             if subs:
                 subrepoutil.writestate(repo, newsubstate)
 
+        # avoid cycle (TODO: should be removed in default branch)
+        from . import merge as mergemod
+        ms = mergemod.mergestate.read(repo)
+        mergeutil.checkunresolved(ms)
+
         filestoamend = set(f for f in wctx.files() if matcher(f))
 
         changes = (len(filestoamend) > 0)