Raphaël Gomès <rgomes@octobus.net>, Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 28 Feb 2023 15:25:47 +0100] rev 49673
dirstate: add a way to test races happening during status
We add the `devel.sync.status.pre-dirstate-write-file` config option to easily
test what happens when other operations happen during the window where
`hg status` is done working but has not updated the cache on disk yet.
We introduce the framework for testing such races too, actual tests will be
added in the next changesets. For now the test is only checking dirstate-v1. We
will extend the test coverage later too.
Check test documentation for details.
Code change from Raphaël Gomès <rgomes@octobus.net>
Test change from Pierre-Yves David <pierre-yves.david@octobus.net>
Raphaël Gomès <rgomes@octobus.net> [Tue, 28 Feb 2023 00:01:41 +0100] rev 49672
testing: introduce util function to synchronize concurrent commands on files
This is an extension of mechanisms that the tests have been using for a while.
To be able to also control the execution in Rust, we introduce utility to
perform such `wait_on_file` logic based on some configuration value.
This will be used in the tests introduced in the next changesets.
Raphaël Gomès <rgomes@octobus.net> [Tue, 28 Feb 2023 00:04:32 +0100] rev 49671
dirstate: add some debug output when writing the dirstate
This helps debugging Mercurial behavior in the dirstate-v2 case.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 31 Jan 2023 13:16:39 +0100] rev 49670
run-tests: make it possible to nest conditionals
This is not that hard to implement and makes our life easier on a regular basis.
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Nov 2022 12:33:20 +0100] rev 49669
dirstate-v2: don't mmap the data file when on NFS
`mmap` on NFS will trigger a SIGBUS when the mmap'ed file is deleted, which
wouldn't work in our case. Also, the performance advantage of using mmap on
NFS is debatable at best.
Raphaël Gomès <rgomes@octobus.net> [Thu, 08 Dec 2022 16:38:39 +0100] rev 49668
rust-dirstate: trace append/no append to help debugging
Raphaël Gomès <rgomes@octobus.net> [Mon, 12 Dec 2022 16:38:05 +0100] rev 49667
rust: add debug log about skipping dirstate update
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 15:17:48 +0100] rev 49666
test-dirstate: use more robust method to trigger a data-file append
The previous method was fragile and somewhat flaky on fast machines.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Feb 2023 18:10:26 +0100] rev 49665
transaction: tests we don't overwrite bookmark activation on abort
We actually do not! Great.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Feb 2023 18:09:12 +0100] rev 49664
transaction: tests we don't overwrite updates on abort
spoiler: we do… /o\
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Feb 2023 18:07:34 +0100] rev 49663
transaction: tests we don't overwrite branch changes on abort
We actually do not! Great.
…Why are doing a backup of the `branch` files at transaction creation then‽
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Feb 2023 18:05:36 +0100] rev 49662
transaction: tests we don't overwrite tracking to changed file on abort
spoiler: we do…
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Feb 2023 18:03:18 +0100] rev 49661
transaction: the base of a new test file checking transaction abort issue
See inline documentation for details. See other changesets for actual cases.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Feb 2023 18:30:47 +0100] rev 49660
setup: support building from an ongoing merge
Before this change the two parents from the merge would duplicate some command
output and modify some others in a way python 3.11 chokes on.
Raphaël Gomès <rgomes@octobus.net> [Thu, 16 Feb 2023 11:42:34 +0100] rev 49659
rust: upgrade minimum `rayon` dependency
The 1.6.0 and 1.6.1 releases fixes a soundness issue and a performance issue
that are both important to us, since both correctness and performance are
paramount in the Rust extensions.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 18 Feb 2023 01:21:51 +0100] rev 49658
test-chg: use a different log to avoid flakyness
The test was deleting the log file to start anew. However a trailing working
process might still be alive at this time, and recreate the very same log on
exit.
We see the trace of such worker in the expected content of server.log (see the
trace modified by this patch). This is flaky because we don't know *when* the
worker will write to the file and there is a race with the `hg init cached`
command.
A much simpler and reliable way to start anew without having such race is… to
write to a different log file. No reuse → no conflict, no conflict → no race, no
race → no flakiness.
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 18 Nov 2022 13:51:40 +0000] rev 49657
dirstate-v2: complain early on docket name collision
The alternative is that the dirstate gets deleted so the
corruption persists and is hard to investigate.
This happened to me in tests, where the dirstate names
are taken from file, since the file got reverted.
I expect this can also happen in prod with non-trivial
probability (1/4 billion).
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 17 Feb 2023 16:45:36 +0100] rev 49656
setup: further improve the error path for version retrieval
This is a new take at the problem that 8d390a13474d tried to tackle. There was
two issues after that previous improvement:
- the 0.0+ version could survive a bit too long and reaching the installer
version and staying there.
- multiple use case where still failing.
So the new code is better at:
- always succeeding when running `make local` so that we can
bootstrap a local version
- no using that fallback outside of `make local` to avoid distribution of
version with the buggy version number.
The setup.py is a gigantic pile of spaghetti code, to the point where
pastafarian pilgrim started knocking at its core.
However I refrained from cleaning that up since the more to a `setup.cfg` means
this code should be deleted soon™.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 17 Feb 2023 14:00:39 +0100] rev 49655
dirstate: handle missing backup file on restoration
This is the stable counter part to e358f6e0e50e.
Since 6.4 will stop writing undo.dirstate in some case (actually… at all), a
transaction created with 6.4 and recover/rolledback with 6.3 need to work to a
certain degreee. This changeset add the necessary bits so that we don't get a
traceback from 6..3 in this cases.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Feb 2023 11:56:02 -0500] rev 49654
tag: disallow tagging the working directory
It's kinda silly, but a clear error message is better than a stacktrace about
subscripting `None` when trying to generate the default commit message. I'm
surprised that `.revsingle(..).node()` returns None instead of `nodemod.wdirid`,
but now there's a test to catch if this changes.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 16 Feb 2023 20:33:14 +0100] rev 49653
test: fix the flakyness in test-remotefilelog-local.t
I now get about 80% of my `test-chg` CI run that fails on flakyness in this
tests.
It turns out this is only ambiguous status that end up doing file download. So…
calling status early will do that potential download separately and the calls we
scrutinize during that test will be just fine.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 12:54:17 +0100] rev 49652
fix: add more information to the debug output
The previous debug output did not help to understand which file where fixed in
which revision. The new output should cover that.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 03 Feb 2023 01:07:59 -0500] rev 49651
hgweb: unbyteify the 100-continue check
The environment seems to be `str` or `tuple[int]`, and the same check in
`wsgicgi.py` is already `str` based, so I suspect this was wrong. I think what
happened here is that the string wasn't `r''` prefixed in 482d6f6dba91 like
`wsgicgi.py`, so it got wrongly byteified in 687b865b95ad when converting to
byte literals en masse.
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 30 Jan 2023 18:50:11 +0100] rev 49650
setup: treat error output and non-zero return code differently
Choking on Mercurial's stderr mean armless warning can derails the whole install
process. We do like to be able to issue warning to people so we stop considering
any stderr is a fatal mistake.
This allow us to actually boostrap a version of Mercurial without loosing to
many sanity point. For example in case where evolve is not loaded, something
that happens when the recorded version is malformatted. Creating a wonderful
ouroboros.
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 30 Jan 2023 18:41:59 +0100] rev 49649
setup: make the version computation process more resistant
The tag fetching might return and empty string¹, from there everything derails
quickly. As setup tools becomes more picky about version format we make the
whole seems a bit more robust.
The resulting version will be obviously weird, but at least it will actually
install itself.
[1] This is a problem we will address in the next changesets.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 30 Jan 2023 18:25:11 -0500] rev 49648
bundlerepo: enforce the requirements declared by the underlying repository
Previously, `hg log -r 'bundle()' -R bundle.hg` was failing for me when run from
source, complaining about an unknown parent, when the system installed `hg`
didn't. Some debugging showed the index was 0 length. It turned out that I
didn't have the C extensions compiled, which a simple `hg log -r .` was able to
indicate. The problem being that the RequirementError got handled by RepoError,
which uses an empty directory as a fallback to process the bundle.
Anton Shestakov <av6@dwimlabs.net> [Sat, 28 Jan 2023 18:26:28 +0400] rev 49647
scmutil: make checknewlabel() allow "_" in otherwise numeric names (issue6737)
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 17:48:54 +0100] rev 49646
rust-narrow: fix loop that never loops
This was caught by `clippy`. I guess the narrow tests leave something to be
desired, since this previously only checked the first valid pattern.
Anton Shestakov <av6@dwimlabs.net> [Wed, 25 Jan 2023 19:37:06 +0400] rev 49645
hghave: refactor checks for pygments versions using checkvers()
Anton Shestakov <av6@dwimlabs.net> [Wed, 25 Jan 2023 19:27:50 +0400] rev 49644
hghave: make different has_pyoxidizer functions have different names
There are 3 of them, and them all having the same name triggered code checkers.