mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
d1905b7d87
This adds util.getport(port) which tries to parse port as an int, and failing that, looks it up using socket.getservbyname(). Thus, the following will work: [smtp] port = submission [web] port = http This does not apply to ports in URLs used in clone, pull, etc.
26 lines
757 B
Plaintext
26 lines
757 B
Plaintext
% Without -v
|
|
access log created - .hg/hgrc respected
|
|
% errors
|
|
% With -v
|
|
listening at http://localhost/ (bound to 127.0.0.1:HGPORT1)
|
|
% errors
|
|
% With -v and -p HGPORT2
|
|
listening at http://localhost/ (bound to 127.0.0.1:HGPORT2)
|
|
% errors
|
|
% With -v and -p http (should fail)
|
|
abort: cannot start server at 'localhost:80': Permission denied
|
|
abort: child process failed to start
|
|
% errors
|
|
% With --prefix foo
|
|
listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
|
|
% errors
|
|
% With --prefix /foo
|
|
listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
|
|
% errors
|
|
% With --prefix foo/
|
|
listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
|
|
% errors
|
|
% With --prefix /foo/
|
|
listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
|
|
% errors
|