comparison hgext/sparse.py @ 41675: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 b05eb98a6b67
children 0531dff73d0b
comparison
equal deleted inserted replaced
41674:e178b131906a 41675:ddbebce94665
197 """ 197 """
198 198
199 def walk(orig, self, match, subrepos, unknown, ignored, full=True): 199 def walk(orig, self, match, subrepos, unknown, ignored, full=True):
200 # hack to not exclude explicitly-specified paths so that they can 200 # hack to not exclude explicitly-specified paths so that they can
201 # be warned later on e.g. dirstate.add() 201 # be warned later on e.g. dirstate.add()
202 em = matchmod.exact(match._root, match._cwd, match.files()) 202 em = matchmod.exact(None, None, match.files())
203 sm = matchmod.unionmatcher([self._sparsematcher, em]) 203 sm = matchmod.unionmatcher([self._sparsematcher, em])
204 match = matchmod.intersectmatchers(match, sm) 204 match = matchmod.intersectmatchers(match, sm)
205 return orig(self, match, subrepos, unknown, ignored, full) 205 return orig(self, match, subrepos, unknown, ignored, full)
206 206
207 extensions.wrapfunction(dirstate.dirstate, 'walk', walk) 207 extensions.wrapfunction(dirstate.dirstate, 'walk', walk)