Patchwork D4131: dirstate: use visitchildrenset in traverse

login
register
mail settings
Submitter phabricator
Date Aug. 8, 2018, 3:19 p.m.
Message ID <e3cb5800b1fd2472a4428a2e8231b4f3@localhost.localdomain>
Download mbox | patch
Permalink /patch/33423/
State Not Applicable
Headers show

Comments

phabricator - Aug. 8, 2018, 3:19 p.m.
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




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

Patch

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