changeset 44711:637eb7f7559b

revset: remove explicit sort() from unstable() The instability should be dealt with by baseset.__init__(), and the returned smartset is ordered by 'subset &' anyway.
author Yuya Nishihara <yuya@tcha.org>
date Wed, 15 Apr 2020 19:24:21 +0900
parents eca82eb9d777
children a825bfbf6642
files mercurial/revset.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Fri Apr 10 22:23:44 2020 +0800
+++ b/mercurial/revset.py	Wed Apr 15 19:24:21 2020 +0900
@@ -2531,9 +2531,7 @@
     _unstable.update(obsmod.getrevs(repo, b'orphan'))
     _unstable.update(obsmod.getrevs(repo, b'phasedivergent'))
     _unstable.update(obsmod.getrevs(repo, b'contentdivergent'))
-    _unstable = baseset(_unstable)
-    _unstable.sort()  # set is non-ordered, enforce order
-    return subset & _unstable
+    return subset & baseset(_unstable)
 
 
 @predicate(b'user(string)', safe=True, weight=10)