changeset 29956:fa5e4f58dfbc

log: drop hack to fix order of revset (issue5100) Specify ordered=revset.followorder instead. This patch effectively backs out c407583cf5f6. revs.sort(reverse=True) is replaced by revs.reverse() because the matcher should no longer reorder revisions.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 03 May 2016 14:24:00 +0900
parents 1b5931604a5a
children 7d053ba73178
files mercurial/cmdutil.py
diffstat 1 files changed, 2 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Tue May 03 14:18:28 2016 +0900
+++ b/mercurial/cmdutil.py	Tue May 03 14:24:00 2016 +0900
@@ -2189,19 +2189,10 @@
         # order, because most filters deal with the changelog.
         if not opts.get('rev'):
             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.
-        fixopts = ['branch', 'only_branch', 'keyword', 'user']
-        oldrevs = revs
+        matcher = revset.match(repo.ui, expr, order=revset.followorder)
         revs = matcher(repo, revs)
         if not opts.get('rev'):
-            revs.sort(reverse=True)
-        elif len(pats) > 1 or any(len(opts.get(op, [])) > 1 for op in fixopts):
-            # XXX "A or B" is known to change the order; fix it by filtering
-            # matched set again (issue5100)
-            revs = oldrevs & revs
+            revs.reverse()
     if limit is not None:
         limitedrevs = []
         for idx, r in enumerate(revs):