# HG changeset patch # User Matt Harbison # Date 1548632057 18000 # Node ID 52a4a3e7cc6a8b4abdcabdbeaf3fbb9bc614ce37 # Parent 7df10ea7a5b8562c1b198d12afc439d58bbcc123 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. diff -r 7df10ea7a5b8 -r 52a4a3e7cc6a mercurial/hgweb/server.py --- 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):