equal
deleted
inserted
replaced
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 |