comparison mercurial/stack.py @ 42698:77c52ce50e6a

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
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 18 Jul 2019 17:07:34 +0800
parents 68fcc5503ec5
children 763028fc6a69
comparison
equal deleted inserted replaced
42697:3e3fb15bfeea 42698:77c52ce50e6a
20 the revision and are not merges. 20 the revision and are not merges.
21 """ 21 """
22 if rev is None: 22 if rev is None:
23 rev = '.' 23 rev = '.'
24 24
25 revspec = 'reverse(only(%s) and not public() and not ::merge())' 25 revspec = 'only(%s) and not public() and not ::merge()'
26 revset = revsetlang.formatspec(revspec, rev) 26 revset = revsetlang.formatspec(revspec, rev)
27 revisions = scmutil.revrange(repo, [revset]) 27 revisions = scmutil.revrange(repo, [revset])
28 revisions.sort() 28 revisions.sort()
29 return revisions 29 return revisions