graphmod: avoid sorting when already sorted

This is somewhat redundant now, but allows us to add a toposort that should not
be re-sorted either.
This commit is contained in:
Martijn Pieters 2016-06-08 16:18:43 +01:00
parent 7a668208b8
commit 747bfe58fe

View File

@ -2147,7 +2147,8 @@ def getgraphlogrevs(repo, pats, opts):
if opts.get('rev'):
# User-specified revs might be unsorted, but don't sort before
# _makelogrevset because it might depend on the order of revs
revs.sort(reverse=True)
if not revs.isdescending():
revs.sort(reverse=True)
if expr:
# Revset matchers often operate faster on revisions in changelog
# order, because most filters deal with the changelog.