Tue, 28 Feb 2023 16:19:21 +0100 rhg: fix race when an ambiguous file is deleted on disk stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 28 Feb 2023 16:19:21 +0100] rev 49684
rhg: fix race when an ambiguous file is deleted on disk There are two places in the status code where we handle files whose status we are unsure of based off of metadata alone: this one is the first one to actually disambiguate, and the second one is later in the code (but updated in the previous commit) for files that are actually clean to update the dirstate. Since there is a chance that the contents have changed between those two moments, we need to stat the files again, since re-using the old stat could lie about the clean state of the file.
Mon, 27 Feb 2023 15:18:50 +0100 rhg: fix race when a fixup file is deleted on disk stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 27 Feb 2023 15:18:50 +0100] rev 49683
rhg: fix race when a fixup file is deleted on disk See next changeset for the other race in the same kind of logic and why there are two different places.
Sat, 25 Feb 2023 06:11:14 +0100 dirstate: test a `hg status` raced by a `hg remove` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 25 Feb 2023 06:11:14 +0100] rev 49682
dirstate: test a `hg status` raced by a `hg remove` This shows that `rhg` is misbehaving here.
Fri, 24 Feb 2023 01:19:37 +0100 dirstate: tests racing status with both dirstate-v2 append and rewrite stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 24 Feb 2023 01:19:37 +0100] rev 49681
dirstate: tests racing status with both dirstate-v2 append and rewrite The way the racing process touches the dirstate results in different challenges for the raced process. We now test each variant in the `test-dirstate-status-race.t` tests.
Tue, 28 Feb 2023 15:49:53 +0100 dirstate-v2: add devel config option to control write behavior stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 28 Feb 2023 15:49:53 +0100] rev 49680
dirstate-v2: add devel config option to control write behavior This will help us to write predictable tests checking behavior in each case.
Fri, 24 Feb 2023 18:21:54 +0100 dirstate: use more than a bool to control append behavior stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 24 Feb 2023 18:21:54 +0100] rev 49679
dirstate: use more than a bool to control append behavior When writing dirstate-v2, we might either append to the existing file, or create a new file. We are about to introduce some configuration to control this behavior. As a prelude, we change the current way the behavior was automatically controlled to make the change smaller/clearer.
Fri, 24 Feb 2023 01:15:45 +0100 dirstate: cover each dirstate version when testing for status race stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 24 Feb 2023 01:15:45 +0100] rev 49678
dirstate: cover each dirstate version when testing for status race Previously we were only testing it with the default (dirstate-v1 currently). Now we explicitly test each variant.
Fri, 24 Feb 2023 01:09:11 +0100 dirstate: test a `hg status` raced by another `hg status` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 24 Feb 2023 01:09:11 +0100] rev 49677
dirstate: test a `hg status` raced by another `hg status` This shows that `rhg` is misbehaving here.
Fri, 24 Feb 2023 01:01:04 +0100 dirstate: test a `hg status` raced by a `hg update` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 24 Feb 2023 01:01:04 +0100] rev 49676
dirstate: test a `hg status` raced by a `hg update` This shows that `rhg` is misbehaving here.
Fri, 24 Feb 2023 00:55:13 +0100 dirstate: test a `hg status` raced by a `hg commit` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 24 Feb 2023 00:55:13 +0100] rev 49675
dirstate: test a `hg status` raced by a `hg commit` This shows that `rhg` is misbehaving here.
Fri, 24 Feb 2023 16:12:01 +0100 dirstate: test a `hg status` raced by a `hg add` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 24 Feb 2023 16:12:01 +0100] rev 49674
dirstate: test a `hg status` raced by a `hg add` This shows that `rhg` is misbehaving here.
Tue, 28 Feb 2023 15:25:47 +0100 dirstate: add a way to test races happening during status stable
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>
Tue, 28 Feb 2023 00:01:41 +0100 testing: introduce util function to synchronize concurrent commands on files stable
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.
Tue, 28 Feb 2023 00:04:32 +0100 dirstate: add some debug output when writing the dirstate stable
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.
Tue, 31 Jan 2023 13:16:39 +0100 run-tests: make it possible to nest conditionals stable
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.
Mon, 28 Nov 2022 12:33:20 +0100 dirstate-v2: don't mmap the data file when on NFS stable
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.
Thu, 08 Dec 2022 16:38:39 +0100 rust-dirstate: trace append/no append to help debugging stable
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
Mon, 12 Dec 2022 16:38:05 +0100 rust: add debug log about skipping dirstate update stable
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
Mon, 09 Jan 2023 15:17:48 +0100 test-dirstate: use more robust method to trigger a data-file append stable
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.
Wed, 22 Feb 2023 18:10:26 +0100 transaction: tests we don't overwrite bookmark activation on abort stable
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.
Wed, 22 Feb 2023 18:09:12 +0100 transaction: tests we don't overwrite updates on abort stable
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\
Wed, 22 Feb 2023 18:07:34 +0100 transaction: tests we don't overwrite branch changes on abort stable
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‽
Wed, 22 Feb 2023 18:05:36 +0100 transaction: tests we don't overwrite tracking to changed file on abort stable
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…
Wed, 22 Feb 2023 18:03:18 +0100 transaction: the base of a new test file checking transaction abort issue stable
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.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -24 +24 +50 +100 +300 +1000 tip