diff -r 36a5a1239a15 -r 18c6d8b565bf mercurial/state.py --- a/mercurial/state.py Wed Mar 28 16:31:16 2018 +0530 +++ b/mercurial/state.py Fri May 18 16:34:19 2018 +0530 @@ -57,7 +57,7 @@ we use third-party library cbor to serialize data to write in the file. """ with self._repo.vfs(self.fname, 'wb', atomictemp=True) as fp: - cbor.dump(self.opts, fp) + cbor.dump(self.opts, fp, canonical=True) def _read(self): """reads the state file and returns a dictionary which contain