diff -r f585c9bb85c1 -r 49463314c24f mercurial/hgweb/server.py --- a/mercurial/hgweb/server.py Fri Aug 27 16:25:47 2010 +0200 +++ b/mercurial/hgweb/server.py Sat Aug 28 12:31:07 2010 -0400 @@ -269,7 +269,7 @@ import mimetypes; mimetypes.init() address = ui.config('web', 'address', '') - port = int(ui.config('web', 'port', 8000)) + port = util.getport(ui.config('web', 'port', 8000)) try: return cls(ui, app, (address, port), handler) except socket.error, inst: