Mercurial > public > mercurial-scm > hg-stable
diff mercurial/fileset.py @ 41686:ddbebce94665
match: delete unused root and cwd arguments to constructors (API)
Most matchers no longer need the root and cwd
arguments. patternmatcher and includematcher still need the root
argument for subincludes.
Differential Revision: https://phab.mercurial-scm.org/D5929
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sun, 10 Feb 2019 14:35:36 -0800 |
parents | 1db5ae4b0dda |
children | 0531dff73d0b |
line wrap: on
line diff
--- a/mercurial/fileset.py Sun Feb 10 21:33:21 2019 -0800 +++ b/mercurial/fileset.py Sun Feb 10 14:35:36 2019 -0800 @@ -499,9 +499,8 @@ """Create a matcher to select files by predfn(filename)""" if cache: predfn = util.cachefunc(predfn) - repo = self.ctx.repo() - return matchmod.predicatematcher(repo.root, repo.getcwd(), predfn, - predrepr=predrepr, badfn=self._badfn) + return matchmod.predicatematcher(predfn, predrepr=predrepr, + badfn=self._badfn) def fpredicate(self, predfn, predrepr=None, cache=False): """Create a matcher to select files by predfn(fctx) at the current