diff -r 67893a516272 -r 84d0e99c063a mercurial/cmdutil.py --- a/mercurial/cmdutil.py Wed Jan 03 15:58:59 2018 +0900 +++ b/mercurial/cmdutil.py Thu Jan 04 14:37:15 2018 +0900 @@ -2535,7 +2535,7 @@ return smartset.baseset(), None match, pats, slowpath = _makelogmatcher(repo, revs, pats, opts) if follow: - if slowpath or not pats: + if slowpath or match.always(): revs = dagop.revancestors(repo, revs, followfirst=followfirst) else: revs = _fileancestors(repo, revs, match, followfirst)