Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 17 Sep 2024 16:40:24 +0200] rev 51686
rust: bump rust-cpython version to 0.7.2
This version supports Python 3.12 while 0.7.1 did not.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Sep 2024 12:03:39 +0200] rev 51685
profiling: use "stat" profiler to profile individual request
The ls profiler no longer works for that. As the lsprof profiler is not default
and not great is general, lets side step the issue for now.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Sep 2024 12:02:38 +0200] rev 51684
profiling: improve 3.12 error message for calling lsprof twice
Python 3.12 prevent lsprof to be enabled if it is already enabled. This break
the use of lsprof in `hg serve` as both the initial `serve` command and the
request serving want to profile.
The "stat" profiler (the default) does not have this problem, so we focus on
improving the error message for now.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Sep 2024 00:41:37 +0200] rev 51683
test: display server error log in test-profile.t
This will help us to catch error with Python 3.12
Matt Harbison <mharbison@atto.com> [Thu, 05 Sep 2024 15:37:14 -0400] rev 51682
setup: handle removal of old MSVC compiler from setuptools 65.0 (issue6910)
It was removed a few years ago[1]. When trying to reproduce locally using a
clean py3.12 as called out in the bug report, `setuptools` wasn't installed at
all, and needed a `pip install` to fix a `ModuleNotFoundError` when building
locally. Maybe that needs to be in the requirements clause now.
It looks like this "private" module was added in setuptools 48.0.[2] I can't
find a changelog of what version was included in which version of python, and
the changelog for pip has a huge gap between when it called out 67.6.1 in `pip`
23.1 (2023-04-15), and 41.4.0 in `pip` 19.3 (2019-10-14).[3] So, we'll just add
to the existing code instead of replacing it, for safety.
[1] https://github.com/pypa/setuptools/commit/cc017c77948737d131f683e0c25cd37bc639b8fc
[2] https://github.com/pypa/setuptools/commit/d034a5ec7f707499139f90eb846b9e720923124c
[3] https://pip.pypa.io/en/stable/news/
Manuel Jacob <me@manueljacob.de> [Wed, 07 Aug 2024 22:05:36 +0200] rev 51681
merge: sort filemap only if requested by the caller
The name `sorted` refers to a built-in function, which is always true, so the else branch of this if statement was dead code.
Because, with this fix, the function can iterate over the dict items while yielding values, the dict should not change size while the generator is running. Because of that, it is required to re-introduce code that makes a caller copy the filemap before modification, which was removed in 3c783ff08d40cbaf36eb27ffe1d296718c0f1d77 (that changeset also introduced the filemap() method including the bug that’s being fixed by this changeset).
Manuel Jacob <me@manueljacob.de> [Fri, 09 Aug 2024 22:45:32 +0200] rev 51680
largefiles: fix check that ensures that --all-largefiles is only used locally
Previously, the command added in the test failed with “abort: --all-largefiles is incompatible with non-local destination existing_destination”.
The reason for the buggy behavior was the use of hg.islocal(), which does “return true if repo (or path pointing to repo) is local” and, for local paths, assumes that the path is actually pointing to an existing repository and returns whether the path is not a regular file (in which case it assumes that it is a bundlerepo, which are considered non-local).
Manuel Jacob <me@manueljacob.de> [Fri, 09 Aug 2024 14:26:13 +0200] rev 51679
import: fix erroneous comparison of str with bytes
Anton Shestakov <av6@dwimlabs.net> [Thu, 08 Aug 2024 17:28:38 +0400] rev 51678
histedit: create state and acquire locks earlier
This makes chistedit (histedit with curses UI) not write any files inside repo
without wlock. It also makes sense to wrap the entire process of preparing
commands inside the curses UI inside locks because we don't want anything else
to touch wdir or repo during this time.
Manuel Jacob <me@manueljacob.de> [Tue, 06 Aug 2024 22:51:41 +0200] rev 51677
py3: use str literal instead of bytes literal
Manuel Jacob <me@manueljacob.de> [Tue, 06 Aug 2024 18:23:59 +0200] rev 51676
typing: fix type annotation
Manuel Jacob <me@manueljacob.de> [Tue, 06 Aug 2024 17:53:59 +0200] rev 51675
cffi: pass bytes instead of str to ffi.new("char[]", …)
The type annotations seem to imply that the passed values are always already bytes, but they aren’t necessarily. Before Python 3.11, the documentation stated that bytes can be used to annotate arguments whose type is actually any of bytes, bytearray, or memoryview.
Manuel Jacob <me@manueljacob.de> [Mon, 05 Aug 2024 21:21:32 +0200] rev 51674
cffi: call bytes() instead of str() on CFFI buffer instances
Manuel Jacob <me@manueljacob.de> [Mon, 05 Aug 2024 21:08:36 +0200] rev 51673
cffi: pass C type and attribute names as str instead of bytes
Manuel Jacob <me@manueljacob.de> [Mon, 05 Aug 2024 20:47:17 +0200] rev 51672
py3: fix type of some elements of __all__ lists
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 01 Aug 2024 11:14:58 +0100] rev 51671
copytracing: fix a bug in an edge case in metadata.compute_all_files_changes
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 01 Aug 2024 13:04:38 +0100] rev 51670
rhg: ignore readonly FS error when saving dirstate
The error is already ignored when the .hg directory is read-only,
so this is only fair. (the python hg is silent on readonly fs, too)
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 16:34:37 +0200] rev 51669
Added signature for changeset 11a9e2fc0caf
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 16:34:35 +0200] rev 51668
Added tag 6.8.1 for changeset 11a9e2fc0caf
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 15:38:24 +0200] rev 51667
relnotes: add 6.8.1
Raphaël Gomès <rgomes@octobus.net> [Thu, 01 Aug 2024 14:00:07 +0200] rev 51666
rhg: expand user and environment variables in ignore includes
This was reported by a user, and was a TODO long overdue.
Julien Cristau <jcristau@debian.org> [Fri, 26 Jul 2024 10:52:28 +0200] rev 51665
demandimport: don't delay threading import
A recent cpython change breaks demandimport by importing threading
locally in importlib.util.LazyLoader.exec_module; add it (plus warnings
and _weakrefset, which are imported by threading) to demandimport's
ignore list.
```
Traceback (most recent call last):
File "/usr/bin/hg", line 57, in <module>
from mercurial import dispatch
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "/usr/lib/python3/dist-packages/hgdemandimport/demandimportpy3.py", line 52, in exec_module
super().exec_module(module)
File "<frozen importlib.util>", line 257, in exec_module
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "/usr/lib/python3/dist-packages/hgdemandimport/demandimportpy3.py", line 52, in exec_module
super().exec_module(module)
File "<frozen importlib.util>", line 267, in exec_module
AttributeError: partially initialized module 'threading' has no attribute 'RLock' (most likely due to a circular import)
```
Ref: https://github.com/python/cpython/issues/117983
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076449
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076747
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Jul 2024 11:10:40 -0400] rev 51664
win32mbcs: use str for encoding value
This was reported to the TortoiseHg tracker as:
https://foss.heptapod.net/mercurial/tortoisehg/thg/-/issues/5980
It doesn't look like we have any tests for this extension, but the explicit
type hints are enough to convince pytype that the module level `_encoding` attr
is str. The `encode()` and `decode()` methods are too complex to add type hints
for them.
Anton Shestakov <av6@dwimlabs.net> [Fri, 12 Jul 2024 15:29:35 +0400] rev 51663
copyright: update to 2024
Raphaël Gomès <rgomes@octobus.net> [Mon, 08 Jul 2024 17:52:08 +0200] rev 51662
Added signature for changeset 11f41248595b
Raphaël Gomès <rgomes@octobus.net> [Mon, 08 Jul 2024 17:51:56 +0200] rev 51661
Added tag 6.8 for changeset 11f41248595b
Raphaël Gomès <rgomes@octobus.net> [Mon, 08 Jul 2024 17:51:04 +0200] rev 51660
relnotes: add 6.8
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 08 Jul 2024 16:44:07 +0200] rev 51659
test-check: don't report distutils as a local import
On python 3.12 this is wrongly reported as a local import. So we adjust the
checker to avoid it.