diff -r 46c97973ee46 -r af0a19d8812b mercurial/wireprotoserver.py --- a/mercurial/wireprotoserver.py Sat Feb 17 01:09:56 2018 -0500 +++ b/mercurial/wireprotoserver.py Sat Feb 17 01:11:48 2018 -0500 @@ -339,7 +339,7 @@ # TODO This response body assumes the failed command was # "unbundle." That assumption is not always valid. - req.respond(e, HGTYPE, body='0\n%s\n' % e) + req.respond(e, HGTYPE, body='0\n%s\n' % pycompat.bytestr(e)) return ''