dirstate.walk: pull skipstep3 out of the explicit walk code
authorSiddharth Agarwal <sid0@fb.com>
Tue, 07 May 2013 09:31:00 -0700
changeset 19172 c6cea2e2031b
parent 19171 252de7b77cfd
child 19173 ec70a78a70e0
dirstate.walk: pull skipstep3 out of the explicit walk code This is a move towards factoring out this code into a separate function.
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Tue May 07 09:47:10 2013 -0700
+++ b/mercurial/dirstate.py	Tue May 07 09:31:00 2013 -0700
@@ -620,7 +620,6 @@
                 st = lstat(join(nf))
                 kind = getkind(st.st_mode)
                 if kind == dirkind:
-                    skipstep3 = False
                     if nf in dmap:
                         #file deleted on disk but still in dirstate
                         results[nf] = None
@@ -643,11 +642,11 @@
                             if matchedir:
                                 matchedir(nf)
                             dirsnotfound.append(nf)
-                            skipstep3 = False
                             break
                     else:
                         badfn(ff, inst.strerror)
 
+        skipstep3 = skipstep3 and not (work or dirsnotfound)
         work = [d for d in work if not dirignore(d)]
         wadd = work.append