Patchwork D2659: templater: show repr of string we're rejecting

login
register
mail settings
Submitter phabricator
Date March 4, 2018, 7:17 p.m.
Message ID <fc46bd2880b89d6f8a8c2ae3685b4628@localhost.localdomain>
Download mbox | patch
Permalink /patch/28965/
State Not Applicable
Headers show

Comments

phabricator - March 4, 2018, 7:17 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe79adc12cde3: templater: show repr of string we&#039;re rejecting (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2659?vs=6578&id=6587

REVISION DETAIL
  https://phab.mercurial-scm.org/D2659

AFFECTED FILES
  mercurial/templater.py

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit, indygreg
Cc: mercurial-devel

Patch

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__'):