# HG changeset patch # User Matt Harbison # Date 2015-03-13 03:11:15 # Node ID 696ab1a24ae0ba4b9012028b9e184c24e3fbf9dc # Parent c9f4ef967a1dbbd94a438ebafb9332aef26c5a85 templater: replace 'ctx._repo' with 'ctx.repo()' diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -397,7 +397,7 @@ def showsubrepos(**args): def shownames(namespace, **args): """helper method to generate a template keyword for a namespace""" ctx = args['ctx'] - repo = ctx._repo + repo = ctx.repo() ns = repo.names[namespace] names = ns.names(repo, ctx.node()) return showlist(ns.templatename, names, plural=namespace, **args) diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -391,7 +391,7 @@ def revset(context, mapping, args): raw = args[0][1] ctx = mapping['ctx'] - repo = ctx._repo + repo = ctx.repo() def query(expr): m = revsetmod.match(repo.ui, expr)