[PATCH 1 of 3] reachableroots: sort the smartset in the pure version too
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu Aug 27 19:25:26 UTC 2015
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# 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/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -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:
reached(rev)
- 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>)."""
More information about the Mercurial-devel
mailing list