Patchwork [1,of,5] templater: fix invalid reference of runsymbol in doctest

login
register
mail settings
Submitter Yuya Nishihara
Date March 18, 2018, 4:39 a.m.
Message ID <8d89720b2d9c819d3357.1521347977@mimosa>
Download mbox | patch
Permalink /patch/29593/
State Accepted
Headers show

Comments

Yuya Nishihara - March 18, 2018, 4:39 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1521267734 -32400
#      Sat Mar 17 15:22:14 2018 +0900
# Node ID 8d89720b2d9c819d3357c4c82e31fb7eceb79e66
# Parent  a81427a2726fb71ae6cfbb5501734f69b7866aea
templater: fix invalid reference of runsymbol in doctest

Oversight at da710c3df4dc. I was just lucky that this lambda function is
never evaluated.
Pulkit Goyal - March 18, 2018, 2:25 p.m.
On Sun, Mar 18, 2018 at 10:09 AM, Yuya Nishihara <yuya@tcha.org> wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1521267734 -32400
> #      Sat Mar 17 15:22:14 2018 +0900
> # Node ID 8d89720b2d9c819d3357c4c82e31fb7eceb79e66
> # Parent  a81427a2726fb71ae6cfbb5501734f69b7866aea
> templater: fix invalid reference of runsymbol in doctest
>
> Oversight at da710c3df4dc. I was just lucky that this lambda function is
> never evaluated.

Queued the first two patches. Many thanks.

Patch

diff --git a/mercurial/templater.py b/mercurial/templater.py
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -402,7 +402,7 @@  def _buildfuncargs(exp, context, curmeth
     """Compile parsed tree of function arguments into list or dict of
     (func, data) pairs
 
-    >>> context = engine(lambda t: (runsymbol, t))
+    >>> context = engine(lambda t: (templateutil.runsymbol, t))
     >>> def fargs(expr, argspec):
     ...     x = _parseexpr(expr)
     ...     n = getsymbol(x[1])