mercurial/commands.py
changeset 1177 862f53c1d0f9
parent 1147 d32b91ebad5d
child 1187 120aa5fc7ced
equal deleted inserted replaced
1176:ba4ce38b90a3 1177:862f53c1d0f9
  1384     optlist = "name templates style address port ipv6 accesslog errorlog"
  1384     optlist = "name templates style address port ipv6 accesslog errorlog"
  1385     for o in optlist.split():
  1385     for o in optlist.split():
  1386         if opts[o]:
  1386         if opts[o]:
  1387             ui.setconfig("web", o, opts[o])
  1387             ui.setconfig("web", o, opts[o])
  1388 
  1388 
  1389     httpd = hgweb.create_server(repo)
  1389     try:
       
  1390         httpd = hgweb.create_server(repo)
       
  1391     except socket.error, inst:
       
  1392         raise util.Abort('cannot start server: ' + inst.args[1])
  1390 
  1393 
  1391     if ui.verbose:
  1394     if ui.verbose:
  1392         addr, port = httpd.socket.getsockname()
  1395         addr, port = httpd.socket.getsockname()
  1393         if addr == '0.0.0.0':
  1396         if addr == '0.0.0.0':
  1394             addr = socket.gethostname()
  1397             addr = socket.gethostname()