Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 6575:e08e0367ba15
walk: kill util.cmdmatcher and _matcher
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 12 May 2008 11:37:07 -0500 |
parents | 962eb403165b |
children | 99a92acafdb9 |
comparison
equal
deleted
inserted
replaced
6574:76af1dff402a | 6575:e08e0367ba15 |
---|---|
410 break | 410 break |
411 name = dirname | 411 name = dirname |
412 | 412 |
413 raise Abort('%s not under root' % myname) | 413 raise Abort('%s not under root' % myname) |
414 | 414 |
415 def matcher(canonroot, cwd='', names=[], inc=[], exc=[], src=None): | 415 def matcher(canonroot, cwd='', names=[], inc=[], exc=[], src=None, dflt_pat='glob'): |
416 return _matcher(canonroot, cwd, names, inc, exc, 'glob', src) | |
417 | |
418 def cmdmatcher(canonroot, cwd='', names=[], inc=[], exc=[], src=None, | |
419 globbed=False, default=None): | |
420 default = default or 'relpath' | |
421 if default == 'relpath' and not globbed: | |
422 names = expand_glob(names) | |
423 return _matcher(canonroot, cwd, names, inc, exc, default, src) | |
424 | |
425 def _matcher(canonroot, cwd, names, inc, exc, dflt_pat, src): | |
426 """build a function to match a set of file patterns | 416 """build a function to match a set of file patterns |
427 | 417 |
428 arguments: | 418 arguments: |
429 canonroot - the canonical root of the tree you're matching against | 419 canonroot - the canonical root of the tree you're matching against |
430 cwd - the current working directory, if relevant | 420 cwd - the current working directory, if relevant |