Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 30007:46825334f270
graphlog: preserve topo sort even if additional filter options specified
Use ordered=revset.followorder instead. This change is logically the same
as fa5e4f58dfbc.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 22 Sep 2016 20:53:53 +0900 |
parents | e824de573112 |
children | 5aaa3d6b7e92 |
comparison
equal
deleted
inserted
replaced
30006:599912a62ff6 | 30007:46825334f270 |
---|---|
2153 revs.sort(reverse=True) | 2153 revs.sort(reverse=True) |
2154 if expr: | 2154 if expr: |
2155 # Revset matchers often operate faster on revisions in changelog | 2155 # Revset matchers often operate faster on revisions in changelog |
2156 # order, because most filters deal with the changelog. | 2156 # order, because most filters deal with the changelog. |
2157 revs.reverse() | 2157 revs.reverse() |
2158 matcher = revset.match(repo.ui, expr) | 2158 matcher = revset.match(repo.ui, expr, order=revset.followorder) |
2159 # Revset matches can reorder revisions. "A or B" typically returns | |
2160 # returns the revision matching A then the revision matching B. Sort | |
2161 # again to fix that. | |
2162 revs = matcher(repo, revs) | 2159 revs = matcher(repo, revs) |
2163 revs.sort(reverse=True) | 2160 revs.reverse() |
2164 if limit is not None: | 2161 if limit is not None: |
2165 limitedrevs = [] | 2162 limitedrevs = [] |
2166 for idx, rev in enumerate(revs): | 2163 for idx, rev in enumerate(revs): |
2167 if idx >= limit: | 2164 if idx >= limit: |
2168 break | 2165 break |