mercurial/state.py
changeset 42529 5f2f6912c9e6
parent 41135 050ea8eb42a5
child 42530 dc3fdd1b5af4
equal deleted inserted replaced
42528:e079e001d536 42529: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     ]