##// END OF EJS Templates
Fix bug with empty inc and exc...
mpm@selenic.com -
r897:fe30f543 default
parent child Browse files
Show More
@@ -92,7 +92,7 b' def canonpath(repo, cwd, myname):'
92 return ''
92 return ''
93 else:
93 else:
94 raise Abort('%s not under repository root' % myname)
94 raise Abort('%s not under repository root' % myname)
95
95
96 def matcher(repo, cwd, names, inc, exc, head = ''):
96 def matcher(repo, cwd, names, inc, exc, head = ''):
97 def patkind(name):
97 def patkind(name):
98 for prefix in 're:', 'glob:', 'path:', 'relpath:':
98 for prefix in 're:', 'glob:', 'path:', 'relpath:':
@@ -141,11 +141,15 b' def matcher(repo, cwd, names, inc, exc, '
141 elif kind == 'relpath':
141 elif kind == 'relpath':
142 files.append((kind, name))
142 files.append((kind, name))
143 roots.append(name)
143 roots.append(name)
144
144
145 patmatch = matchfn(pats, '$') or always
145 patmatch = matchfn(pats, '$') or always
146 filematch = matchfn(files, '(?:/|$)') or always
146 filematch = matchfn(files, '(?:/|$)') or always
147 incmatch = matchfn(map(patkind, inc), '(?:/|$)') or always
147 incmatch = always
148 excmatch = matchfn(map(patkind, exc), '(?:/|$)') or (lambda fn: False)
148 if inc:
149 incmatch = matchfn(map(patkind, inc), '(?:/|$)')
150 excmatch = lambda fn: False
151 if exc:
152 excmatch = matchfn(map(patkind, exc), '(?:/|$)')
149
153
150 return roots, lambda fn: (incmatch(fn) and not excmatch(fn) and
154 return roots, lambda fn: (incmatch(fn) and not excmatch(fn) and
151 (fn.endswith('/') or
155 (fn.endswith('/') or
General Comments 0
You need to be logged in to leave comments. Login now