mercurial/dirstate.py
changeset 38956 a3cabe9415e1
parent 36995 d5d42c170f4d
child 38959 0d032756e9bf
--- a/mercurial/dirstate.py	Mon Aug 06 12:52:33 2018 -0700
+++ b/mercurial/dirstate.py	Tue Jul 31 16:47:43 2018 -0700
@@ -893,8 +893,11 @@
             wadd = work.append
             while work:
                 nd = work.pop()
-                if not match.visitdir(nd):
+                visitentries = match.visitchildrenset(nd)
+                if not visitentries:
                     continue
+                if visitentries == 'this' or visitentries == 'all':
+                    visitentries = None
                 skip = None
                 if nd == '.':
                     nd = ''
@@ -909,6 +912,8 @@
                         continue
                     raise
                 for f, kind, st in entries:
+                    if visitentries and f not in visitentries:
+                        continue
                     if normalizefile:
                         # even though f might be a directory, we're only
                         # interested in comparing it to files currently in the