Patchwork D3578: state: set canonical=True to write deterministically

login
register
mail settings
Submitter phabricator
Date May 21, 2018, 5:40 p.m.
Message ID <9d4adb762958cfed88f75b77de368fd7@localhost.localdomain>
Download mbox | patch
Permalink /patch/31780/
State Not Applicable
Headers show

Comments

phabricator - May 21, 2018, 5:40 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG18c6d8b565bf: state: set canonical=True to write deterministically (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3578?vs=8733&id=8852

REVISION DETAIL
  https://phab.mercurial-scm.org/D3578

AFFECTED FILES
  mercurial/state.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, martinvonz
Cc: mercurial-devel

Patch

diff --git a/mercurial/state.py b/mercurial/state.py
--- a/mercurial/state.py
+++ b/mercurial/state.py
@@ -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