From patchwork Tue May 7 21:32:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3,of,6] dirstate.walk: pull skipstep3 out of the explicit walk code From: Siddharth Agarwal X-Patchwork-Id: 1584 Message-Id: <99df5ff49e9082a86d20.1367962330@dev1091.prn1.facebook.com> To: mercurial-devel@selenic.com Date: Tue, 07 May 2013 14:32:10 -0700 # HG changeset patch # User Siddharth Agarwal # Date 1367944260 25200 # Tue May 07 09:31:00 2013 -0700 # Node ID 99df5ff49e9082a86d20e8258a7cb69a304b1ec1 # Parent 924523a3e1fbd533419ce22c8bd036576b1d274d dirstate.walk: pull skipstep3 out of the explicit walk code This is a move towards factoring out this code into a separate function. diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -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