Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 24 May 2022 09:57:53 +0200] rev 49214
run-tests: send the test result after freeing the channel
Sending the message about the test being "done" signals to the main thread that
a new test can be started. Before this changeset, we sent this signal before
freeing the channel, there is room for a race condition where a new test would
search for a channel before the old test freed the one it used.
This is an example of the failure it would produce:
https://foss.heptapod.net/mercurial/mercurial-devel/-/jobs/552404
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 24 May 2022 09:36:40 +0200] rev 49213
run-tests: also send a message in the Keyboard interrupt case
The next patch will do something equivalent, so lets do the change in an
independant changeset first in case we need to bisect something in the future.
Anton Shestakov <av6@dwimlabs.net> [Tue, 24 May 2022 19:09:24 +0400] rev 49212
revlog: use appropriate format char for int ("i" instead of "I")
From https://docs.python.org/3.8/c-api/arg.html#numbers :
i (int) [int]
Convert a Python integer to a plain C int.
I (int) [unsigned int]
Convert a Python integer to a C unsigned int, without overflow checking.
Anton Shestakov <av6@dwimlabs.net> [Tue, 17 May 2022 21:49:36 +0400] rev 49211
revlog: use %d to format int instead of %lu (
issue6565)
The issue says gcc warns that the data types don't match. I couldn't reproduce
the warning locally for some reason, but this patch shouldn't break things.
Maybe %lu was simply a copy-paste error from
6b1eae313b2f
(https://phab.mercurial-scm.org/D10625).
Arseniy Alekseyev <aalekseyev@janestreet.com> [Sun, 22 May 2022 14:21:59 +0200] rev 49210
rhg: correctly handle the case where diffs are encoded relative to nullrev
returning a valid entry for nullrev fix chain that delta against nullrev.
Arseniy Alekseyev <aalekseyev@janestreet.com> [Sun, 22 May 2022 23:26:06 +0200] rev 49209
test-revlog: test a repository that contains a diff against nullrev
We are witnessing a crash in the rust code, so we lets make sure this case is
tested.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 17 May 2022 14:36:57 -0400] rev 49208
worker: adapt _blockingreader to work around a python3.8.[0-1] bug (
issue6444)
Python 3.8.0 is the latest I can load on Ubuntu 18.04, and I regularly hit the
TypeError because this function is missing. While it can be avoided by
disabling worker usage via config option, that's a bit obscure.
I'm limiting the function definition to the narrow range of affected pythons
because there were other bugs in this area that were worked around, that I don't
fully understand. See the bug report for discussions on why the narrow range,
and related commits working around other bugs.
Differential Revision: https://phab.mercurial-scm.org/D12627
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 06 Apr 2021 03:24:26 +0200] rev 49207
filelog: show the passed argument on error
The error now do more than stating what it need. It also state what it got.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 06 Apr 2021 03:23:46 +0200] rev 49206
manifest: improve error message in case for tree manifest
In the case where tree manifest is not enabled but we still receive an sub
directory information for the manifest. The error now inform which sub-directory
was passed.
Anton Shestakov <av6@dwimlabs.net> [Wed, 04 May 2022 13:53:12 +0400] rev 49205
doc: use an absolute path in sys.path
The idea and rationale is similar to https://phab.mercurial-scm.org/D12599
(landed as
1b6e381521c5).
Differential Revision: https://phab.mercurial-scm.org/D12622
Anton Shestakov <av6@dwimlabs.net> [Wed, 04 May 2022 13:48:40 +0400] rev 49204
check-py3-compat: use an absolute path in sys.path
The idea and rationale is similar to https://phab.mercurial-scm.org/D12599
(landed as
1b6e381521c5).
Differential Revision: https://phab.mercurial-scm.org/D12621
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 13 May 2022 15:19:57 +0200] rev 49203
branchmap: use a context manager when writing the branchmap
This is cleaner and safer. The previous code date from long before we had
context manager available.
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 19 May 2022 12:23:38 +0100] rev 49202
rhg: align the dirstate v2 writing algorithm with python
Use the same algorithm of file append as python does, where we do a manual
seek instead of relying on O_APPEND. (see the reasons in the inline comment)
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 17 May 2022 14:59:25 +0100] rev 49201
test-dirstate: actually test the append code path in dirstate v2
Apparently it's not sufficient to modify a file to force the dirstate
write-out, so the append code path was untested.
By removing a file instead of changing we're forcing append to happen.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 05 Apr 2022 05:01:58 +0200] rev 49200
auto-upgrade: skip the operation if the repository cannot be locked
This seems like a fine default behavior for now. If some users wants something
more aggressive we can make the behavior configurable in the future.
Differential Revision: https://phab.mercurial-scm.org/D12619
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 05 Apr 2022 04:45:48 +0200] rev 49199
auto-upgrade: add a test case where the repository is already locked
This show the current behavior when the repository to auto-upgrade is already
locked.
The current behavior is to abort, which is probably not great. Now that we have
a proper test, we can think about the behavior we wants in a later tests.
Differential Revision: https://phab.mercurial-scm.org/D12618
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 05 Apr 2022 04:43:34 +0200] rev 49198
wait-on-file: properly wait on any files and symlink
This make the utility more useful, for example to wait on a lock file.
We also add an explicit -L check since the lock are "weird" symlink.
Differential Revision: https://phab.mercurial-scm.org/D12617
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 05 Apr 2022 04:41:09 +0200] rev 49197
debuglock: make the command more useful in non-interactive mode
The existing prompt mode simply release the lock immediately in non-interactive
mode. That is quite useless in the test so now the non-interactive mode simply
wait for a signal.
Differential Revision: https://phab.mercurial-scm.org/D12616
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 05 Apr 2022 03:36:31 +0200] rev 49196
auto-upgrade: add a test case with no permission to lock the repository
This show the current behavior when the repository is unlockable.
The current behavior is to abort, which is probably not great. Now that we have
a proper test, we can think about the behavior we want in a later changeset.
Differential Revision: https://phab.mercurial-scm.org/D12615
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 22 Mar 2022 14:14:52 +0100] rev 49195
auto-upgrade: introduce a way to auto-upgrade to/from dirstate-v2
This is similar to what we introduced for `share-safe`, but apply to the
tracked-hint feature.
Differential Revision: https://phab.mercurial-scm.org/D12614
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 05 Apr 2022 05:20:05 +0200] rev 49194
auto-upgrade: introduce a way to auto-upgrade to/from tracked-hint
This is similar to what we introduced for `share-safe`, but apply to the
tracked-hint feature.
Differential Revision: https://phab.mercurial-scm.org/D12613
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 04 Apr 2022 19:30:32 +0200] rev 49193
upgrade: split some logic from UpgradeOperation
The logic for automatic-upgrade and the upgrade-repo should be able to use the
same code. However that code often need an UpgradeOperation object to function.
So we start spliting the Operation into a minimal component that we will be
able to reuse outside of the "classic" upgrade path.
We will put the base-class to use in the next changeset.
Differential Revision: https://phab.mercurial-scm.org/D12612
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 05 Apr 2022 05:19:47 +0200] rev 49192
auto-upgrade: introduce a way to auto-upgrade to/from share-safe
This is the first "automatic-upgrade" capability. In the following commits,
similar features are coming for other "fast to upgrade" formats.
This is different from the `safe-mismatch.source-not-safe` and
`safe-mismatch.source-safe` configuration that deal with mismatch between a
share and its share-source. Here we are dealing with mismatch between a
repository configuration and its actual format.
We will need further work for cases were the repository cannot be locked. A
basic protection is in place to avoid a infinite loop for now, but it will get
proper attention in a later changeset.
Differential Revision: https://phab.mercurial-scm.org/D12611
Raphaël Gomès <rgomes@octobus.net> [Fri, 15 Apr 2022 22:02:07 +0200] rev 49191
rust: make requirements public
These can be used by any client crates (including `rhg`), no need to make them
private to the crate.
Differential Revision: https://phab.mercurial-scm.org/D12610
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 10 May 2022 20:30:26 +0100] rev 49190
clone: use better names for temp files
Before this commit, the file names are /tmp/tmpn8smvlr8
After this commit, they are more like /tmp/hg-clone-n8smvlr8/00manifest.ndb3qj52v6,
which makes it much clearer what these files correspond to.
Differential Revision: https://phab.mercurial-scm.org/D12623
Anton Shestakov <av6@dwimlabs.net> [Mon, 02 May 2022 16:27:14 +0400] rev 49189
tests: make sure .js files stay in ASCII encoding (
issue6559)
Differential Revision: https://phab.mercurial-scm.org/D12620
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 13 May 2022 15:48:53 +0200] rev 49188
ci: have rust-cargo-test inherit from all
This help changing configuration for everything at the same time.
This was initially the case before being dropped by mistake in
0ddd5e1f5f67.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 19 May 2022 01:34:51 +0100] rev 49187
copies-sdc: mark upgrade action as changelog only
We don't need to recompute the other revlog to add the changelog-v2 feature.
This simplify upgrade that use copies-sdc (as shown in the tests).
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 19 May 2022 01:24:16 +0100] rev 49186
changelog-v2: mark upgrade action as changelog only
We don't need to recompute the others revlog to add the changelog-v2 feature.
This does not have much effect in practice as the `copies-sdc` upgrade still
triggers the other revlogs. This will be fixed in the next changeset.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 19 May 2022 01:40:37 +0100] rev 49185
copies-sdc: no longer suppress the upgrade output
To make sure the upgrade simplification we need are taken into account, we need
to see more of the output of `debugupgraderepo`. The --quiet flag simplify the
output a lot and globing the `preserved` field mean this output should remains
stable across (future) unrelated changes.