D3569: py3: convert the report to bytes

Yuya Nishihara yuya at tcha.org
Wed May 16 07:35:15 EDT 2018


> --- a/mercurial/dispatch.py
> +++ b/mercurial/dispatch.py
> @@ -1028,7 +1028,7 @@
>                       '** which supports versions %s of Mercurial.\n'
>                       '** Please disable %s and try your action again.\n'
>                       '** If that fixes the bug please report it to %s\n')
> -                   % (name, testedwith, name, report))
> +                   % (name, testedwith, name, pycompat.bytestr(report)))

Maybe stringutil.forcebytestr()?

The report must be bytes, but a broken extension might provide a unicode
for example, and a unicode can't always be byte-ified with bytestr().


More information about the Mercurial-devel mailing list