Mercurial > hg
changeset 8588:2624f485b9bc
dirstate: set more states in step 1 of walk
author | Simon Heimberg <simohe@besonet.ch> |
---|---|
date | Thu, 14 May 2009 10:50:45 +0200 |
parents | 8f15d54437b9 |
children | 3edf133dcb5a |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Sun May 24 02:56:22 2009 -0500 +++ b/mercurial/dirstate.py Thu May 14 10:50:45 2009 +0200 @@ -476,6 +476,9 @@ st = lstat(join(nf)) kind = getkind(st.st_mode) if kind == dirkind: + if nf in dmap: + #file deleted on disc but still in dirstate + results[nf] = None if not dirignore(nf): wadd(nf) elif kind == regkind or kind == lnkkind: @@ -488,14 +491,19 @@ keep = False prefix = nf + "/" for fn in dmap: - if nf == fn or fn.startswith(prefix): + if nf == fn: + if matchfn(nf): + results[nf] = None + keep = True + break + elif fn.startswith(prefix): keep = True break if not keep: if inst.errno != errno.ENOENT: fwarn(ff, inst.strerror) elif badfn(ff, inst.strerror): - if (nf in dmap or not ignore(nf)) and matchfn(nf): + if nf not in results and not ignore(nf) and matchfn(nf): results[nf] = None # step 2: visit subdirectories