Mon, 28 Oct 2024 16:31:49 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 16:31:49 +0100] rev 52146
branching: merge stable into default
Mon, 28 Oct 2024 16:26:04 +0100 Added signature for changeset dc97e8670dec stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 16:26:04 +0100] rev 52145
Added signature for changeset dc97e8670dec
Mon, 28 Oct 2024 16:26:03 +0100 Added tag 6.9rc0 for changeset dc97e8670dec stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 16:26:03 +0100] rev 52144
Added tag 6.9rc0 for changeset dc97e8670dec
Mon, 28 Oct 2024 16:25:23 +0100 doc: register the `config-doc` rst directive stable 6.9rc0
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 16:25:23 +0100] rev 52143
doc: register the `config-doc` rst directive This was making the build fail because the directive was unknown.
Mon, 28 Oct 2024 15:50:20 +0100 relnotes: add 6.9rc0 stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 15:50:20 +0100] rev 52142
relnotes: add 6.9rc0
Mon, 28 Oct 2024 12:35:22 +0100 branching: merge default into stable stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 12:35:22 +0100] rev 52141
branching: merge default into stable We will be releasing 6.9rc0 soon.
Mon, 28 Oct 2024 11:45:02 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 11:45:02 +0100] rev 52140
branching: merge stable into default
Mon, 28 Oct 2024 11:40:49 +0100 Added signature for changeset eae3ec345e5e stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 11:40:49 +0100] rev 52139
Added signature for changeset eae3ec345e5e
Mon, 28 Oct 2024 11:40:25 +0100 Added tag 6.8.2 for changeset eae3ec345e5e stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 11:40:25 +0100] rev 52138
Added tag 6.8.2 for changeset eae3ec345e5e
Mon, 28 Oct 2024 11:39:03 +0100 relnotes: add 6.8.2 stable 6.8.2
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 11:39:03 +0100] rev 52137
relnotes: add 6.8.2
Fri, 25 Oct 2024 17:33:47 +0200 evolution: stop wrongly flagging unrelated part of a split as divergent stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 25 Oct 2024 17:33:47 +0200] rev 52136
evolution: stop wrongly flagging unrelated part of a split as divergent Before this change, divergence introduced by successors of a split would "spill" to other unrelated successors of the split that were not ambiguous. This small changes fixes it. Thanks goes to Manuel Jacobs for the discussion leading to this realization that a new simple and correct definition could be found.
Sun, 27 Oct 2024 17:29:18 -0400 tests: skip doctests that use `time.tzset()` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 27 Oct 2024 17:29:18 -0400] rev 52135
tests: skip doctests that use `time.tzset()` on Windows There's no way to conditionally skip the tests for a function (see the inline feature request). That leaves us with the choice to either put the whole `mercurial.utils.dateutil` module in the skip list of this script (but then this script prints out the module as unexpectedly not tested, and misses a bunch of tests that can be run), blacklist the test entirely (but that makes it harder to work with on Windows), or use this hack to look for the statement that is broken, and skip the test currently attached to one function. (It appears that an example in the list of examples corresponds to a single `>>>` block, and the `test` itself corresponds to a single function. So prescan the examples, and skip all of them when the statement is found in any, since the setup of setting the timezone has an effect on subsequent examples.)
Mon, 07 Oct 2024 12:08:48 +0100 tests: hopefully fix `test-doctest.py` on Windows and more
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 07 Oct 2024 12:08:48 +0100] rev 52134
tests: hopefully fix `test-doctest.py` on Windows and more 1. Shell syntax understood by `shell=True` depends on the platform. Instead, pass `shell=False` and call `sh` explicitly to interpret the command correctly. 2. Stop setting `HGRCPATH=/dev/null`, so the setting `experimental.evolution=createmarkers` is set correctly. The reason I set HGRCPATH to /dev/null previously is because of misunderstanding where I thought the Python script had no HGRC to edit. As it turns out, there is in fact a valid temporary HGRC pointed to by HGRCPATH in this context so we don't seem to need this. /shrug
Sat, 26 Oct 2024 13:56:46 -0400 hghave: make the description for "clang-format" ascii
Matt Harbison <matt_harbison@yahoo.com> [Sat, 26 Oct 2024 13:56:46 -0400] rev 52133
hghave: make the description for "clang-format" ascii test-fix-clang-format.t suddenly started failing on Windows by wiping the whole file content, and replacing with an error: $TESTTMP.sh: $TESTTMP.sh: cannot execute binary file Odd, because I don't have `clang-format` installed, so the test should be skipped. The problem started with 73cf8b56c2f5, and I noticed that running `hghave` manually resulted in a `SyntaxError` (so I can't see how this isn't broken everywhere, but maybe it's because I'm using py3.9 on Windows): $ py hghave --list Traceback (most recent call last): File "hghave", line 8, in <module> import hghave File "c:\Users\Matt\hg\tests\hghave.py", line 627 SyntaxError: Non-ASCII character '\xe2' in file c:\Users\Matt\hg\tests\hghave.py on line 627, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Sat, 26 Oct 2024 23:33:19 +0200 branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 26 Oct 2024 23:33:19 +0200] rev 52132
branching: merge stable into default Hopefully this will bring the last changes necessary to make the 3.13 tests green (on Linux).
Fri, 25 Oct 2024 23:46:20 -0400 tests: enable pytype checking on `mercurial/wireprotov1peer.py`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 25 Oct 2024 23:46:20 -0400] rev 52131
tests: enable pytype checking on `mercurial/wireprotov1peer.py`
Fri, 25 Oct 2024 23:45:05 -0400 typing: suppress bogus pytype errors in `mercurial/wireprotov1peer.py`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 25 Oct 2024 23:45:05 -0400] rev 52130
typing: suppress bogus pytype errors in `mercurial/wireprotov1peer.py` Fixes: File "/mnt/c/Users/Matt/hg/mercurial/wireprotov1peer.py", line 100, in result: No attribute '_peerexecutor' on unsentfuture [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/wireprotov1peer.py", line 278, in close: No attribute 'shutdown' on None [attribute-error] Called from (traceback): line 123, in __exit__ File "/mnt/c/Users/Matt/hg/mercurial/wireprotov1peer.py", line 278, in close: No attribute 'shutdown' on None [attribute-error] In Optional[concurrent.futures.thread.ThreadPoolExecutor] We drop the zope decorator on `peerexecutor`, because otherwise it triggers this error: File "/tmp/mercurial-ci/mercurial/wireprotov1peer.py", line 111, in <module>: Invalid type annotation [invalid-annotation] Must be constant Not sure why, because the decorated classes usually get typed as `Any`, which would also be fine here.
Fri, 25 Oct 2024 23:09:10 -0400 tests: enable pytype checking on `mercurial/wireprotoframing.py`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 25 Oct 2024 23:09:10 -0400] rev 52129
tests: enable pytype checking on `mercurial/wireprotoframing.py`
Fri, 25 Oct 2024 23:07:34 -0400 typing: suppress bogus pytype errors in `mercurial/wireprotoframing.py`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 25 Oct 2024 23:07:34 -0400] rev 52128
typing: suppress bogus pytype errors in `mercurial/wireprotoframing.py` This fixes: File "/mnt/c/Users/Matt/hg/mercurial/wireprotoframing.py", line 480, in createalternatelocationresponseframe: unsupported operand type(s) for item assignment: bytes [unsupported-operands] No attribute '__setitem__' on bytes File "/mnt/c/Users/Matt/hg/mercurial/wireprotoframing.py", line 510, in createcommanderrorresponse: unsupported operand type(s) for item assignment: bytes [unsupported-operands] No attribute '__setitem__' on bytes File "/mnt/c/Users/Matt/hg/mercurial/wireprotoframing.py", line 776, in __init__: Can't find module 'mercurial.zstd'. [import-error] File "/mnt/c/Users/Matt/hg/mercurial/wireprotoframing.py", line 804, in __init__: Can't find module 'mercurial.zstd'. [import-error] File "/mnt/c/Users/Matt/hg/mercurial/wireprotoframing.py", line 834, in populatestreamencoders: Can't find module 'mercurial.zstd'. [import-error] Using `TypedDict` is tempting here to fix the first two, but requires str keys. The code doing the importing doesn't call the code at the other three locations if the `mercurial.zstd` module fails to import in a place that handles the ImportError.
Thu, 24 Oct 2024 22:47:31 -0400 wireprototypes: make `baseprotocolhandler` methods abstract
Matt Harbison <matt_harbison@yahoo.com> [Thu, 24 Oct 2024 22:47:31 -0400] rev 52127
wireprototypes: make `baseprotocolhandler` methods abstract The documentation says it's an abstract base class, so let's enforce it. The `typing.Protocol` class is already an ABC, but it only prevents instantiation if there are abstract attrs that are missing. For example, from `hg debugshell`: >>> from mercurial import wireprototypes >>> x = wireprototypes.baseprotocolhandler() Traceback (most recent call last): File "<console>", line 1, in <module> TypeError: Can't instantiate abstract class baseprotocolhandler with abstract method name >>> class fake(wireprototypes.baseprotocolhandler): ... pass ... >>> x = fake() Traceback (most recent call last): File "<console>", line 1, in <module> TypeError: Can't instantiate abstract class fake with abstract method name That's great, but it doesn't protect against calling non-abstract methods at runtime, rather it depends on the protocol type hint being added to method signatures or class attrs, and then running a type checker to notice when an instance is assigned that doesn't conform to the protocol. We don't widely use type hints yet, and do have a lot of class hierarchy in the repository area, which could lead to surprises like this: >>> class fake(wireprototypes.baseprotocolhandler): ... @property ... def name(self) -> bytes: ... return b'name' ... >>> z = fake() >>> z.client() >>> print(z.client()) None Oops. That was supposed to return `bytes`. So not only is a bad/unexpected value returned, but it's one that violates the type hints (since the base client() method will be annotated to return bytes). With this change, we get: >>> from mercurial import wireprototypes >>> class fake(wireprototypes.baseprotocolhandler): ... @property ... def name(self) -> bytes: ... return b'name' ... >>> x = fake() Traceback (most recent call last): File "<console>", line 1, in <module> TypeError: Can't instantiate abstract class fake with abstract methods addcapabilities, checkperm, client, getargs, getpayload, getprotocaps, mayberedirectstdio So this looks like a reasonable safety harness to me, and lets us catch problems by running the standard tests while the type hints are being added, and pytype is improved. We should probably do this for all Protocol class methods that don't supply a method implementation.
Thu, 24 Oct 2024 22:37:45 -0400 wireprototypes: convert `baseprotocolhandler.name` to an abstract property
Matt Harbison <matt_harbison@yahoo.com> [Thu, 24 Oct 2024 22:37:45 -0400] rev 52126
wireprototypes: convert `baseprotocolhandler.name` to an abstract property PyCharm was flagging the subclasses where this was declared as a `@property` with Type of 'name' is incompatible with 'baseprotocolhandler' But pytype didn't complain. This seems more correct, however. Since `Protocol` is already an `abc.ABCMeta` class, we don't need to mess with the class hierarchy.
Thu, 24 Oct 2024 20:50:47 -0400 wireprotoserver: subclass the new `baseprotocolhandler` Protocol class
Matt Harbison <matt_harbison@yahoo.com> [Thu, 24 Oct 2024 20:50:47 -0400] rev 52125
wireprotoserver: subclass the new `baseprotocolhandler` Protocol class
Thu, 24 Oct 2024 20:47:12 -0400 wireprototypes: convert `baseprotocolhandler` to a Protocol class
Matt Harbison <matt_harbison@yahoo.com> [Thu, 24 Oct 2024 20:47:12 -0400] rev 52124
wireprototypes: convert `baseprotocolhandler` to a Protocol class The methodology for doing this is now known, and this is limited to two implementing classes, so just make the changes.
Sat, 26 Oct 2024 12:56:02 +0200 test: stabilize `test-audit-path.t` in rust (hopefully)
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 26 Oct 2024 12:56:02 +0200] rev 52123
test: stabilize `test-audit-path.t` in rust (hopefully) We have been seeing flakiness on the file reported for a bit.
Sat, 26 Oct 2024 05:09:55 +0200 pycompat: drop test involving assigning "foo" to `sys.hexversion` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 26 Oct 2024 05:09:55 +0200] rev 52122
pycompat: drop test involving assigning "foo" to `sys.hexversion` Starting with python 3.13, `sys.hexversion` refuse to be assigned non-hex value like "foo". I don't think I can blame it. It is time to drop that part of the tests.
Sat, 26 Oct 2024 05:11:58 +0200 pycompat: filter more of the traceback in `test-flagproccessor.t` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 26 Oct 2024 05:11:58 +0200] rev 52121
pycompat: filter more of the traceback in `test-flagproccessor.t` The traceback changes again with 3.13. So we filter it to only keeps the bits we care about. This is actually only reusing the approach from a few line below.
Fri, 25 Oct 2024 00:46:22 +0200 pycompat: ignore the fork + thread warning for now stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 25 Oct 2024 00:46:22 +0200] rev 52120
pycompat: ignore the fork + thread warning for now No known issues has been reported and this is breaking the CI quite hard. So for now we have to delay the issue.
Thu, 24 Oct 2024 22:55:45 -0400 wireprototypes: fix exception handling code with a bad pytype suppression stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 24 Oct 2024 22:55:45 -0400] rev 52119
wireprototypes: fix exception handling code with a bad pytype suppression This goes back to f5fcf7123a92, and I suspect it was a misread of the error message is describes- the LHS of `.sorted()` is always bytes, and bytes didn't have this method in py2 either. The invalid names were already handled like this a few lines above. PyCharm flagged this, and it stood out after converting the zope interfaces to Protocol classes (which hasn't been published yet).
Fri, 18 Oct 2024 14:14:24 -0400 tests: conditionalize undesired output on Windows for rbc the mmap cases
Matt Harbison <matt_harbison@yahoo.com> [Fri, 18 Oct 2024 14:14:24 -0400] rev 52118
tests: conditionalize undesired output on Windows for rbc the mmap cases I don't want to lose sight of this issue, and it's useful to be able to turn on mmap support to hack on the underlying problem. As noted in the previous commit, I think the current usage of `mmap` and `memoryview` needs to be reworked for correctness on posix anyway.
Fri, 18 Oct 2024 13:21:23 -0400 rev-branch-cache: disable mmapping by default on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 18 Oct 2024 13:21:23 -0400] rev 52117
rev-branch-cache: disable mmapping by default on Windows See the inline comment for why. The commands work, other than leaving extra files laying around. Perhaps there's some way to get this to work like on posix with some `CreateFile` magic (though it already uses `FILE_SHARE_DELETE`, so I'm not sure offhand what else we can do). However big picture- it seems wrong that the old file is left mmapped, a new one moved into place, and the mapping left over the old file instead of retargeted to the new file. That's got to be a bug on posix too, in a long running process like chg, right? If the memory is read again for some reason, it will be stale data.
Fri, 18 Oct 2024 13:45:13 -0400 tests: actually test the non-mmap case in `test-branches.t`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 18 Oct 2024 13:45:13 -0400] rev 52116
tests: actually test the non-mmap case in `test-branches.t` It looks like 40943970b7ae renamed the config, but also flipped it to 'on' by default, and the test file didn't keep up. I noticed because all 4 test cases failed on Windows due to a mmap problem, and there only should have been 2.
Thu, 17 Oct 2024 15:34:45 -0400 tests: dump the http server log after a clone in `test-static-http.t`
Matt Harbison <matt_harbison@yahoo.com> [Thu, 17 Oct 2024 15:34:45 -0400] rev 52115
tests: dump the http server log after a clone in `test-static-http.t` The 404 message lines don't match `$LOGDATE$`, because that tests for a pattern from the first "-" through a "(GET|PUT|POST)", so glob the timestamp away manually.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -32 +32 +50 +100 tip