Patchwork D1145: templater: use pycompat.sysbytes to bytes-ify some __name__ attrs

login
register
mail settings
Submitter phabricator
Date Oct. 18, 2017, 12:46 p.m.
Message ID <23a2eed4778d852d97810df1313054c5@localhost.localdomain>
Download mbox | patch
Permalink /patch/25157/
State Not Applicable
Headers show

Comments

phabricator - Oct. 18, 2017, 12:46 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd3ea6a1c798f: templater: use pycompat.sysbytes to bytes-ify some __name__ attrs (authored by durin42, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D1145?vs=2918&id=2967#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1145?vs=2918&id=2967

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

AFFECTED FILES
  mercurial/templater.py

CHANGE DETAILS




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

Patch

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