From patchwork Sat Jun 28 05:23:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: serve: make sure to print "listening at" message immediately From: Yuya Nishihara X-Patchwork-Id: 5076 Message-Id: <839ca1a158ea5edf9a65.1403933019@mimosa> To: mercurial-devel@selenic.com Date: Sat, 28 Jun 2014 14:23:39 +0900 # HG changeset patch # User Yuya Nishihara # Date 1403928164 -32400 # Sat Jun 28 13:02:44 2014 +0900 # Node ID 839ca1a158ea5edf9a65060cf2add3d61793ee3d # Parent ecd66e735e0c9320e52f44925fd8d48a682d28a5 serve: make sure to print "listening at" message immediately If stdout is piped, status message won't be flushed until client connects to the server and access log is written to stdout. It seems bad idea to queue start-up banner of server process. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -5319,6 +5319,7 @@ class httpservice(object): write = self.ui.write write(_('listening at http://%s%s/%s (bound to %s:%d)\n') % (fqaddr, port, prefix, bindaddr, self.httpd.port)) + self.ui.flush() # avoid buffering of status message def run(self): self.httpd.serve_forever()