Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
42535:e079e001d536 | 42536:5f2f6912c9e6 |
---|---|
16 We store the data on disk in cbor, for which we use the CBOR format to encode | 16 We store the data on disk in cbor, for which we use the CBOR format to encode |
17 the data. | 17 the data. |
18 """ | 18 """ |
19 | 19 |
20 from __future__ import absolute_import | 20 from __future__ import absolute_import |
21 | |
22 from .i18n import _ | |
21 | 23 |
22 from . import ( | 24 from . import ( |
23 error, | 25 error, |
24 util, | 26 util, |
25 ) | 27 ) |
83 util.unlinkpath(self._repo.vfs.join(self.fname), ignoremissing=True) | 85 util.unlinkpath(self._repo.vfs.join(self.fname), ignoremissing=True) |
84 | 86 |
85 def exists(self): | 87 def exists(self): |
86 """check whether the state file exists or not""" | 88 """check whether the state file exists or not""" |
87 return self._repo.vfs.exists(self.fname) | 89 return self._repo.vfs.exists(self.fname) |
90 | |
91 # A list of state files kept by multistep operations like graft. | |
92 # Since graft cannot be aborted, it is considered 'clearable' by update. | |
93 # note: bisect is intentionally excluded | |
94 # (state file, clearable, allowcommit, error, hint) | |
95 unfinishedstates = [ | |
96 ('graftstate', True, False, _('graft in progress'), | |
97 _("use 'hg graft --continue' or 'hg graft --stop' to stop")), | |
98 ('updatestate', True, False, _('last update was interrupted'), | |
99 _("use 'hg update' to get a consistent checkout")) | |
100 ] |