changeset 46120:c000eff2c635

errors: raise InputError on recursive template definition Differential Revision: https://phab.mercurial-scm.org/D9602
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 12 Nov 2020 10:41:03 -0800
parents 9261f6c1d39b
children 84130fd74a22
files mercurial/templater.py tests/test-template-basic.t
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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: