stack: remove unnecessary reverse() predicate
authorAnton Shestakov <av6@dwimlabs.net>
Thu, 18 Jul 2019 17:07:34 +0800
changeset 42720 77c52ce50e6a
parent 42719 3e3fb15bfeea
child 42721 911e25dc9d8c
stack: remove unnecessary reverse() predicate Stack already sorts revisions, so no need to do it twice. This change was a part of D2400, which didn't land for other reasons. See also D2399, where this change was suggested. Differential Revision: https://phab.mercurial-scm.org/D6706
mercurial/stack.py
--- a/mercurial/stack.py	Sat Aug 03 16:47:49 2019 -0700
+++ b/mercurial/stack.py	Thu Jul 18 17:07:34 2019 +0800
@@ -22,7 +22,7 @@
     if rev is None:
         rev = '.'
 
-    revspec = 'reverse(only(%s) and not public() and not ::merge())'
+    revspec = 'only(%s) and not public() and not ::merge()'
     revset = revsetlang.formatspec(revspec, rev)
     revisions = scmutil.revrange(repo, [revset])
     revisions.sort()