comparison mercurial/util.py @ 4055:e37786b29bed

docopy: deal with globs on windows in a better way
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Tue, 30 Jan 2007 18:32:20 -0200
parents e6d54283c090
children 3600b84656d3
comparison
equal deleted inserted replaced
4054:e6d54283c090 4055:e37786b29bed
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