revset: remove explicit sort() from unstable()
authorYuya Nishihara <yuya@tcha.org>
Wed, 15 Apr 2020 19:24:21 +0900
changeset 44711 637eb7f7559b
parent 44710 eca82eb9d777
child 44712 a825bfbf6642
revset: remove explicit sort() from unstable() The instability should be dealt with by baseset.__init__(), and the returned smartset is ordered by 'subset &' anyway.
mercurial/revset.py
--- 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)