D6706: stack: remove unnecessary reverse() predicate
av6 (Anton Shestakov)
phabricator at mercurial-scm.org
Fri Aug 2 08:11:57 UTC 2019
av6 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Stack already sorts revisions, so no need to do it twice.
This change was a part of D2400 <https://phab.mercurial-scm.org/D2400>, which didn't land for other reasons. See also
D2399 <https://phab.mercurial-scm.org/D2399>, where this change was suggested.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D6706
AFFECTED FILES
mercurial/stack.py
CHANGE DETAILS
diff --git a/mercurial/stack.py b/mercurial/stack.py
--- a/mercurial/stack.py
+++ b/mercurial/stack.py
@@ -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()
To: av6, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list