373 raise Abort('%s not under root' % myname) |
373 raise Abort('%s not under root' % myname) |
374 |
374 |
375 def matcher(canonroot, cwd='', names=['.'], inc=[], exc=[], head='', src=None): |
375 def matcher(canonroot, cwd='', names=['.'], inc=[], exc=[], head='', src=None): |
376 return _matcher(canonroot, cwd, names, inc, exc, head, 'glob', src) |
376 return _matcher(canonroot, cwd, names, inc, exc, head, 'glob', src) |
377 |
377 |
378 def cmdmatcher(canonroot, cwd='', names=['.'], inc=[], exc=[], head='', src=None): |
378 def cmdmatcher(canonroot, cwd='', names=['.'], inc=[], exc=[], head='', |
379 names = expand_glob(names) |
379 src=None, globbed=False): |
|
380 if not globbed: |
|
381 names = expand_glob(names) |
380 return _matcher(canonroot, cwd, names, inc, exc, head, 'relpath', src) |
382 return _matcher(canonroot, cwd, names, inc, exc, head, 'relpath', src) |
381 |
383 |
382 def _matcher(canonroot, cwd, names, inc, exc, head, dflt_pat, src): |
384 def _matcher(canonroot, cwd, names, inc, exc, head, dflt_pat, src): |
383 """build a function to match a set of file patterns |
385 """build a function to match a set of file patterns |
384 |
386 |