Patchwork [1,of,6] dirstate.walk: maintain a list of dirs not found

login
register
mail settings
Submitter Siddharth Agarwal
Date May 7, 2013, 9:32 p.m.
Message ID <869ee5ce0194c7b931d1.1367962328@dev1091.prn1.facebook.com>
Download mbox | patch
Permalink /patch/1585/
State Accepted
Commit b184e5041f2f74436099fd70645c3ff31d08d780
Headers show

Comments

Siddharth Agarwal - May 7, 2013, 9:32 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1367944183 25200
#      Tue May 07 09:29:43 2013 -0700
# Node ID 869ee5ce0194c7b931d18754ff044f395a249984
# Parent  b7ceaf830c5b6b3034200d27ed7af272757e7c1f
dirstate.walk: maintain a list of dirs not found

Upcoming patches will factor out the walk over explicit files done in step 1.
This helps us get there.

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -607,6 +607,7 @@ 
         results['.hg'] = None
 
         # step 1: find all explicit files
+        dirsnotfound = []
         for ff in files:
             if normalize:
                 nf = normalize(normpath(ff), False, True)
@@ -642,6 +643,7 @@ 
                         if fn.startswith(prefix):
                             if matchedir:
                                 matchedir(nf)
+                            dirsnotfound.append(nf)
                             skipstep3 = False
                             break
                     else: