[PATCH 5 of 5] hgweb: make log streams compatible with command server
Yuya Nishihara
yuya at tcha.org
Wed Nov 2 08:02:17 EDT 2016
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1403928812 -32400
# Sat Jun 28 13:13:32 2014 +0900
# Node ID 827132690102f124cf5ee9d1888fdddba1987b9d
# Parent e1a050ebbf75c6f512fe041864a1e53b647c3967
# EXP-Topic stdio
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.
diff --git a/mercurial/hgweb/server.py b/mercurial/hgweb/server.py
--- a/mercurial/hgweb/server.py
+++ b/mercurial/hgweb/server.py
@@ -281,8 +281,8 @@ class MercurialHTTPServer(_mixin, httpse
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
More information about the Mercurial-devel
mailing list