Show More
@@ -232,7 +232,7 b' class dirstate(object):' | |||
|
232 | 232 | def _ignore(self): |
|
233 | 233 | files = self._ignorefiles() |
|
234 | 234 | if not files: |
|
235 |
return |
|
|
235 | return matchmod.never(self._root, '') | |
|
236 | 236 | |
|
237 | 237 | pats = ['include:%s' % f for f in files] |
|
238 | 238 | return matchmod.match(self._root, '', [], pats, warn=self._ui.warn) |
@@ -175,6 +175,9 b' def exact(root, cwd, files, badfn=None):' | |||
|
175 | 175 | def always(root, cwd): |
|
176 | 176 | return alwaysmatcher(root, cwd) |
|
177 | 177 | |
|
178 | def never(root, cwd): | |
|
179 | return nevermatcher(root, cwd) | |
|
180 | ||
|
178 | 181 | def badmatch(match, badfn): |
|
179 | 182 | """Make a copy of the given matcher, replacing its bad method with the given |
|
180 | 183 | one. |
@@ -339,6 +342,25 b' class alwaysmatcher(basematcher):' | |||
|
339 | 342 | def __repr__(self): |
|
340 | 343 | return '<alwaysmatcher>' |
|
341 | 344 | |
|
345 | class nevermatcher(basematcher): | |
|
346 | '''Matches nothing.''' | |
|
347 | ||
|
348 | def __init__(self, root, cwd, badfn=None, relativeuipath=False): | |
|
349 | super(nevermatcher, self).__init__(root, cwd, badfn, | |
|
350 | relativeuipath=relativeuipath) | |
|
351 | ||
|
352 | def always(self): | |
|
353 | return False | |
|
354 | ||
|
355 | def matchfn(self, f): | |
|
356 | return False | |
|
357 | ||
|
358 | def visitdir(self, dir): | |
|
359 | return False | |
|
360 | ||
|
361 | def __repr__(self): | |
|
362 | return '<nevermatcher>' | |
|
363 | ||
|
342 | 364 | class patternmatcher(basematcher): |
|
343 | 365 | |
|
344 | 366 | def __init__(self, root, cwd, kindpats, ctx=None, listsubrepos=False, |
General Comments 0
You need to be logged in to leave comments.
Login now