Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.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 | 328ca3b9e545 |
children | 0531dff73d0b |
comparison
equal
deleted
inserted
replaced
41674:e178b131906a | 41675:ddbebce94665 |
---|---|
1250 """ | 1250 """ |
1251 if match: | 1251 if match: |
1252 if includeexact and not self._narrowmatch.always(): | 1252 if includeexact and not self._narrowmatch.always(): |
1253 # do not exclude explicitly-specified paths so that they can | 1253 # do not exclude explicitly-specified paths so that they can |
1254 # be warned later on | 1254 # be warned later on |
1255 em = matchmod.exact(match._root, match._cwd, match.files()) | 1255 em = matchmod.exact(None, None, match.files()) |
1256 nm = matchmod.unionmatcher([self._narrowmatch, em]) | 1256 nm = matchmod.unionmatcher([self._narrowmatch, em]) |
1257 return matchmod.intersectmatchers(match, nm) | 1257 return matchmod.intersectmatchers(match, nm) |
1258 return matchmod.intersectmatchers(match, self._narrowmatch) | 1258 return matchmod.intersectmatchers(match, self._narrowmatch) |
1259 return self._narrowmatch | 1259 return self._narrowmatch |
1260 | 1260 |