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

2017-10-17 Thread yuja (Yuya Nishihara)
yuja added a comment.


  pycompat.sysbytes() can be used here.

REPOSITORY
  rHG Mercurial

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

To: durin42, #hg-reviewers, ryanmce
Cc: yuja, ryanmce, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


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

2017-10-17 Thread durin42 (Augie Fackler)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe87e62b7fc0b: templater: dont 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=2911

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

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



To: durin42, #hg-reviewers, ryanmce
Cc: ryanmce, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


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

2017-10-17 Thread ryanmce (Ryan McElroy)
ryanmce accepted this revision.
ryanmce added a comment.
This revision is now accepted and ready to land.


  queued

REPOSITORY
  rHG Mercurial

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

To: durin42, #hg-reviewers, ryanmce
Cc: ryanmce, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


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

2017-10-16 Thread durin42 (Augie Fackler)
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  __name__ is unicode, but we need bytes. For now, we'll make the
  (mostly-safe) assumption that template filter names will be ascii.

REPOSITORY
  rHG Mercurial

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

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



To: durin42, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel