477 for kind, name in [patkind(p, dflt_pat) for p in names]: |
477 for kind, name in [patkind(p, dflt_pat) for p in names]: |
478 if kind in ('glob', 'relpath'): |
478 if kind in ('glob', 'relpath'): |
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': |
493 roots.append('.') |
493 roots.append('.') |
494 |
494 |