py3: force hgweb.server error log to internally write unicode
Otherwise, there's a lot of py2/py3 divergence in the LFS tests because of the
"HG error" lines picking up a b'' prefix. wsgicgi.py uses procutil.stderr, so I
assume the input was meant to be bytes.
--- a/mercurial/hgweb/server.py Sun Jan 27 17:48:15 2019 -0500
+++ b/mercurial/hgweb/server.py Sun Jan 27 18:34:17 2019 -0500
@@ -54,7 +54,7 @@
self.writelines(str.split('\n'))
def writelines(self, seq):
for msg in seq:
- self.handler.log_error("HG error: %s", msg)
+ self.handler.log_error(r"HG error: %s", encoding.strfromlocal(msg))
class _httprequesthandler(httpservermod.basehttprequesthandler):