Wed, 08 Jun 2022 14:03:23 +0200 docker: avoid /tmp write access issues by fixing permissions stable
Mathias De Mare <mathias.de_mare@nokia.com> [Wed, 08 Jun 2022 14:03:23 +0200] rev 49278
docker: avoid /tmp write access issues by fixing permissions
Sat, 04 Jun 2022 02:39:38 +0200 url: raise error if CONNECT request to proxy was unsuccessful stable
Manuel Jacob <me@manueljacob.de> [Sat, 04 Jun 2022 02:39:38 +0200] rev 49277
url: raise error if CONNECT request to proxy was unsuccessful The deleted code didn’t work on Python 3. On Python 2 (or Python 3 after adapting it), the function returned in the error case. The subsequent creation of SSL socket fails during handshake with a nonsense error. Instead, the user should get an error of what went wrong. I don’t see how the deleted code would be useful in the error case. The new code is also closer of what the standard library is doing nowadays that it has proxy support (which we don’t use in the moment). In the test, I use port 0 because all the HGPORTs were already taken. In practice, there should not be any server listening on port 0.
Fri, 03 Jun 2022 17:18:46 +0200 revset: fix the doc of "nodefromfile" stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Jun 2022 17:18:46 +0200] rev 49276
revset: fix the doc of "nodefromfile" This should maybe be called "nodesfromfile", but at least the documentation is correct (it was previously a copy past from follow).
Thu, 02 Jun 2022 23:57:56 +0200 chg: replace mercurial.util.recvfds() by simpler pure Python implementation
Manuel Jacob <me@manueljacob.de> [Thu, 02 Jun 2022 23:57:56 +0200] rev 49275
chg: replace mercurial.util.recvfds() by simpler pure Python implementation On Python 3, we have socket.socket.recvmsg(). This makes it possible to receive FDs in pure Python code. The new code behaves like the previous implementations, except that it’s more strict about the format of the ancillary data. This works because we know in which format the FDs are passed. Because the code is (and always has been) specific to chg (payload is 1 byte, number of passed FDs is limited) and we now have only one implementation and the code is very short, I decided to stop exposing a function in mercurial.util. Note on terminology: The SCM_RIGHTS mechanism is used to share open file descriptions to another process over a socket. The sending side passes an array of file descriptors and the receiving side receives an array of file descriptors. The file descriptors are different in general on both sides but refer to the same open file descriptions. The two terms are often conflated, even in the official documentation. That’s why I used “FD” above, which could mean both “file descriptor” and “file description”.
Thu, 02 Jun 2022 04:39:49 +0200 py3: don’t subscript socket.error stable
Manuel Jacob <me@manueljacob.de> [Thu, 02 Jun 2022 04:39:49 +0200] rev 49274
py3: don’t subscript socket.error On Python 2, socket.error was subscriptable. On Python 3, socket.error is an alias to OSError and is not subscriptable. The except block passes the exception to self.send_error(). This fails on both Python 2 (if it was executed) and Python 3, as it expects a string. Getting the attribute .strerror works on Python 2 and Python 3, and has the same effect as the previous code on Python 2.
Mon, 06 Jun 2022 13:58:32 +0400 parsers: drop one extra argument to PyErr_Format
Anton Shestakov <av6@dwimlabs.net> [Mon, 06 Jun 2022 13:58:32 +0400] rev 49273
parsers: drop one extra argument to PyErr_Format GCC gave the following warning during `make local`: mercurial/cext/parsers.c: In function 'dirstate_item_from_v1_data': mercurial/cext/parsers.c:413:30: warning: too many arguments for format [-Wformat-extra-args] 413 | "unknown state: `%c` (%d, %d, %d)", state, mode, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To reproduce, you might need to add the -Wformat-extra-args flag, because it isn't present for me when building for the default python3. But I can see this warning while simply building 6.1 with `make PYTHON=python2 clean local`. I don't think this NULL was useful, because other instances of PyErr_Format() don't have any NULLs as the final argument, but keep in mind that I don't know python's C API.
Thu, 02 Jun 2022 02:05:11 +0200 demandimport: eagerly load msvcrt module on PyPy stable
Manuel Jacob <me@manueljacob.de> [Thu, 02 Jun 2022 02:05:11 +0200] rev 49272
demandimport: eagerly load msvcrt module on PyPy
Fri, 03 Jun 2022 17:39:58 +0200 search-discovery-case: update documentation of a function
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Jun 2022 17:39:58 +0200] rev 49271
search-discovery-case: update documentation of a function We return data, it is simpler when we know what these data means.
Wed, 01 Jun 2022 03:08:15 +0200 ci: drop the phabricator refresh step stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 01 Jun 2022 03:08:15 +0200] rev 49270
ci: drop the phabricator refresh step Now that phabricator is no longer in us, we should avoid this useless step to save time and simplify things.
Sun, 22 May 2022 03:50:34 +0200 worker: avoid potential partial write of pickled data
Manuel Jacob <me@manueljacob.de> [Sun, 22 May 2022 03:50:34 +0200] rev 49269
worker: avoid potential partial write of pickled data Previously, the code wrote the pickled data using os.write(). However, os.write() can write less bytes than passed to it. To trigger the problem, the pickled data had to be larger than 2147479552 bytes on my system. Instead, open a file object and pass it to pickle.dump(). This also has the advantage that it doesn’t buffer the whole pickled data in memory. Note that the opened file must be buffered because pickle doesn’t support unbuffered streams because unbuffered streams’ write() method might write less bytes than passed to it (like os.write()) but pickle.dump() relies on that all bytes are written (see https://github.com/python/cpython/issues/93050). The side effect of using a file object and a with statement is that wfd is explicitly closed now while it seems like before it was implicitly closed by process exit.
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 tip