Mercurial > public > mercurial-scm > hg-stable
diff mercurial/state.py @ 42536:5f2f6912c9e6
states: moved cmdutil.unfinishedstates to state.py
This moves `cmdutil.unfinishedstates`, `checkunfinished()`,`clearunfinished()`
to `state.py`. the already existing users of this module are updated accordingly.
Test results remain unchanged.
Differential Revision: https://phab.mercurial-scm.org/D6484
author | Taapas Agrawal <taapas2897@gmail.com> |
---|---|
date | Sat, 08 Jun 2019 23:43:53 +0530 |
parents | 050ea8eb42a5 |
children | dc3fdd1b5af4 |
line wrap: on
line diff
--- a/mercurial/state.py Mon Jun 24 16:01:22 2019 -0700 +++ b/mercurial/state.py Sat Jun 08 23:43:53 2019 +0530 @@ -19,6 +19,8 @@ from __future__ import absolute_import +from .i18n import _ + from . import ( error, util, @@ -85,3 +87,14 @@ def exists(self): """check whether the state file exists or not""" return self._repo.vfs.exists(self.fname) + +# A list of state files kept by multistep operations like graft. +# Since graft cannot be aborted, it is considered 'clearable' by update. +# note: bisect is intentionally excluded +# (state file, clearable, allowcommit, error, hint) +unfinishedstates = [ + ('graftstate', True, False, _('graft in progress'), + _("use 'hg graft --continue' or 'hg graft --stop' to stop")), + ('updatestate', True, False, _('last update was interrupted'), + _("use 'hg update' to get a consistent checkout")) + ]