Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 6419:7c36aee46bf5
hg serve: add clearer message when starting the server with --verbose
Explicitly tell the address is the one the process is bound to.
Fix the printing of IPv6 addresses.
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Mon, 31 Mar 2008 18:44:12 +0200 |
parents | b8346ae5d64b |
children | b1204fd06c2e |
comparison
equal
deleted
inserted
replaced
6417:13fafd8cc4a1 | 6419:7c36aee46bf5 |
---|---|
2525 | 2525 |
2526 port = ':%d' % self.httpd.port | 2526 port = ':%d' % self.httpd.port |
2527 if port == ':80': | 2527 if port == ':80': |
2528 port = '' | 2528 port = '' |
2529 | 2529 |
2530 ui.status(_('listening at http://%s%s/%s (%s:%d)\n') % | 2530 bindaddr = self.httpd.addr |
2531 (self.httpd.fqaddr, port, prefix, self.httpd.addr, self.httpd.port)) | 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 def run(self): | 2542 def run(self): |
2534 self.httpd.serve_forever() | 2543 self.httpd.serve_forever() |
2535 | 2544 |
2536 service = service() | 2545 service = service() |