##// END OF EJS Templates
match: delete unused argument "listsubrepos" from _buildmatch()...
Martin von Zweigbergk -
r41818:a1326852 default
parent child Browse files
Show More
@@ -103,8 +103,7 b' def _buildkindpatsmatcher(matchercls, ro'
103 fms, kindpats = _expandsets(root, cwd, kindpats, ctx=ctx,
103 fms, kindpats = _expandsets(root, cwd, kindpats, ctx=ctx,
104 listsubrepos=listsubrepos, badfn=badfn)
104 listsubrepos=listsubrepos, badfn=badfn)
105 if kindpats:
105 if kindpats:
106 m = matchercls(root, cwd, kindpats, listsubrepos=listsubrepos,
106 m = matchercls(root, cwd, kindpats, badfn=badfn)
107 badfn=badfn)
108 matchers.append(m)
107 matchers.append(m)
109 if fms:
108 if fms:
110 matchers.extend(fms)
109 matchers.extend(fms)
@@ -437,13 +436,12 b' class predicatematcher(basematcher):'
437
436
438 class patternmatcher(basematcher):
437 class patternmatcher(basematcher):
439
438
440 def __init__(self, root, cwd, kindpats, listsubrepos=False, badfn=None):
439 def __init__(self, root, cwd, kindpats, badfn=None):
441 super(patternmatcher, self).__init__(root, cwd, badfn)
440 super(patternmatcher, self).__init__(root, cwd, badfn)
442
441
443 self._files = _explicitfiles(kindpats)
442 self._files = _explicitfiles(kindpats)
444 self._prefix = _prefix(kindpats)
443 self._prefix = _prefix(kindpats)
445 self._pats, self.matchfn = _buildmatch(kindpats, '$', listsubrepos,
444 self._pats, self.matchfn = _buildmatch(kindpats, '$', root)
446 root)
447
445
448 @propertycache
446 @propertycache
449 def _dirs(self):
447 def _dirs(self):
@@ -516,11 +514,10 b' class _dirchildren(object):'
516
514
517 class includematcher(basematcher):
515 class includematcher(basematcher):
518
516
519 def __init__(self, root, cwd, kindpats, listsubrepos=False, badfn=None):
517 def __init__(self, root, cwd, kindpats, badfn=None):
520 super(includematcher, self).__init__(root, cwd, badfn)
518 super(includematcher, self).__init__(root, cwd, badfn)
521
519
522 self._pats, self.matchfn = _buildmatch(kindpats, '(?:/|$)',
520 self._pats, self.matchfn = _buildmatch(kindpats, '(?:/|$)', root)
523 listsubrepos, root)
524 self._prefix = _prefix(kindpats)
521 self._prefix = _prefix(kindpats)
525 roots, dirs, parents = _rootsdirsandparents(kindpats)
522 roots, dirs, parents = _rootsdirsandparents(kindpats)
526 # roots are directories which are recursively included.
523 # roots are directories which are recursively included.
@@ -1105,7 +1102,7 b' def _regex(kind, pat, globsuffix):'
1105 return _globre(pat) + globsuffix
1102 return _globre(pat) + globsuffix
1106 raise error.ProgrammingError('not a regex pattern: %s:%s' % (kind, pat))
1103 raise error.ProgrammingError('not a regex pattern: %s:%s' % (kind, pat))
1107
1104
1108 def _buildmatch(kindpats, globsuffix, listsubrepos, root):
1105 def _buildmatch(kindpats, globsuffix, root):
1109 '''Return regexp string and a matcher function for kindpats.
1106 '''Return regexp string and a matcher function for kindpats.
1110 globsuffix is appended to the regexp of globs.'''
1107 globsuffix is appended to the regexp of globs.'''
1111 matchfuncs = []
1108 matchfuncs = []
General Comments 0
You need to be logged in to leave comments. Login now