comparison mercurial/match.py @ 41672:c302218a2528

match: allow passing in badfn to always() and never() So that no callers are required to access the matchers themselves. Differential Revision: https://phab.mercurial-scm.org/D5926
author Martin von Zweigbergk <martinvonz@google.com>
date Sun, 10 Feb 2019 14:16:33 -0800
parents a13268524c25
children ddbebce94665
comparison
equal deleted inserted replaced
41671:34ae00a14783 41672:c302218a2528
192 return m 192 return m
193 193
194 def exact(root, cwd, files, badfn=None): 194 def exact(root, cwd, files, badfn=None):
195 return exactmatcher(root, cwd, files, badfn=badfn) 195 return exactmatcher(root, cwd, files, badfn=badfn)
196 196
197 def always(root, cwd): 197 def always(root, cwd, badfn=None):
198 return alwaysmatcher(root, cwd) 198 return alwaysmatcher(root, cwd, badfn=badfn)
199 199
200 def never(root, cwd): 200 def never(root, cwd, badfn=None):
201 return nevermatcher(root, cwd) 201 return nevermatcher(root, cwd, badfn=badfn)
202 202
203 def badmatch(match, badfn): 203 def badmatch(match, badfn):
204 """Make a copy of the given matcher, replacing its bad method with the given 204 """Make a copy of the given matcher, replacing its bad method with the given
205 one. 205 one.
206 """ 206 """