Patchwork D1137: templater: don't blow up when trying to build an abort message

login
register
mail settings
Submitter phabricator
Date Oct. 17, 2017, 12:40 p.m.
Message ID <2684335220807854bde84bd37cdff2e9@localhost.localdomain>
Download mbox | patch
Permalink /patch/25097/
State Not Applicable
Headers show

Comments

phabricator - Oct. 17, 2017, 12:40 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe87e62b7fc0b: templater: don&#039;t blow up when trying to build an abort message (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1137?vs=2887&id=2911

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

AFFECTED FILES
  mercurial/templater.py

CHANGE DETAILS




To: durin42, #hg-reviewers, ryanmce
Cc: ryanmce, mercurial-devel

Patch

diff --git a/mercurial/templater.py b/mercurial/templater.py
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -427,7 +427,7 @@ 
         sym = findsymbolicname(arg)
         if sym:
             msg = (_("template filter '%s' is not compatible with keyword '%s'")
-                   % (filt.__name__, sym))
+                   % (filt.__name__.encode('ascii'), sym))
         else:
             msg = _("incompatible use of template filter '%s'") % filt.__name__
         raise error.Abort(msg)