log: replace "not pats" with matcher attribute for consistency
authorYuya Nishihara <yuya@tcha.org>
Thu, 04 Jan 2018 14:37:15 +0900
changeset 35688 84d0e99c063a
parent 35687 67893a516272
child 35689 5fe6f946f111
log: replace "not pats" with matcher attribute for consistency We use match.always() in _makelogrevset(). match.always() is identical to "not pats" here since scmutil.matchandpats() empties pats in that case.
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)