Mercurial > hg-stable
changeset 24955:1df233bcb7f6
remove: use ctx.hasdir(f) instead of 'f in ctx.dirs()'
This speeds up 'hg remove python/README' on the Firefox repo from
2.479s to 0.664s with lazily loaded treemanifests (which is not yet in
core) and has no measurable effect on flat manifests.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 21 Apr 2015 09:29:59 -0700 |
parents | e47feee55bf7 |
children | 48583a1e44f3 |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Mon May 04 23:04:12 2015 -0400 +++ b/mercurial/cmdutil.py Tue Apr 21 09:29:59 2015 -0700 @@ -2336,7 +2336,7 @@ return True return False - isdir = f in deleteddirs or f in wctx.dirs() + isdir = f in deleteddirs or wctx.hasdir(f) if f in repo.dirstate or isdir or f == '.' or insubrepo(): continue