Mercurial > hg
changeset 19171:252de7b77cfd
dirstate.walk: move dirignore filter out of explicit walk code
This is a move towards factoring this code out into a separate function.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 07 May 2013 09:47:10 -0700 |
parents | b184e5041f2f |
children | c6cea2e2031b |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Tue May 07 09:29:43 2013 -0700 +++ b/mercurial/dirstate.py Tue May 07 09:47:10 2013 -0700 @@ -626,8 +626,7 @@ results[nf] = None if matchedir: matchedir(nf) - if not dirignore(nf): - wadd(nf) + wadd(nf) elif kind == regkind or kind == lnkkind: results[nf] = st else: @@ -649,6 +648,9 @@ else: badfn(ff, inst.strerror) + work = [d for d in work if not dirignore(d)] + wadd = work.append + # step 2: visit subdirectories while work: nd = work.pop()