# HG changeset patch # User Matt Mackall # Date 1243905901 18000 # Node ID a645904c88c4427a3274373c1187b9b4944ac76b # Parent 0550dfe4fca1114ca21b2a83c1431ac9cc330e1c dirstate: more accurate use of match.dir callback diff -r 0550dfe4fca1 -r a645904c88c4 mercurial/dirstate.py --- a/mercurial/dirstate.py Mon Jun 01 14:51:47 2009 -0500 +++ b/mercurial/dirstate.py Mon Jun 01 20:25:01 2009 -0500 @@ -486,6 +486,7 @@ if nf in dmap: #file deleted on disk but still in dirstate results[nf] = None + match.dir(nf) if not dirignore(nf): wadd(nf) elif kind == regkind or kind == lnkkind: @@ -501,6 +502,7 @@ prefix = nf + "/" for fn in dmap: if fn.startswith(prefix): + match.dir(nf) skipstep3 = False break else: @@ -509,8 +511,6 @@ # step 2: visit subdirectories while work: nd = work.pop() - if hasattr(match, 'dir'): - match.dir(nd) skip = None if nd == '.': nd = '' @@ -528,6 +528,7 @@ if nf not in results: if kind == dirkind: if not ignore(nf): + match.dir(nf) wadd(nf) if nf in dmap and matchfn(nf): results[nf] = None