diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -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__'):