# HG changeset patch # User Bryan O'Sullivan # Date 1125512360 25200 # Node ID 862f53c1d0f93399e4c57fabbbebc17db43dad0b # Parent ba4ce38b90a3b419d3aeaf3e40b54afc0ba27e31 hg serve: print a more useful error message if server can't start. diff -r ba4ce38b90a3 -r 862f53c1d0f9 mercurial/commands.py --- a/mercurial/commands.py Wed Aug 31 10:54:46 2005 -0700 +++ b/mercurial/commands.py Wed Aug 31 11:19:20 2005 -0700 @@ -1386,7 +1386,10 @@ if opts[o]: ui.setconfig("web", o, opts[o]) - httpd = hgweb.create_server(repo) + 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()