files: use ctx object to access dirstate
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 08 Mar 2015 16:45:29 -0400
changeset 24274 9640820bc957
parent 24273 ce847603040b
child 24275 e1cb460a3524
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.
mercurial/commands.py
--- a/mercurial/commands.py	Tue Mar 10 13:56:05 2015 -0700
+++ b/mercurial/commands.py	Sun Mar 08 16:45:29 2015 -0400
@@ -3268,7 +3268,7 @@
     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