Mercurial > hg
changeset 4189:b1716a1f79c4
util._matcher: fix handling of path: patterns
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 10 Mar 2007 23:00:49 -0300 |
parents | ce3ecf99a18b |
children | 769bc4af561d |
files | mercurial/util.py tests/test-walk tests/test-walk.out |
diffstat | 3 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Sat Mar 10 23:00:48 2007 -0300 +++ b/mercurial/util.py Sat Mar 10 23:00:49 2007 -0300 @@ -479,14 +479,14 @@ name = canonpath(canonroot, cwd, name) if name == '': kind, name = 'glob', '**' - elif kind == 'relglob': + elif kind in ('relglob', 'path'): name = normpath(name) - if kind in ('glob', 'path', 're', 'relglob'): + if kind in ('glob', 're', 'relglob'): pats.append((kind, name)) if kind == 'glob': root = globprefix(name) roots.append(root) - elif kind == 'relpath': + elif kind in ('relpath', 'path'): files.append((kind, name)) roots.append(name) elif kind == 'relglob':
--- a/tests/test-walk Sat Mar 10 23:00:48 2007 -0300 +++ b/tests/test-walk Sat Mar 10 23:00:49 2007 -0300 @@ -48,6 +48,7 @@ hg debugwalk glob:\* hg debugwalk 're:.*[kb]$' hg debugwalk path:beans/black +hg debugwalk path:beans//black hg debugwalk relglob:Procyonidae hg debugwalk relglob:Procyonidae/ fennel hg debugwalk beans 'glob:beans/*'
--- a/tests/test-walk.out Sat Mar 10 23:00:48 2007 -0300 +++ b/tests/test-walk.out Sat Mar 10 23:00:49 2007 -0300 @@ -83,7 +83,8 @@ f fenugreek fenugreek f glob:glob glob:glob f mammals/skunk mammals/skunk -f beans/black beans/black +f beans/black beans/black exact +f beans/black beans/black exact f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon