[PATCH 1 of 2 V2] files: use ctx object to access dirstate
Matt Harbison
mharbison72 at gmail.com
Wed Mar 11 00:32:30 UTC 2015
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1425847529 14400
# Sun Mar 08 16:45:29 2015 -0400
# Node ID a8a49154503c2e7ca4c2ab796a76da42712f780b
# Parent 73191a7fdebbf8aa518eef5a65abb25678c5781f
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.
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -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
More information about the Mercurial-devel
mailing list