equal
deleted
inserted
replaced
354 |
354 |
355 patmatch = matchfn(pats, '$') or always |
355 patmatch = matchfn(pats, '$') or always |
356 filematch = matchfn(files, '(?:/|$)') or always |
356 filematch = matchfn(files, '(?:/|$)') or always |
357 incmatch = always |
357 incmatch = always |
358 if inc: |
358 if inc: |
359 incmatch = matchfn(map(patkind, inc), '(?:/|$)') |
359 inckinds = [patkind(canonpath(canonroot, cwd, i)) for i in inc] |
|
360 incmatch = matchfn(inckinds, '(?:/|$)') |
360 excmatch = lambda fn: False |
361 excmatch = lambda fn: False |
361 if exc: |
362 if exc: |
362 excmatch = matchfn(map(patkind, exc), '(?:/|$)') |
363 exckinds = [patkind(canonpath(canonroot, cwd, x)) for x in exc] |
|
364 excmatch = matchfn(exckinds, '(?:/|$)') |
363 |
365 |
364 return (roots, |
366 return (roots, |
365 lambda fn: (incmatch(fn) and not excmatch(fn) and |
367 lambda fn: (incmatch(fn) and not excmatch(fn) and |
366 (fn.endswith('/') or |
368 (fn.endswith('/') or |
367 (not pats and not files) or |
369 (not pats and not files) or |