Mercurial > hg
changeset 22594:1257cc6c1a2f
files: cache repo.dirstate
For a large repo, 'hg files' goes from 2.27 seconds to 1.92.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 30 Sep 2014 16:01:19 -0700 |
parents | ec47d4fde26d |
children | 244478687edd |
files | mercurial/commands.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Sep 30 15:21:35 2014 -0700 +++ b/mercurial/commands.py Tue Sep 30 16:01:19 2014 -0700 @@ -3219,8 +3219,9 @@ fmt = '%s' + end m = scmutil.match(ctx, pats, opts) + ds = repo.dirstate for f in ctx.matches(m): - if rev is None and repo.dirstate[f] == 'r': + if rev is None and ds[f] == 'r': continue fm.startitem() if ui.verbose: