mercurial/state.py
changeset 48946 642e31cb55f0
parent 48875 6000f5b25c9b
child 49829 8ced4ca30ea1
equal deleted inserted replaced
48945:55d132525155 48946:642e31cb55f0
    37 
    37 
    38     for t in (Any, Dict):
    38     for t in (Any, Dict):
    39         assert t
    39         assert t
    40 
    40 
    41 
    41 
    42 class cmdstate(object):
    42 class cmdstate:
    43     """a wrapper class to store the state of commands like `rebase`, `graft`,
    43     """a wrapper class to store the state of commands like `rebase`, `graft`,
    44     `histedit`, `shelve` etc. Extensions can also use this to write state files.
    44     `histedit`, `shelve` etc. Extensions can also use this to write state files.
    45 
    45 
    46     All the data for the state is stored in the form of key-value pairs in a
    46     All the data for the state is stored in the form of key-value pairs in a
    47     dictionary.
    47     dictionary.
   100     def exists(self):
   100     def exists(self):
   101         """check whether the state file exists or not"""
   101         """check whether the state file exists or not"""
   102         return self._repo.vfs.exists(self.fname)
   102         return self._repo.vfs.exists(self.fname)
   103 
   103 
   104 
   104 
   105 class _statecheck(object):
   105 class _statecheck:
   106     """a utility class that deals with multistep operations like graft,
   106     """a utility class that deals with multistep operations like graft,
   107     histedit, bisect, update etc and check whether such commands
   107     histedit, bisect, update etc and check whether such commands
   108     are in an unfinished conditition or not and return appropriate message
   108     are in an unfinished conditition or not and return appropriate message
   109     and hint.
   109     and hint.
   110     It also has the ability to register and determine the states of any new
   110     It also has the ability to register and determine the states of any new