py3: use util.forcebytestr to convert testedwith value to bytes
authorPulkit Goyal <7895pulkit@gmail.com>
Mon, 05 Mar 2018 01:03:23 +0530
changeset 36720 3fdba7fb264d
parent 36719 390d16ea7c76
child 36721 981f328d6d16
py3: use util.forcebytestr to convert testedwith value to bytes Bad extensions can put anything in testedwith so we should use util.forcebytestr here. Differential Revision: https://phab.mercurial-scm.org/D2663
mercurial/dispatch.py
--- a/mercurial/dispatch.py	Sun Mar 04 22:33:59 2018 +0530
+++ b/mercurial/dispatch.py	Mon Mar 05 01:03:23 2018 +0530
@@ -990,7 +990,7 @@
     if worst[0] is not None:
         name, testedwith, report = worst
         if not isinstance(testedwith, (bytes, str)):
-            testedwith = '.'.join([str(c) for c in testedwith])
+            testedwith = '.'.join([util.forcebytestr(c) for c in testedwith])
         warning = (_('** Unknown exception encountered with '
                      'possibly-broken third-party extension %s\n'
                      '** which supports versions %s of Mercurial.\n'