##// END OF EJS Templates
cleanup: prefer matchmod.{always,never}() over accessing matchers directly...
Martin von Zweigbergk -
r41822:1db5ae4b default
parent child Browse files
Show More
@@ -1313,9 +1313,9 b' def getbundler(version, repo, bundlecaps'
1313 assert version in supportedoutgoingversions(repo)
1313 assert version in supportedoutgoingversions(repo)
1314
1314
1315 if matcher is None:
1315 if matcher is None:
1316 matcher = matchmod.alwaysmatcher(repo.root, '')
1316 matcher = matchmod.always(repo.root, '')
1317 if oldmatcher is None:
1317 if oldmatcher is None:
1318 oldmatcher = matchmod.nevermatcher(repo.root, '')
1318 oldmatcher = matchmod.never(repo.root, '')
1319
1319
1320 if version == '01' and not matcher.always():
1320 if version == '01' and not matcher.always():
1321 raise error.ProgrammingError('version 01 changegroups do not support '
1321 raise error.ProgrammingError('version 01 changegroups do not support '
@@ -540,8 +540,7 b' class matchctx(object):'
540 def never(self):
540 def never(self):
541 """Create a matcher to select nothing"""
541 """Create a matcher to select nothing"""
542 repo = self.ctx.repo()
542 repo = self.ctx.repo()
543 return matchmod.nevermatcher(repo.root, repo.getcwd(),
543 return matchmod.never(repo.root, repo.getcwd(), badfn=self._badfn)
544 badfn=self._badfn)
545
544
546 def match(ctx, expr, badfn=None):
545 def match(ctx, expr, badfn=None):
547 """Create a matcher for a single fileset expression"""
546 """Create a matcher for a single fileset expression"""
@@ -323,7 +323,7 b' class abstractsubrepo(object):'
323
323
324 def matchfileset(self, expr, badfn=None):
324 def matchfileset(self, expr, badfn=None):
325 """Resolve the fileset expression for this repo"""
325 """Resolve the fileset expression for this repo"""
326 return matchmod.nevermatcher(self.wvfs.base, '', badfn=badfn)
326 return matchmod.never(self.wvfs.base, '', badfn=badfn)
327
327
328 def printfiles(self, ui, m, fm, fmt, subrepos):
328 def printfiles(self, ui, m, fm, fmt, subrepos):
329 """handle the files command for this subrepo"""
329 """handle the files command for this subrepo"""
General Comments 0
You need to be logged in to leave comments. Login now