errors: raise InputError on recursive template definition
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 12 Nov 2020 10:41:03 -0800
changeset 46120 c000eff2c635
parent 46119 9261f6c1d39b
child 46121 84130fd74a22
errors: raise InputError on recursive template definition Differential Revision: https://phab.mercurial-scm.org/D9602
mercurial/templater.py
tests/test-template-basic.t
--- a/mercurial/templater.py	Mon Nov 23 16:39:53 2020 -0800
+++ b/mercurial/templater.py	Thu Nov 12 10:41:03 2020 -0800
@@ -451,7 +451,7 @@
 
 
 def _runrecursivesymbol(context, mapping, key):
-    raise error.Abort(_(b"recursive reference '%s' in template") % key)
+    raise error.InputError(_(b"recursive reference '%s' in template") % key)
 
 
 def buildtemplate(exp, context):
--- a/tests/test-template-basic.t	Mon Nov 23 16:39:53 2020 -0800
+++ b/tests/test-template-basic.t	Thu Nov 12 10:41:03 2020 -0800
@@ -265,7 +265,7 @@
   > EOF
   $ hg log --style ./issue4758
   abort: recursive reference 'changeset' in template
-  [255]
+  [10]
 
  not a recursion if a keyword of the same name exists: