mercurial/state.py
changeset 38127 b7e5c53a779e
parent 38126 bdc4079ceb16
child 38133 dce718404ce6
equal deleted inserted replaced
38126:bdc4079ceb16 38127:b7e5c53a779e
    68     def _read(self):
    68     def _read(self):
    69         """reads the state file and returns a dictionary which contain
    69         """reads the state file and returns a dictionary which contain
    70         data in the same format as it was before storing"""
    70         data in the same format as it was before storing"""
    71         with self._repo.vfs(self.fname, 'rb') as fp:
    71         with self._repo.vfs(self.fname, 'rb') as fp:
    72             try:
    72             try:
    73                 version = int(fp.readline())
    73                 int(fp.readline())
    74             except ValueError:
    74             except ValueError:
    75                 raise error.ProgrammingError("unknown version of state file"
    75                 raise error.ProgrammingError("unknown version of state file"
    76                                              " found")
    76                                              " found")
    77             return cbor.load(fp)
    77             return cbor.load(fp)
    78 
    78