##// END OF EJS Templates
util._matcher: fix handling of path: patterns
Alexis S. L. Carvalho -
r4189:b1716a1f default
parent child Browse files
Show More
@@ -479,14 +479,14 b' def _matcher(canonroot, cwd, names, inc,'
479 name = canonpath(canonroot, cwd, name)
479 name = canonpath(canonroot, cwd, name)
480 if name == '':
480 if name == '':
481 kind, name = 'glob', '**'
481 kind, name = 'glob', '**'
482 elif kind == 'relglob':
482 elif kind in ('relglob', 'path'):
483 name = normpath(name)
483 name = normpath(name)
484 if kind in ('glob', 'path', 're', 'relglob'):
484 if kind in ('glob', 're', 'relglob'):
485 pats.append((kind, name))
485 pats.append((kind, name))
486 if kind == 'glob':
486 if kind == 'glob':
487 root = globprefix(name)
487 root = globprefix(name)
488 roots.append(root)
488 roots.append(root)
489 elif kind == 'relpath':
489 elif kind in ('relpath', 'path'):
490 files.append((kind, name))
490 files.append((kind, name))
491 roots.append(name)
491 roots.append(name)
492 elif kind == 'relglob':
492 elif kind == 'relglob':
@@ -48,6 +48,7 b' hg debugwalk beans/.hg'
48 hg debugwalk glob:\*
48 hg debugwalk glob:\*
49 hg debugwalk 're:.*[kb]$'
49 hg debugwalk 're:.*[kb]$'
50 hg debugwalk path:beans/black
50 hg debugwalk path:beans/black
51 hg debugwalk path:beans//black
51 hg debugwalk relglob:Procyonidae
52 hg debugwalk relglob:Procyonidae
52 hg debugwalk relglob:Procyonidae/ fennel
53 hg debugwalk relglob:Procyonidae/ fennel
53 hg debugwalk beans 'glob:beans/*'
54 hg debugwalk beans 'glob:beans/*'
@@ -83,7 +83,8 b' f beans/black beans/black'
83 f fenugreek fenugreek
83 f fenugreek fenugreek
84 f glob:glob glob:glob
84 f glob:glob glob:glob
85 f mammals/skunk mammals/skunk
85 f mammals/skunk mammals/skunk
86 f beans/black beans/black
86 f beans/black beans/black exact
87 f beans/black beans/black exact
87 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
88 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
88 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
89 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
89 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
90 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
General Comments 0
You need to be logged in to leave comments. Login now