Mercurial > hg
diff mercurial/cmdutil.py @ 28286:c7f89ad87bae
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 29 Feb 2016 17:52:17 -0600 |
parents | 41dcd7545266 c407583cf5f6 |
children | aa73d6a5d9ea |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sat Feb 27 21:29:42 2016 -0800 +++ b/mercurial/cmdutil.py Mon Feb 29 17:52:17 2016 -0600 @@ -2143,9 +2143,15 @@ # 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 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 if limit is not None: limitedrevs = [] for idx, r in enumerate(revs):