mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
files: cache repo.dirstate
For a large repo, 'hg files' goes from 2.27 seconds to 1.92.
This commit is contained in:
parent
41071b4456
commit
f1c5684fc4
@ -3219,8 +3219,9 @@ def files(ui, repo, *pats, **opts):
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user