Skip to content
Snippets Groups Projects
Commit bfb4494f authored by Gregory Szorc's avatar Gregory Szorc
Browse files

bookmarks: write bookmarks file deterministically

Bookmarks are internally stored as an unsorted dictionary. Let's at
least write out the bookmarks file in a deterministic order so it is
easier to test, diff, etc.

Differential Revision: https://phab.mercurial-scm.org/D2469
parent ab81e5a8
Branches
Tags
No related merge requests found
......@@ -179,7 +179,7 @@
self._aclean = True
def _write(self, fp):
for name, node in self.iteritems():
for name, node in sorted(self.iteritems()):
fp.write("%s %s\n" % (hex(node), encoding.fromlocal(name)))
self._clean = True
self._repo.invalidatevolatilesets()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment