##// END OF EJS Templates
match: add some default args
Matt Mackall -
r8567:fea40a67 default
parent child Browse files
Show More
@@ -60,7 +60,7 b' def buildmatch(ui, repo, user, key):'
60 60 ui.debug(_('acl: %s enabled, %d entries for user %s\n') %
61 61 (key, len(pats), user))
62 62 if pats:
63 return match.match(repo.root, '', pats, [], [], 'glob')
63 return match.match(repo.root, '', pats)
64 64 return match.never(repo.root, '')
65 65
66 66
@@ -126,7 +126,7 b' class kwtemplater(object):'
126 126 self.ui = ui
127 127 self.repo = repo
128 128 self.matcher = match.match(repo.root, '', [],
129 kwtools['inc'], kwtools['exc'], 'glob')
129 kwtools['inc'], kwtools['exc'])
130 130 self.restrict = kwtools['hgcmd'] in restricted.split()
131 131
132 132 kwmaps = self.ui.configitems('keywordmaps')
@@ -55,7 +55,7 b' def _picktool(repo, ui, path, binary, sy'
55 55
56 56 # then patterns
57 57 for pat, tool in ui.configitems("merge-patterns"):
58 mf = match.match(repo.root, '', [pat], [], [], 'glob')
58 mf = match.match(repo.root, '', [pat])
59 59 if mf(path) and check(tool, pat, symlink, False):
60 60 toolpath = _findtool(ui, tool)
61 61 return (tool, '"' + toolpath + '"')
@@ -80,12 +80,12 b' def ignore(root, files, warn):'
80 80 return util.never
81 81
82 82 try:
83 ignorefunc = match.match(root, '', [], allpats, [], 'glob')
83 ignorefunc = match.match(root, '', [], allpats)
84 84 except util.Abort:
85 85 # Re-raise an exception where the src is the right file
86 86 for f, patlist in pats.iteritems():
87 87 try:
88 match.match(root, '', [], patlist, [], 'glob')
88 match.match(root, '', [], patlist)
89 89 except util.Abort, inst:
90 90 raise util.Abort('%s: %s' % (f, inst[0]))
91 91
@@ -528,7 +528,7 b' class localrepository(repo.repository):'
528 528 for pat, cmd in self.ui.configitems(filter):
529 529 if cmd == '!':
530 530 continue
531 mf = match_.match(self.root, '', [pat], [], [], 'glob')
531 mf = match_.match(self.root, '', [pat])
532 532 fn = None
533 533 params = cmd
534 534 for name, filterfn in self._datafilters.iteritems():
@@ -48,7 +48,8 b' class exact(_match):'
48 48 _match.__init__(self, root, cwd, files, self.exact, False)
49 49
50 50 class match(_match):
51 def __init__(self, root, cwd, patterns, include, exclude, default):
51 def __init__(self, root, cwd, patterns, include=[], exclude=[],
52 default='glob'):
52 53 f, mf, ap = util.matcher(root, cwd, patterns, include, exclude,
53 54 default)
54 55 _match.__init__(self, root, cwd, f, mf, ap)
General Comments 0
You need to be logged in to leave comments. Login now