equal
deleted
inserted
replaced
55 """write all the state data stored to .hg/<filename> file |
55 """write all the state data stored to .hg/<filename> file |
56 |
56 |
57 we use third-party library cbor to serialize data to write in the file. |
57 we use third-party library cbor to serialize data to write in the file. |
58 """ |
58 """ |
59 with self._repo.vfs(self.fname, 'wb', atomictemp=True) as fp: |
59 with self._repo.vfs(self.fname, 'wb', atomictemp=True) as fp: |
60 cbor.dump(self.opts, fp) |
60 cbor.dump(self.opts, fp, canonical=True) |
61 |
61 |
62 def _read(self): |
62 def _read(self): |
63 """reads the state file and returns a dictionary which contain |
63 """reads the state file and returns a dictionary which contain |
64 data in the same format as it was before storing""" |
64 data in the same format as it was before storing""" |
65 with self._repo.vfs(self.fname, 'rb') as fp: |
65 with self._repo.vfs(self.fname, 'rb') as fp: |