Patchwork [2,of,3] files: replace 'ctx._repo' with 'ctx.repo()'

login
register
mail settings
Submitter Matt Harbison
Date March 13, 2015, 4:03 a.m.
Message ID <9388edb0223bb9114fd6.1426219389@Envy>
Download mbox | patch
Permalink /patch/8043/
State Accepted
Commit 18b5b2c9d921651a5dbaa349c5583c3a51fe5fbd
Headers show

Comments

Matt Harbison - March 13, 2015, 4:03 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1426215335 14400
#      Thu Mar 12 22:55:35 2015 -0400
# Node ID 9388edb0223bb9114fd6762d4df7776d15118b2e
# Parent  217a5fae7fbda2549569c27639420c5266677725
files: replace 'ctx._repo' with 'ctx.repo()'

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2222,7 +2222,7 @@ 
 def files(ui, ctx, m, fm, fmt):
     rev = ctx.rev()
     ret = 1
-    ds = ctx._repo.dirstate
+    ds = ctx.repo().dirstate
 
     for f in ctx.matches(m):
         if rev is None and ds[f] == 'r':