diff 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
line wrap: on
line diff
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -356,10 +356,12 @@ def _matcher(canonroot, cwd, names, inc,
     filematch = matchfn(files, '(?:/|$)') or always
     incmatch = always
     if inc:
-        incmatch = matchfn(map(patkind, inc), '(?:/|$)')
+        inckinds = [patkind(canonpath(canonroot, cwd, i)) for i in inc]
+        incmatch = matchfn(inckinds, '(?:/|$)')
     excmatch = lambda fn: False
     if exc:
-        excmatch = matchfn(map(patkind, exc), '(?:/|$)')
+        exckinds = [patkind(canonpath(canonroot, cwd, x)) for x in exc]
+        excmatch = matchfn(exckinds, '(?:/|$)')
 
     return (roots,
             lambda fn: (incmatch(fn) and not excmatch(fn) and