Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 2480:519a1011db91
fix -I/-X when relative paths used or in subdir
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Wed, 21 Jun 2006 17:30:31 -0700 |
parents | 6904e1ef8ad1 |
children | 85f796baab10 |
comparison
equal
deleted
inserted
replaced
2479:10ec8039e1d8 | 2480:519a1011db91 |
---|---|
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 |