hg serve: print a more useful error message if server can't start.

This commit is contained in:
Bryan O'Sullivan 2005-08-31 11:19:20 -07:00
parent 70a5380415
commit 1f4f73a2eb

View File

@ -1386,7 +1386,10 @@ def serve(ui, repo, **opts):
if opts[o]:
ui.setconfig("web", o, opts[o])
try:
httpd = hgweb.create_server(repo)
except socket.error, inst:
raise util.Abort('cannot start server: ' + inst.args[1])
if ui.verbose:
addr, port = httpd.socket.getsockname()