Matt Harbison <matt_harbison@yahoo.com> [Thu, 10 Oct 2024 17:52:26 -0400] rev 52007
tests: allow optional output when `test-lfs-server` is sent SIGTERM
I guess this has only ever been tested on Windows, but on macOS, the test was
failing with changes like:
+++ /private/tmp/mercurial-ci/tests/test-lfs-test-server.t#git-server.err
@@ -858,6 +858,7 @@
(Restart the server in a different location so it no longer has the content)
$ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
+ $TESTTMP.sh: line 153: 38639 Terminated: 15 lfs-test-server > lfs-server.log 2>&1
#if hg-server
$ cat $TESTTMP/access.log $TESTTMP/errors.log
Matt Harbison <matt_harbison@yahoo.com> [Wed, 09 Oct 2024 20:09:33 -0400] rev 52006
tests: stabilize `test-http-bad-server.t` on macOS
I'm not sure what's going on here, because I got one test run where this worked,
but two where it gave this error instead. It's connection related as the
comment says it should be, so good enough.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 09 Oct 2024 13:55:04 -0400] rev 52005
upgrade: disable using the parallel workers optimization on macOS
It crashes `test-copies-chain-merge.t` for some reason[1]. It's only
experimental, and already hard-disabled on Windows.
[1] https://foss.heptapod.net/mercurial/mercurial-devel/-/jobs/2591045#L108
paugier <pierre.augier@univ-grenoble-alpes.fr> [Sun, 13 Oct 2024 04:55:48 +0200] rev 52004
format: fix few black issues
paugier <pierre.augier@univ-grenoble-alpes.fr> [Thu, 10 Oct 2024 09:54:55 +0200] rev 52003
install: static data moved from setup.py to pyproject.toml
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 14 Oct 2024 00:15:25 +0200] rev 52002
ci: display tool version more selectively
The goal here is to avoid showing tool version in all case as this create issue
for non linux/docker runner that might not have some of them installed. This is
currently relevant for the coming mac runner that does not have clang-format
installed and does not needs its.
This might also be useful in the future to use narrower docker image more specialized
for each jobs.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 13 Oct 2024 14:46:23 +0200] rev 52001
zeroconf: fix a warning about a signature mismatch in a method override
Caught by PyCharm. It looks like the `hdr` arg is mostly unused (thus why it
was missing in some cases), so pass along an empty string where needed.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 23:24:28 -0400] rev 52000
zeroconf: use str instead of bytes when indexing `globals()`
I suppose since we set the key to bytes during init that it won't raise a
KeyError, but this was very likely an oversight when mass-byteifying, rather
than purposeful.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 23:20:09 -0400] rev 51999
zeroconf: fix an invalid argument error on Windows
The idea that pyoxidizer was triggering the problem when standing up the
previous incarnation of CI for Windows was misleading- it was a Windows problem
in general. See the inline bug link. Unfortunately, there's no commit
referenced there, and it looks like OP closed the report himself with the
suggested workaround. IOW, very modern python may not work, but it's extremely
unlikely that there are any users of this extension, especially on Windows.
Matt Harbison <matt_harbison@yahoo.com> [Sat, 12 Oct 2024 16:55:30 -0400] rev 51998
tests: fix hooks in `test-transaction-rollback-on-revlog-split.t` for Windows
A few problems with external hooks here:
1) `cmd.exe` is blissfully unaware of the meaning of single quotes, and passes
them along as part of the revision arg
2) `cmd.exe` doesn't know how to run the python script `f` with the shebang
line, so it needs to be invoked with the intepreter explicitly. Then for
some reason it was trying to open `$TESTTMP\troffset-computation-hooks\f`,
so make it an absolute path.
3) Likewise, the shell script `wait-on-file` cannot be invoked directly by
`cmd.exe`.
4) Windows python doesn't understand whatever `$TESTTMP` unrolls to (probably
it has the double backslashes), and silently failed to write the lock file.
I'm assuming that `pretxnclose.03-abort` is also bad (there's no `false` in
`cmd.exe`), but it's not currently causing problems.
Also note that the paths in this are very long, and typically exceed the
`MAX_PATH` limit in Windows. It can be run with `run-tests.py --tmpdir /c/t`.
Matt Harbison <matt_harbison@yahoo.com> [Sat, 12 Oct 2024 16:35:03 -0400] rev 51997
tests: use the cross platform `SIGKILL` function
This partially fixes `test-transaction-rollback-on-revlog-split.t` (there are
still problems related to waiting on the lock files), and completely fixes
`test-fncache.t`.
Matt Harbison <matt_harbison@yahoo.com> [Sat, 12 Oct 2024 16:06:37 -0400] rev 51996
tests: add a module that can perform the equivalent of `SIGKILL` on any OS
I started with this being Windows specific, but let's push all of the decision
making into this function so that it can just be called by the tests. The
tradeoff is that this is very specific to sending `SIGKILL`- since
`signal.SIGKILL` doesn't exist on Windows, the desired signal can't be passed
from the caller. Maybe there's a way, but let's wait until there's a need.
We don't use `killdaemons.py` unconditionally because it starts with a more
graceful `SIGTERM` on posix.
Matt Harbison <matt_harbison@yahoo.com> [Sat, 12 Oct 2024 15:22:03 -0400] rev 51995
tests: teach `killdaemons` on Windows to use an exit code provided by a caller
Right now, there are several tests that use `signal.SIGKILL`, which isn't a
thing on Windows. The `killdaemons` script approximates this by forcibly
terminating the process. There's a minor difference in that `signal.SIGKILL`
results in the test capturing an exit code of 137, and the `killdaemons` victim
doesn't record a code (as though it exited with 0). Since the exit code line
couldn't be conditionalized the last time I checked, let's just allow the caller
to simulate the same exit code, and avoid conditionalizing the tests.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 10 Oct 2024 17:55:50 +0200] rev 51994
ci: also offer tests with Python 3.13
Python3.13 is du to be released soon. We better make sure we work with it.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 12 Oct 2024 03:07:52 +0200] rev 51993
run-test: add regular line break and test count in the dot output
This will make it simpler to follow the actual progress.
The value "75" have been picked as it is smaller or equal to 80 and give a nice
round number.
Joerg Sonnenberger <joerg@bec.de> [Fri, 11 Oct 2024 14:37:59 +0200] rev 51992
clonebundle-digest: add recursion guards for Python 3.8
For Python 3.8 and 3.9, the read/readinto pair can recurse, so make sure
the data is only hashed once.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 08 Oct 2024 01:06:57 -0400] rev 51991
tests: replace inline `waitlock()` with `wait-on-file` script
The latter scales up the timeout based on the timeout value provided to the test
runner, and I was seeing timeouts on Windows when running all of the tests using
all CPU cores.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 21:48:36 -0400] rev 51990
tests: stabilize `test-split-legacy-inline-changelog.t` on Windows
The `tar` command is unable to process "C:\path\to\foo.tar" style paths, which
is how `$TESTDIR` is constructed. It also didn't work with
`$TESTDIR_FORWARD_SLASH`- both failed with:
tar: Cannot connect to C: resolve failed
[128]
But `cat` can handle it if the path is quoted, and `tar` can read from stdin.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 19:11:54 -0400] rev 51989
tests: stabilize `test-largefiles-cache.t` on Windows
The `undo.backup.dirstate.bck` was created by `hg commit -m 'add largefile'` at
line 18, and deleted in the conditional block by `hg push -q http://localhost:$HGPORT/`
at line 138. That's... surprising, but probably not harmful, and can be debugged
from Linux if it is a problem.
This was showing up in `find src/.hg/largefiles/* | grep -E "(dirstate|$hash)"`.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 18:33:45 -0400] rev 51988
tests: stabilize `test-journal.t` on Windows
The file in these lines are double quoted, but single quoted on other platforms.
Not sure why, other than `cmd.exe` doesn't recognize single quotes. But it's a
cosmetic difference, so glob over it and move on.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 18:26:41 -0400] rev 51987
tests: stabilize `test-clonebundles.t` on Windows
The `remote: {foo,bar}` lines were different because `echo` in MSYS uses `\r\n`.
I couldn't make it work with the previous echoing of individual lines, changing
the internal `echo` to `printf "foo\n"`, because that output as "foon". This
works on Linux and Windows, so I'm not thinking too hard about it.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 17:26:31 -0400] rev 51986
tests: cleanup some special casing of `seq` emitting '\r\n'
My guess is these predate the commit referenced in the previous commit.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 16:20:07 -0400] rev 51985
tests: force `seq` to print with '\n' EOL
It looks like consistent EOL is the reason for
0605726179a0, but now on py3,
`print()` uses the platform EOL without regard to binary mode. The tests mostly
use this to loop over a sequence of number in the shell, but there are a handful
that redirect output to a file. Specifically, this fixes Windows runs of
`test-bundle2-multiple-changegroups.t`, but there may be other tests this fixes.
Some other `tests/*.py` files also set binary mode on stdout, but they also
write bytes directly to `sys.stdout.buffer`. I'm not doing that here because
PyCharm flags these write calls for passing bytes instead of str (PyCharm is
likely wrong, but possibly confused because the code falls back to `sys.stdout`
if there is no `.buffer` attribute), and it's annoying.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 15:48:06 -0400] rev 51984
tests: stabilize `test-bundle-phase-internal.t` on Windows
This is a silly difference, and we control the Windows side of things from
mercurial/windows.py:195. I'll swap and quote the values to be like `no-windows`
at some point, but I suspect this exception output would appear elsewhere, and
don't feel like waiting for a 2h+ test run to find all of them.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 13:19:16 -0400] rev 51983
tests: skip `test-wsgicgi.t` on MSYS
The test is attempting to set `PATH_INFO="/rev/\xe2\x80\x94"` into the
environment, which it does. The problem is that when MSYS sees a leading '/' in
an environment variable, it thinks it's a unix filesystem path, so it "helpfully"
prepends the Windows path to the MSYS root directory before running a non-MSYS
process. hgweb would then split this value on '/', so it would get 'C:' instead
of 'rev', and return a 400 since that isn't a valid web command.
I tried generating a *.bat file, but had trouble running that via `cmd.exe`
inside the test. I also tried generating an equivalent *.py launcher that would
set the environment variables itself. But there is no `os.environb` on Windows,
and the value was getting mangled when put into the script. So, I give up. If
it's encoding stuff on Windows, it's probably broken.
Joerg Sonnenberger <joerg@bec.de> [Thu, 27 Jun 2024 03:32:52 +0200] rev 51982
clonebundles: allow manifest to specify sha256 digest of bundles
paugier <pierre.augier@univ-grenoble-alpes.fr> [Thu, 03 Oct 2024 14:45:01 +0200] rev 51981
install: add long_description_content_type
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Oct 2024 10:56:51 +0200] rev 51980
headrevs: replace a boolean match with a if/else
I missed that while doing a previous cleanup.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 27 Sep 2024 03:55:40 +0200] rev 51979
head-revs: add a native implementation of the `stop_rev` parameter
This does not add too much complexity to the native code and help with
branchmap v3 performance.
Note that the final conversion of the heads from native-code to Python is still
too costly, especially in Rust. In addition the current caching around headrevs
is too simple and fragile. However these are an unrelated problem.
### benchmark.name = hg.command.unbundle
# bin-env-vars.hg.py-re2-module = default
# benchmark.variants.
issue6528 = disabled
# benchmark.variants.resource-usage = default
# benchmark.variants.reuse-external-delta-parent = yes
# benchmark.variants.revs = any-1-extra-rev
# benchmark.variants.source = unbundle
# benchmark.variants.validate = default
# benchmark.variants.verbosity = quiet
## data-env-vars.name = netbeans-2018-08-01-zstd-sparse-revlog
# bin-env-vars.hg.flavor = default
branch-v2: 0.233711 ~~~~~
branch-v3 before: 0.239857 (+2.63%, +0.01)
branch-v3 after: 0.239558 (+2.50%, +0.01)
# bin-env-vars.hg.flavor = rust
branch-v2: 0.235230 ~~~~~
branch-v3 before: 0.240972 (+2.44%, +0.01)
branch-v3 after: 0.239917 (+1.99%, +0.00)
## data-env-vars.name = netbeans-2018-08-01-ds2-pnm
# bin-env-vars.hg.flavor = rust
branch-v2: 0.255586 ~~~~~
branch-v3 before: 0.268560 (+5.08%, +0.01)
branch-v3 after: 0.262261 (+2.61%, +0.01)
## data-env-vars.name = mozilla-central-2024-03-22-zstd-sparse-revlog
# bin-env-vars.hg.flavor = default
branch-v2: 0.339010 ~~~~~
branch-v3 before: 0.349389 (+3.06%, +0.01)
branch-v3 after: 0.348247 (+2.72%, +0.01)
# bin-env-vars.hg.flavor = rust
branch-v2: 0.346525 ~~~~~
branch-v3 before: 0.355661 (+2.64%, +0.01)
branch-v3 after: 0.350906 (+1.26%, +0.00)
## data-env-vars.name = mozilla-central-2024-03-22-ds2-pnm
# bin-env-vars.hg.flavor = rust
branch-v2: 0.380202 ~~~~~
branch-v3 before: 0.408851 (+7.54%, +0.03)
branch-v3 after: 0.406511 (+6.92%, +0.03)
## data-env-vars.name = mozilla-unified-2024-03-22-zstd-sparse-revlog
# bin-env-vars.hg.flavor = default
branch-v2: 0.412165 ~~~~~
branch-v3 before: 0.427782 (+3.79%, +0.02)
branch-v3 after: 0.422595 (+2.53%, +0.01)
# bin-env-vars.hg.flavor = rust
branch-v2: 0.412397 ~~~~~
branch-v3 before: 0.422354 (+2.41%, +0.01)
branch-v3 after: 0.421079 (+2.11%, +0.01)
## data-env-vars.name = mozilla-unified-2024-03-22-ds2-pnm
# bin-env-vars.hg.flavor = rust
branch-v2: 0.429501 ~~~~~
branch-v3 before: 0.443197 (+3.19%, +0.01)
branch-v3 after: 0.449432 (+4.64%, +0.02)
## data-env-vars.name = mozilla-try-2024-03-26-zstd-sparse-revlog
# bin-env-vars.hg.flavor = default
branch-v2: 3.403171 ~~~~~
branch-v3 before: 3.819477 (+12.23%, +0.42)
branch-v3 after: 3.658482 (+7.50%, +0.26)
# bin-env-vars.hg.flavor = rust
branch-v2: 3.454876 ~~~~~
branch-v3 before: 3.590284 (+3.92%, +0.14)
branch-v3 after: 3.545843 (+2.63%, +0.09)
## data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm
# bin-env-vars.hg.flavor = rust
branch-v2: 3.465435 ~~~~~
branch-v3 before: 3.633278 (+4.84%, +0.17)
branch-v3 after: 3.556074 (+2.62%, +0.09)
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 26 Sep 2024 01:52:09 +0200] rev 51978
head-revs: move hg-core's inner_headrevsfiltered closer to inner_headrevs
This is pure code movement, it make a coming changesets significantly clearer.