Mercurial > hg
changeset 10635:27027bee318e
serve: fix port config
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Wed, 10 Mar 2010 22:27:42 +0100 |
parents | 768c76f0b4c8 |
children | 23ab3b05bd66 |
files | mercurial/commands.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Mar 10 22:07:38 2010 +0100 +++ b/mercurial/commands.py Wed Mar 10 22:27:42 2010 +0100 @@ -2881,6 +2881,10 @@ s = sshserver.sshserver(ui, repo) s.serve_forever() + # this way we can check if something was given in the command-line + if opts.get('port'): + opts['port'] = int(opts.get('port')) + baseui = repo and repo.baseui or ui optlist = ("name templates style address port prefix ipv6" " accesslog errorlog webdir_conf certificate encoding") @@ -3781,7 +3785,8 @@ ('d', 'daemon', None, _('run server in background')), ('', 'daemon-pipefds', '', _('used internally by daemon mode')), ('E', 'errorlog', '', _('name of error log file to write to')), - ('p', 'port', 8000, _('port to listen on')), + # use string type, then we can check if something was passed + ('p', 'port', '', _('port to listen on (default: 8000')), ('a', 'address', '', _('address to listen on (default: all interfaces)')), ('', 'prefix', '',