Mercurial > hg
changeset 6420:626a8e396846
merge with crew
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Mon, 31 Mar 2008 18:49:15 +0200 |
parents | 7c36aee46bf5 (diff) 593a598a9377 (current diff) |
children | b1204fd06c2e |
files | |
diffstat | 2 files changed, 16 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Mar 31 13:10:47 2008 +0200 +++ b/mercurial/commands.py Mon Mar 31 18:49:15 2008 +0200 @@ -2527,8 +2527,17 @@ if port == ':80': port = '' - ui.status(_('listening at http://%s%s/%s (%s:%d)\n') % - (self.httpd.fqaddr, port, prefix, self.httpd.addr, self.httpd.port)) + bindaddr = self.httpd.addr + if bindaddr == '0.0.0.0': + bindaddr = '*' + elif ':' in bindaddr: # IPv6 + bindaddr = '[%s]' % bindaddr + + fqaddr = self.httpd.fqaddr + if ':' in fqaddr: + fqaddr = '[%s]' % fqaddr + ui.status(_('listening at http://%s%s/%s (bound to %s:%d)\n') % + (fqaddr, port, prefix, bindaddr, self.httpd.port)) def run(self): self.httpd.serve_forever()
--- a/tests/test-serve.out Mon Mar 31 13:10:47 2008 +0200 +++ b/tests/test-serve.out Mon Mar 31 18:49:15 2008 +0200 @@ -1,12 +1,12 @@ % Without -v access log created - .hg/hgrc respected % With -v -listening at http://localhost/ (127.0.0.1) +listening at http://localhost/ (bound to 127.0.0.1) % With --prefix foo -listening at http://localhost/foo/ (127.0.0.1) +listening at http://localhost/foo/ (bound to 127.0.0.1) % With --prefix /foo -listening at http://localhost/foo/ (127.0.0.1) +listening at http://localhost/foo/ (bound to 127.0.0.1) % With --prefix foo/ -listening at http://localhost/foo/ (127.0.0.1) +listening at http://localhost/foo/ (bound to 127.0.0.1) % With --prefix /foo/ -listening at http://localhost/foo/ (127.0.0.1) +listening at http://localhost/foo/ (bound to 127.0.0.1)