obsolete: process markers in a stable order
authorMads Kiilerich <mads@kiilerich.com>
Tue, 15 Jan 2013 02:59:13 +0100
changeset 18365 4148414da120
parent 18364 6252b4f1c4b4
child 18366 fdf2f5730bd4
obsolete: process markers in a stable order Using set iteration order gave unstable debugsuccessorssets output with PYTHONHASHSEED=random.
mercurial/obsolete.py
tests/test-obsolete-divergent.t
--- a/mercurial/obsolete.py	Wed Dec 12 02:38:14 2012 +0100
+++ b/mercurial/obsolete.py	Tue Jan 15 02:59:13 2013 +0100
@@ -526,7 +526,7 @@
             #   Having none means pruned node, multiple successors means split,
             #   single successors are standard replacement.
             #
-            for mark in succmarkers[current]:
+            for mark in sorted(succmarkers[current]):
                 for suc in mark[1]:
                     if suc not in cache:
                         if suc in stackedset:
@@ -563,7 +563,7 @@
                 # duplicated entry and successors set that are strict subset of
                 # another one.
                 succssets = []
-                for mark in succmarkers[current]:
+                for mark in sorted(succmarkers[current]):
                     # successors sets contributed by this marker
                     markss = [[]]
                     for suc in mark[1]:
--- a/tests/test-obsolete-divergent.t	Wed Dec 12 02:38:14 2012 +0100
+++ b/tests/test-obsolete-divergent.t	Tue Jan 15 02:59:13 2013 +0100
@@ -76,8 +76,8 @@
   d20a80d4def3
       d20a80d4def3
   007dc284c1f8
+      82623d38b9ba
       392fd25390da
-      82623d38b9ba
   82623d38b9ba
       82623d38b9ba
   392fd25390da
@@ -123,8 +123,8 @@
   d20a80d4def3
       d20a80d4def3
   007dc284c1f8
+      82623d38b9ba
       01f36c5a8fda
-      82623d38b9ba
   82623d38b9ba
       82623d38b9ba
   392fd25390da
@@ -158,8 +158,8 @@
   d20a80d4def3
       d20a80d4def3
   007dc284c1f8
+      82623d38b9ba
       392fd25390da
-      82623d38b9ba
   82623d38b9ba
       82623d38b9ba
   392fd25390da