mercurial/state.py
changeset 42612 3c16b9c0b099
parent 42600 3bc400ccbf99
child 43045 8c4f32b907e6
--- a/mercurial/state.py	Wed Jul 17 18:15:51 2019 +0200
+++ b/mercurial/state.py	Mon Jul 15 22:23:31 2019 +0530
@@ -99,7 +99,7 @@
 
     def __init__(self, opname, fname, clearable, allowcommit, reportonly,
                  continueflag, stopflag, cmdmsg, cmdhint, statushint,
-                 abortfunc):
+                 abortfunc, continuefunc):
         self._opname = opname
         self._fname = fname
         self._clearable = clearable
@@ -111,6 +111,7 @@
         self._cmdhint = cmdhint
         self._statushint = statushint
         self.abortfunc = abortfunc
+        self.continuefunc = continuefunc
 
     def statusmsg(self):
         """returns the hint message corresponding to the command for
@@ -159,7 +160,8 @@
 
 def addunfinished(opname, fname, clearable=False, allowcommit=False,
                   reportonly=False, continueflag=False, stopflag=False,
-                  cmdmsg="", cmdhint="", statushint="", abortfunc=None):
+                  cmdmsg="", cmdhint="", statushint="", abortfunc=None,
+                  continuefunc=None):
     """this registers a new command or operation to unfinishedstates
     opname is the name the command or operation
     fname is the file name in which data should be stored in .hg directory.
@@ -184,10 +186,12 @@
     message of the format ('To continue:    hg cmdname --continue'
     'To abort:       hg cmdname --abort') is not desired
     abortfunc stores the function required to abort an unfinished state.
+    continuefunc stores the function required to finish an interrupted
+    operation.
     """
     statecheckobj = _statecheck(opname, fname, clearable, allowcommit,
                                 reportonly, continueflag, stopflag, cmdmsg,
-                                cmdhint, statushint, abortfunc)
+                                cmdhint, statushint, abortfunc, continuefunc)
     if opname == 'merge':
         _unfinishedstates.append(statecheckobj)
     else: