mercurial/cmdutil.py
changeset 42533 0231032729c4
parent 42532 12243f15d53e
child 42568 f9da9d5f3f5a
--- a/mercurial/cmdutil.py	Sun Jun 09 02:12:58 2019 +0530
+++ b/mercurial/cmdutil.py	Thu Jun 20 11:40:08 2019 +0530
@@ -3296,11 +3296,6 @@
         if s._clearable and s.isunfinished(repo):
             util.unlink(repo.vfs.join(s._fname))
 
-afterresolvedstates = [
-    ('graftstate',
-     _('hg graft --continue')),
-    ]
-
 def howtocontinue(repo):
     '''Check for an unfinished operation and return the command to finish
     it.
@@ -3312,9 +3307,11 @@
     a boolean.
     '''
     contmsg = _("continue: %s")
-    for f, msg in afterresolvedstates:
-        if repo.vfs.exists(f):
-            return contmsg % msg, True
+    for state in statemod._unfinishedstates:
+        if not state._continueflag:
+            continue
+        if state.isunfinished(repo):
+            return contmsg % state.continuemsg(), True
     if repo[None].dirty(missing=True, merge=False, branch=False):
         return contmsg % _("hg commit"), False
     return None, None