Mercurial > hg
changeset 29335:631617262e55
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.
author | Martijn Pieters <mjpieters@fb.com> |
---|---|
date | Wed, 08 Jun 2016 16:18:43 +0100 |
parents | ecc9b788fd69 |
children | 9368ed12f3c0 |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Tue Jun 07 20:29:54 2016 -0700 +++ b/mercurial/cmdutil.py Wed Jun 08 16:18:43 2016 +0100 @@ -2147,7 +2147,8 @@ 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.