Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 21817:6b0275e5f276
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.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 28 Jun 2014 13:02:44 +0900 |
parents | 15baed3f24ee |
children | 448714b79d9a |
comparison
equal
deleted
inserted
replaced
21816:212955411633 | 21817:6b0275e5f276 |
---|---|
5320 write = self.ui.status | 5320 write = self.ui.status |
5321 else: | 5321 else: |
5322 write = self.ui.write | 5322 write = self.ui.write |
5323 write(_('listening at http://%s%s/%s (bound to %s:%d)\n') % | 5323 write(_('listening at http://%s%s/%s (bound to %s:%d)\n') % |
5324 (fqaddr, port, prefix, bindaddr, self.httpd.port)) | 5324 (fqaddr, port, prefix, bindaddr, self.httpd.port)) |
5325 self.ui.flush() # avoid buffering of status message | |
5325 | 5326 |
5326 def run(self): | 5327 def run(self): |
5327 self.httpd.serve_forever() | 5328 self.httpd.serve_forever() |
5328 | 5329 |
5329 | 5330 |