Mercurial > public > mercurial-scm > hg
comparison mercurial/dispatch.py @ 36720:3fdba7fb264d
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
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 05 Mar 2018 01:03:23 +0530 |
parents | 68328202f270 |
children | 389b950f5190 |
comparison
equal
deleted
inserted
replaced
36719:390d16ea7c76 | 36720:3fdba7fb264d |
---|---|
988 if worst[0] is None or nearest < worst[1]: | 988 if worst[0] is None or nearest < worst[1]: |
989 worst = name, nearest, report | 989 worst = name, nearest, report |
990 if worst[0] is not None: | 990 if worst[0] is not None: |
991 name, testedwith, report = worst | 991 name, testedwith, report = worst |
992 if not isinstance(testedwith, (bytes, str)): | 992 if not isinstance(testedwith, (bytes, str)): |
993 testedwith = '.'.join([str(c) for c in testedwith]) | 993 testedwith = '.'.join([util.forcebytestr(c) for c in testedwith]) |
994 warning = (_('** Unknown exception encountered with ' | 994 warning = (_('** Unknown exception encountered with ' |
995 'possibly-broken third-party extension %s\n' | 995 'possibly-broken third-party extension %s\n' |
996 '** which supports versions %s of Mercurial.\n' | 996 '** which supports versions %s of Mercurial.\n' |
997 '** Please disable %s and try your action again.\n' | 997 '** Please disable %s and try your action again.\n' |
998 '** If that fixes the bug please report it to %s\n') | 998 '** If that fixes the bug please report it to %s\n') |