##// END OF EJS Templates
util._matcher: remove superfluous variable
Alexis S. L. Carvalho -
r4236:34c4540c default
parent child Browse files
Show More
@@ -476,7 +476,6 b' def _matcher(canonroot, cwd, names, inc,'
476
476
477 def normalizepats(names, default):
477 def normalizepats(names, default):
478 pats = []
478 pats = []
479 files = []
480 roots = []
479 roots = []
481 anypats = False
480 anypats = False
482 for kind, name in [patkind(p, default) for p in names]:
481 for kind, name in [patkind(p, default) for p in names]:
@@ -484,18 +483,20 b' def _matcher(canonroot, cwd, names, inc,'
484 name = canonpath(canonroot, cwd, name)
483 name = canonpath(canonroot, cwd, name)
485 elif kind in ('relglob', 'path'):
484 elif kind in ('relglob', 'path'):
486 name = normpath(name)
485 name = normpath(name)
486
487 pats.append((kind, name))
488
487 if kind in ('glob', 're', 'relglob', 'relre'):
489 if kind in ('glob', 're', 'relglob', 'relre'):
488 pats.append((kind, name))
489 anypats = True
490 anypats = True
491
490 if kind == 'glob':
492 if kind == 'glob':
491 root = globprefix(name)
493 root = globprefix(name)
492 roots.append(root)
494 roots.append(root)
493 elif kind in ('relpath', 'path'):
495 elif kind in ('relpath', 'path'):
494 files.append((kind, name))
495 roots.append(name or '.')
496 roots.append(name or '.')
496 elif kind == 'relglob':
497 elif kind == 'relglob':
497 roots.append('.')
498 roots.append('.')
498 return roots, pats + files, anypats
499 return roots, pats, anypats
499
500
500 roots, pats, anypats = normalizepats(names, dflt_pat)
501 roots, pats, anypats = normalizepats(names, dflt_pat)
501
502
General Comments 0
You need to be logged in to leave comments. Login now