diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py index 599912a62ff65005b8b6c8e8c44a67855f0e0bbd_bWVyY3VyaWFsL2NtZHV0aWwucHk=..46825334f2702512c29a4c38448f2e72f5cf7f21_bWVyY3VyaWFsL2NtZHV0aWwucHk= 100644 --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2155,8 +2155,5 @@ # Revset matchers often operate faster on revisions in changelog # order, because most filters deal with the changelog. revs.reverse() - matcher = revset.match(repo.ui, expr) - # Revset matches can reorder revisions. "A or B" typically returns - # returns the revision matching A then the revision matching B. Sort - # again to fix that. + matcher = revset.match(repo.ui, expr, order=revset.followorder) revs = matcher(repo, revs) @@ -2162,5 +2159,5 @@ revs = matcher(repo, revs) - revs.sort(reverse=True) + revs.reverse() if limit is not None: limitedrevs = [] for idx, rev in enumerate(revs): diff --git a/tests/test-glog-topological.t b/tests/test-glog-topological.t index 599912a62ff65005b8b6c8e8c44a67855f0e0bbd_dGVzdHMvdGVzdC1nbG9nLXRvcG9sb2dpY2FsLnQ=..46825334f2702512c29a4c38448f2e72f5cf7f21_dGVzdHMvdGVzdC1nbG9nLXRvcG9sb2dpY2FsLnQ= 100644 --- a/tests/test-glog-topological.t +++ b/tests/test-glog-topological.t @@ -60,6 +60,20 @@ o 0 +(display nodes filtered by log options) + + $ hg log -G -r 'sort(all(), topo)' -k '.3' + o 8 + | + o 3 + | + ~ + o 7 + | + o 6 + | + ~ + (revset skipping nodes) $ hg log -G --rev 'sort(not (2+6), topo)'