mercurial/state.py
changeset 38105 18c6d8b565bf
parent 38104 36a5a1239a15
child 38106 a0e4d654bceb
equal deleted inserted replaced
38104:36a5a1239a15 38105:18c6d8b565bf
    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: