Fri, 03 Jul 2020 13:45:59 +0530 chg: suppress OSError in _restoreio() and add some logging (issue6330)
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 03 Jul 2020 13:45:59 +0530] rev 45035
chg: suppress OSError in _restoreio() and add some logging (issue6330) According to issue6330, running chg on heavy loaded systems can lead to following error: ``` Traceback (most recent call last): File "path-to-hg/mercurial/commandserver.py", line 650, in _acceptnewconnection self._runworker(conn) File "path-to-hg/mercurial/commandserver.py", line 701, in _runworker prereposetups=[self._reposetup], File "path-to-hg/mercurial/commandserver.py", line 470, in _serverequest sv.cleanup() File "path-to-hg/mercurial/chgserver.py", line 381, in cleanup self._restoreio() File "path-to-hg/mercurial/chgserver.py", line 444, in _restoreio os.dup2(fd, fp.fileno()) OSError: [Errno 16] Device or resource busy ``` [man dup2] indicates that, on Linux, EBUSY comes from a race condition between open() and dup2(). However it's not clear why open() race occurred for newfd=stdin/out/err. We suppress the OSError in _restoreio() since the forked worker process will finish anyway and add some logging. Thanks to Mitchell Plamann for a detailed bug description and Yuya Nishihara for suggesting the fix.
Fri, 03 Jul 2020 23:25:19 +0200 py3: fix crash when server address is 0.0.0.0 (issue6362) stable
Manuel Jacob <me@manueljacob.de> [Fri, 03 Jul 2020 23:25:19 +0200] rev 45034
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).
Thu, 02 Jul 2020 19:54:44 +0200 ui: fix Python 2.7 support for ui.timestamp-output
Joerg Sonnenberger <joerg@bec.de> [Thu, 02 Jul 2020 19:54:44 +0200] rev 45033
ui: fix Python 2.7 support for ui.timestamp-output Differential Revision: https://phab.mercurial-scm.org/D8675
Wed, 01 Jul 2020 14:28:12 -0400 merge with stable
Augie Fackler <augie@google.com> [Wed, 01 Jul 2020 14:28:12 -0400] rev 45032
merge with stable
Wed, 01 Jul 2020 15:43:15 +0200 run-tests: find python binary on Python 3 (issue6361) stable
Axel Hecht <axel@pike.org> [Wed, 01 Jul 2020 15:43:15 +0200] rev 45031
run-tests: find python binary on Python 3 (issue6361) Return strings from _findprogram as all callers expect unicode strings. Previously the check in _usecorrectpython agains sysexecutable was always false on Python 3. Differential Revision: https://phab.mercurial-scm.org/D8674
Mon, 29 Jun 2020 16:36:53 +0200 tests: ignore possible diagnostics from gpg 2.2 stable
Joerg Sonnenberger <joerg@bec.de> [Mon, 29 Jun 2020 16:36:53 +0200] rev 45030
tests: ignore possible diagnostics from gpg 2.2 Differential Revision: https://phab.mercurial-scm.org/D8672
Wed, 01 Jul 2020 23:30:47 +0530 Added signature for changeset 0ea9c86fac89 stable
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 01 Jul 2020 23:30:47 +0530] rev 45029
Added signature for changeset 0ea9c86fac89
Wed, 01 Jul 2020 23:30:39 +0530 Added tag 5.4.2 for changeset 0ea9c86fac89 stable
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 01 Jul 2020 23:30:39 +0530] rev 45028
Added tag 5.4.2 for changeset 0ea9c86fac89
Tue, 30 Jun 2020 07:23:29 +0200 convert: handle percent-encoded bytes in file URLs like Subversion stable 5.4.2
Manuel Jacob <me@manueljacob.de> [Tue, 30 Jun 2020 07:23:29 +0200] rev 45027
convert: handle percent-encoded bytes in file URLs like Subversion 75b59d221aa3 added most of the code that gets removed by this patch. It helped making progress on Python 3, but the reasoning was wrong in many ways. I tried to retract it while it was queued, but it was too late. Back then, I was asssuming that what happened on Python 2 (preserving bytes) is correct and my Python 3 change is a hack. However it turned out that Subversion interprets percent-encoded bytes as UTF-8. Accepting the same format as Subversion is a good idea. Consistency with urlreq.pathname2url() (as described in the removed comment) doesn’t matter because that function is only used for passing paths to urllib. This is not a backwards-incompatible change because before 5c0d5b48e58c, non-ASCII filenames didn’t work at all on Python 2. When the locale encoding is ISO-8859-15, `svn` accepts `file:///tmp/a%E2%82%AC` for `/tmp/a€`. Before this patch, this was the case for this extension on Python 3, but not on Python 2. This patch makes it work like with `svn` on both Python 2 and Python 3.
Tue, 30 Jun 2020 16:39:45 +0200 convert: add docstring on convert.subversion.geturl() stable
Manuel Jacob <me@manueljacob.de> [Tue, 30 Jun 2020 16:39:45 +0200] rev 45026
convert: add docstring on convert.subversion.geturl() The function is unusual for a bytes-handling function in Mercurial because it can’t handle arbitrary bytes. Therefore we should document this fact. Pointed out by Yuya Nishihara while reviewing e3b19004087a.
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip