mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
hg serve: print a more useful error message if server can't start.
This commit is contained in:
parent
70a5380415
commit
1f4f73a2eb
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user