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

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Wed Oct 18 08:46:51 EDT 2017


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

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



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


More information about the Mercurial-devel mailing list