mercurial/dirstate.py
changeset 4188 dd0d9bd91e0a
parent 4173 b36bd7534c08
child 4195 b5d1eaade333
child 4254 a7cae4e22749
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -387,7 +387,10 @@ class dirstate(object):
                 return False
             return match(file_)
 
-        if ignored: imatch = match
+        ignore = self.ignore
+        if ignored:
+            imatch = match
+            ignore = util.never
 
         # self.root may end with a path separator when self.root == '/'
         common_prefix_len = len(self.root)
@@ -420,8 +423,7 @@ class dirstate(object):
                     # don't trip over symlinks
                     st = os.lstat(p)
                     if stat.S_ISDIR(st.st_mode):
-                        ds = util.pconvert(os.path.join(nd, f +'/'))
-                        if imatch(ds):
+                        if not ignore(p):
                             work.append(p)
                         if imatch(np) and np in dc:
                             yield 'm', np, st