mercurial/phases.py
changeset 32000 511a62669f1b
parent 31342 1470b0f771c8
child 32822 e65ff29dbeb0
--- a/mercurial/phases.py	Thu Apr 13 18:04:38 2017 -0700
+++ b/mercurial/phases.py	Thu Apr 13 22:12:04 2017 -0700
@@ -116,6 +116,7 @@
     error,
     smartset,
     txnutil,
+    util,
 )
 
 allphases = public, draft, secret = range(3)
@@ -386,7 +387,8 @@
 
 def listphases(repo):
     """List phases root for serialization over pushkey"""
-    keys = {}
+    # Use ordered dictionary so behavior is deterministic.
+    keys = util.sortdict()
     value = '%i' % draft
     for root in repo._phasecache.phaseroots[draft]:
         keys[hex(root)] = value