##// END OF EJS Templates
hg serve: add clearer message when starting the server with --verbose...
Benoit Boissinot -
r6419:7c36aee4 default
parent child Browse files
Show More
@@ -2527,8 +2527,17 b' def serve(ui, repo, **opts):'
2527 2527 if port == ':80':
2528 2528 port = ''
2529 2529
2530 ui.status(_('listening at http://%s%s/%s (%s:%d)\n') %
2531 (self.httpd.fqaddr, port, prefix, self.httpd.addr, self.httpd.port))
2530 bindaddr = self.httpd.addr
2531 if bindaddr == '0.0.0.0':
2532 bindaddr = '*'
2533 elif ':' in bindaddr: # IPv6
2534 bindaddr = '[%s]' % bindaddr
2535
2536 fqaddr = self.httpd.fqaddr
2537 if ':' in fqaddr:
2538 fqaddr = '[%s]' % fqaddr
2539 ui.status(_('listening at http://%s%s/%s (bound to %s:%d)\n') %
2540 (fqaddr, port, prefix, bindaddr, self.httpd.port))
2532 2541
2533 2542 def run(self):
2534 2543 self.httpd.serve_forever()
@@ -1,12 +1,12 b''
1 1 % Without -v
2 2 access log created - .hg/hgrc respected
3 3 % With -v
4 listening at http://localhost/ (127.0.0.1)
4 listening at http://localhost/ (bound to 127.0.0.1)
5 5 % With --prefix foo
6 listening at http://localhost/foo/ (127.0.0.1)
6 listening at http://localhost/foo/ (bound to 127.0.0.1)
7 7 % With --prefix /foo
8 listening at http://localhost/foo/ (127.0.0.1)
8 listening at http://localhost/foo/ (bound to 127.0.0.1)
9 9 % With --prefix foo/
10 listening at http://localhost/foo/ (127.0.0.1)
10 listening at http://localhost/foo/ (bound to 127.0.0.1)
11 11 % With --prefix /foo/
12 listening at http://localhost/foo/ (127.0.0.1)
12 listening at http://localhost/foo/ (bound to 127.0.0.1)
General Comments 0
You need to be logged in to leave comments. Login now