Mercurial > hg
view tests/histedit-helpers.sh @ 45034:b1a1702262c9 stable
py3: fix crash when server address is 0.0.0.0 (issue6362)
`socket.getfqdn()` assumes that the name is passed as `str` on Python 3 and
always returns `str` in this case. Mercurial passed `bytes` (but still expected
a `str` result), which worked by chance in many cases, except for e.g.
b'0.0.0.0', which was returned unchanged, breaking later code.
Instead of calling `socket.getfqdn()`, we can also use `self.server_name` from
the base `HTTPServer` class, which already stores the FQDN of the locally-bound
socket name (see `BaseHTTPServer.py` in the Python 2 stdlib and
`http/server.py` in the Python 3 stdlib).
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Fri, 03 Jul 2020 23:25:19 +0200 |
parents | 890273343170 |
children |
line wrap: on
line source
fixbundle() { grep -v 'saving bundle' | grep -v 'saved backup' | \ grep -v added | grep -v adding | \ grep -v "unable to find 'e' for patching" | \ grep -v "e: No such file or directory" | \ cat }