Mercurial > hg-stable
changeset 19142:c3d3e4d75ec3
dirstate.walk: cache match.explicitdir and traversedir locally
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Fri, 03 May 2013 14:39:28 -0700 |
parents | aed8ec10c235 |
children | 3cb9468535bd |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Sun Apr 28 21:29:32 2013 -0700 +++ b/mercurial/dirstate.py Fri May 03 14:39:28 2013 -0700 @@ -561,6 +561,8 @@ matchfn = match.matchfn matchalways = match.always() + matchedir = match.explicitdir + matchtdir = match.traversedir badfn = match.bad dmap = self._map normpath = util.normpath @@ -621,7 +623,7 @@ if nf in dmap: #file deleted on disk but still in dirstate results[nf] = None - match.explicitdir(nf) + matchedir(nf) if not dirignore(nf): wadd(nf) elif kind == regkind or kind == lnkkind: @@ -637,7 +639,7 @@ prefix = nf + "/" for fn in dmap: if fn.startswith(prefix): - match.explicitdir(nf) + matchedir(nf) skipstep3 = False break else: @@ -666,7 +668,7 @@ if nf not in results: if kind == dirkind: if not ignore(nf): - match.traversedir(nf) + matchtdir(nf) wadd(nf) if nf in dmap and (matchalways or matchfn(nf)): results[nf] = None