D4131: dirstate: use visitchildrenset in traverse
spectral (Kyle Lippincott)
phabricator at mercurial-scm.org
Wed Aug 8 20:04:57 EDT 2018
spectral added a comment.
In https://phab.mercurial-scm.org/D4131#64347, @yuja wrote:
> Queued the series, thanks.
>
> > 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
>
> Correct me if I get it wrong:
>
> - visitentries is a list of direct sub-directories.
> - if there are any files to visit, visitentries should be either 'this' or 'all'.
> - so we don't have to check if `f` is a directory or not.
This is correct. I'll add a comment for future maintainers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4131
To: spectral, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list