mail/hgweb: support service names for ports (issue2350)
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.
Showing
- hgext/zeroconf/__init__.py 3 additions, 3 deletionshgext/zeroconf/__init__.py
- mercurial/commands.py 1 addition, 1 deletionmercurial/commands.py
- mercurial/hgweb/server.py 1 addition, 1 deletionmercurial/hgweb/server.py
- mercurial/mail.py 1 addition, 1 deletionmercurial/mail.py
- mercurial/util.py 17 additions, 1 deletionmercurial/util.py
- tests/test-serve 8 additions, 1 deletiontests/test-serve
- tests/test-serve.out 4 additions, 0 deletionstests/test-serve.out
Loading
Please register or sign in to comment