# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-03-04 19:33:23 # Node ID 3fdba7fb264df568beae7eed7fcc3ade0ae6ea56 # Parent 390d16ea7c7693606dc4b2a2e941d4ff84bc4339 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 diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -990,7 +990,7 @@ def _exceptionwarning(ui): 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'