mercurial/util.py
changeset 4055 e37786b29bed
parent 4054 e6d54283c090
child 4057 3600b84656d3
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