Mercurial > public > mercurial-scm > hg-stable
diff mercurial/fileset.py @ 41684:1db5ae4b0dda
cleanup: prefer matchmod.{always,never}() over accessing matchers directly
We have these factory methods so we should use them.
Differential Revision: https://phab.mercurial-scm.org/D5927
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sun, 10 Feb 2019 14:16:37 -0800 |
parents | aebfc4c5c855 |
children | ddbebce94665 |
line wrap: on
line diff
--- a/mercurial/fileset.py Sun Feb 10 14:16:33 2019 -0800 +++ b/mercurial/fileset.py Sun Feb 10 14:16:37 2019 -0800 @@ -540,8 +540,7 @@ def never(self): """Create a matcher to select nothing""" repo = self.ctx.repo() - return matchmod.nevermatcher(repo.root, repo.getcwd(), - badfn=self._badfn) + return matchmod.never(repo.root, repo.getcwd(), badfn=self._badfn) def match(ctx, expr, badfn=None): """Create a matcher for a single fileset expression"""