changeset 36735:e79adc12cde3

templater: show repr of string we're rejecting I feel like this should make it a little easier to hunt down problems. Differential Revision: https://phab.mercurial-scm.org/D2659
author Augie Fackler <augie@google.com>
date Sun, 04 Mar 2018 12:33:15 -0500
parents a2fa51415ddc
children 2442927cdd96
files mercurial/templater.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templater.py	Sun Mar 04 12:21:01 2018 -0500
+++ b/mercurial/templater.py	Sun Mar 04 12:33:15 2018 -0500
@@ -1326,7 +1326,7 @@
         # We can only hit this on Python 3, and it's here to guard
         # against infinite recursion.
         raise error.ProgrammingError('Mercurial IO including templates is done'
-                                     ' with bytes, not strings')
+                                     ' with bytes, not strings, got %r' % thing)
     elif thing is None:
         pass
     elif not util.safehasattr(thing, '__iter__'):