hgweb: make log streams compatible with command server
Even though it would be useless to start a web server by a command server,
it should be doable in principle. Also, we can't use sys.stdout/err directly
on Python 3 because they are unicode streams.
--- a/mercurial/hgweb/server.py Mon Feb 29 13:41:54 2016 +0900
+++ b/mercurial/hgweb/server.py Sat Jun 28 13:13:32 2014 +0900
@@ -281,8 +281,8 @@
prefix = '/' + prefix.strip('/')
self.prefix = prefix
- alog = openlog(ui.config('web', 'accesslog', '-'), sys.stdout)
- elog = openlog(ui.config('web', 'errorlog', '-'), sys.stderr)
+ alog = openlog(ui.config('web', 'accesslog', '-'), ui.fout)
+ elog = openlog(ui.config('web', 'errorlog', '-'), ui.ferr)
self.accesslog = alog
self.errorlog = elog