D4131: dirstate: use visitchildrenset in traverse
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Wed Aug 8 11:16:35 EDT 2018
yuja added a comment.
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.
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