D4131: dirstate: use visitchildrenset in traverse
Yuya Nishihara
yuya at tcha.org
Wed Aug 8 11:15:15 EDT 2018
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.
More information about the Mercurial-devel
mailing list