##// END OF EJS Templates
match: remove ctx argument from code path down to _buildmatch()...
Yuya Nishihara -
r38600:6467286b default
parent child Browse files
Show More
@@ -100,7 +100,7 b' def _buildkindpatsmatcher(matchercls, ro'
100 fset, kindpats = _expandsets(kindpats, ctx, listsubrepos)
100 fset, kindpats = _expandsets(kindpats, ctx, listsubrepos)
101 matchers = []
101 matchers = []
102 if kindpats:
102 if kindpats:
103 m = matchercls(root, cwd, kindpats, ctx=ctx, listsubrepos=listsubrepos,
103 m = matchercls(root, cwd, kindpats, listsubrepos=listsubrepos,
104 badfn=badfn)
104 badfn=badfn)
105 matchers.append(m)
105 matchers.append(m)
106 if fset:
106 if fset:
@@ -410,13 +410,12 b' class predicatematcher(basematcher):'
410
410
411 class patternmatcher(basematcher):
411 class patternmatcher(basematcher):
412
412
413 def __init__(self, root, cwd, kindpats, ctx=None, listsubrepos=False,
413 def __init__(self, root, cwd, kindpats, listsubrepos=False, badfn=None):
414 badfn=None):
415 super(patternmatcher, self).__init__(root, cwd, badfn)
414 super(patternmatcher, self).__init__(root, cwd, badfn)
416
415
417 self._files = _explicitfiles(kindpats)
416 self._files = _explicitfiles(kindpats)
418 self._prefix = _prefix(kindpats)
417 self._prefix = _prefix(kindpats)
419 self._pats, self.matchfn = _buildmatch(ctx, kindpats, '$', listsubrepos,
418 self._pats, self.matchfn = _buildmatch(kindpats, '$', listsubrepos,
420 root)
419 root)
421
420
422 @propertycache
421 @propertycache
@@ -441,11 +440,10 b' class patternmatcher(basematcher):'
441
440
442 class includematcher(basematcher):
441 class includematcher(basematcher):
443
442
444 def __init__(self, root, cwd, kindpats, ctx=None, listsubrepos=False,
443 def __init__(self, root, cwd, kindpats, listsubrepos=False, badfn=None):
445 badfn=None):
446 super(includematcher, self).__init__(root, cwd, badfn)
444 super(includematcher, self).__init__(root, cwd, badfn)
447
445
448 self._pats, self.matchfn = _buildmatch(ctx, kindpats, '(?:/|$)',
446 self._pats, self.matchfn = _buildmatch(kindpats, '(?:/|$)',
449 listsubrepos, root)
447 listsubrepos, root)
450 self._prefix = _prefix(kindpats)
448 self._prefix = _prefix(kindpats)
451 roots, dirs = _rootsanddirs(kindpats)
449 roots, dirs = _rootsanddirs(kindpats)
@@ -842,7 +840,7 b' def _regex(kind, pat, globsuffix):'
842 return _globre(pat) + globsuffix
840 return _globre(pat) + globsuffix
843 raise error.ProgrammingError('not a regex pattern: %s:%s' % (kind, pat))
841 raise error.ProgrammingError('not a regex pattern: %s:%s' % (kind, pat))
844
842
845 def _buildmatch(ctx, kindpats, globsuffix, listsubrepos, root):
843 def _buildmatch(kindpats, globsuffix, listsubrepos, root):
846 '''Return regexp string and a matcher function for kindpats.
844 '''Return regexp string and a matcher function for kindpats.
847 globsuffix is appended to the regexp of globs.'''
845 globsuffix is appended to the regexp of globs.'''
848 matchfuncs = []
846 matchfuncs = []
General Comments 0
You need to be logged in to leave comments. Login now