Patchwork [1,of,3] reachableroots: sort the smartset in the pure version too

mail settings
Submitter Pierre-Yves David
Date Aug. 27, 2015, 7:25 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/10298/
State Accepted
Headers show


Pierre-Yves David - Aug. 27, 2015, 7:25 p.m.
# HG changeset patch
# User Pierre-Yves David <>
# Date 1440456042 25200
#      Mon Aug 24 15:40:42 2015 -0700
# Node ID c8a380090773ed60d31d8f8b4e01bbac797688b0
# Parent  05e7f57c74ac5b556b49870af86f61aa0c54babb
reachableroots: sort the smartset in the pure version too

Changeset be8a4e0800d8 use smarset lazy sorting for the C version. We need to
apply the same to the pure version for consistency. This is fixing the tests
with --pure.


diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -121,11 +121,13 @@  def reachablerootspure(repo, minroot, ro
         return reachable
     for rev in sorted(seen):
         for parent in seen[rev]:
             if parent in reachable:
-    return baseset(sorted(reachable))
+    reachable = baseset(reachable)
+    reachable.sort()
+    return reachable
 def reachableroots(repo, roots, heads, includepath=False):
     """return (heads(::<roots> and ::<heads>))
     If includepath is True, return (<roots>::<heads>)."""