files: use ctx object to access dirstate

This allows the cmdutil method to not need to be passed the repo as well as the
ctx.
This commit is contained in:
Matt Harbison 2015-03-08 16:45:29 -04:00
parent f07fec4ff0
commit 51dee7bc7d

View File

@ -3268,7 +3268,7 @@ def files(ui, repo, *pats, **opts):
fmt = '%s' + end
m = scmutil.match(ctx, pats, opts)
ds = repo.dirstate
ds = ctx._repo.dirstate
for f in ctx.matches(m):
if rev is None and ds[f] == 'r':
continue