D4131: dirstate: use visitchildrenset in traverse

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Wed Aug 8 11:19:54 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa3cabe9415e1: dirstate: use visitchildrenset in traverse (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4131?vs=10002&id=10076

REVISION DETAIL
  https://phab.mercurial-scm.org/D4131

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -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



To: spectral, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list