comparison mercurial/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 0bd56c291359
children 0531dff73d0b
comparison
equal deleted inserted replaced
41674:e178b131906a 41675:ddbebce94665
262 262
263 def forceincludematcher(matcher, includes): 263 def forceincludematcher(matcher, includes):
264 """Returns a matcher that returns true for any of the forced includes 264 """Returns a matcher that returns true for any of the forced includes
265 before testing against the actual matcher.""" 265 before testing against the actual matcher."""
266 kindpats = [('path', include, '') for include in includes] 266 kindpats = [('path', include, '') for include in includes]
267 includematcher = matchmod.includematcher('', '', kindpats) 267 includematcher = matchmod.includematcher('', kindpats)
268 return matchmod.unionmatcher([includematcher, matcher]) 268 return matchmod.unionmatcher([includematcher, matcher])
269 269
270 def matcher(repo, revs=None, includetemp=True): 270 def matcher(repo, revs=None, includetemp=True):
271 """Obtain a matcher for sparse working directories for the given revs. 271 """Obtain a matcher for sparse working directories for the given revs.
272 272