Sun, 05 Feb 2023 12:14:45 +0100 largefiles: remove the `changing_parents` context in `openlfdirstate`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 05 Feb 2023 12:14:45 +0100] rev 50076
largefiles: remove the `changing_parents` context in `openlfdirstate` This code might run in any kind of change context, we should rely on the higher level context instead of opening our own.
Wed, 15 Feb 2023 00:57:16 +0100 largefiles: remove the second `changing_parents` in `updatelfiles`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Feb 2023 00:57:16 +0100] rev 50075
largefiles: remove the second `changing_parents` in `updatelfiles` Now that the `update_file` call have been migrated, we can drop the semantically-wrong `changing_parents` context.
Wed, 15 Feb 2023 00:55:44 +0100 largefiles: remove the first `changing_parents` in `updatelfiles`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Feb 2023 00:55:44 +0100] rev 50074
largefiles: remove the first `changing_parents` in `updatelfiles` Now that the `update_file` call have been migrated, we can drop the semantically-wrong `changing_parents` context.
Sun, 05 Feb 2023 09:25:23 +0100 largefiles: use `hacky_extension_update_file` in `updatelfiles`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 05 Feb 2023 09:25:23 +0100] rev 50073
largefiles: use `hacky_extension_update_file` in `updatelfiles` This is what the function is meant for.
Sun, 05 Feb 2023 08:38:43 +0100 largefiles: use `hacky_extension_update_file` in `synclfdirstate`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 05 Feb 2023 08:38:43 +0100] rev 50072
largefiles: use `hacky_extension_update_file` in `synclfdirstate` This is what the function is meant for.
Sun, 05 Feb 2023 08:37:33 +0100 largefiles: use `hacky_extension_update_file` in `openlfdirstate`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 05 Feb 2023 08:37:33 +0100] rev 50071
largefiles: use `hacky_extension_update_file` in `openlfdirstate` This is what the function is meant for.
Sat, 04 Feb 2023 09:08:26 +0100 win32text: make the hacky call cover more cases
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 04 Feb 2023 09:08:26 +0100] rev 50070
win32text: make the hacky call cover more cases Now that I understand what this is doing, It seems like the case for `p1_tracked` were covered by neither the code nor the test. Now the code cover it at least.
Wed, 25 Jan 2023 12:47:55 +0100 win32text: drop the `changing_parents` context in revert upgrade
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 25 Jan 2023 12:47:55 +0100] rev 50069
win32text: drop the `changing_parents` context in revert upgrade We are not changing parents here, so let us not pretend we do.
Wed, 15 Feb 2023 00:29:39 +0100 win32text: clean up and clarify the post-revert hack of dirstate
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Feb 2023 00:29:39 +0100] rev 50068
win32text: clean up and clarify the post-revert hack of dirstate The change is unrelated to changing parents and should not be a in a "changing_parents" context. This call is quite hacky, but now it is at least explicitly hacky. We will drop the `changing_parents` context in the next changesets, but we kept this change simple to help readability.
Wed, 15 Feb 2023 00:26:08 +0100 dirstate: introduce a `hacky_extension_update_file` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Feb 2023 00:26:08 +0100] rev 50067
dirstate: introduce a `hacky_extension_update_file` method See inline documentation for details.
Tue, 07 Feb 2023 09:36:35 +0100 mq: properly take the wlock during the full qfold operation
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 07 Feb 2023 09:36:35 +0100] rev 50066
mq: properly take the wlock during the full qfold operation Otherwise the operation could be raced… for unknown result.
Sat, 04 Feb 2023 11:46:57 +0100 locking: hold the wlock for the full duration of the "keyword demo"
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 04 Feb 2023 11:46:57 +0100] rev 50065
locking: hold the wlock for the full duration of the "keyword demo" The risk of racing the demo is low, since it seems to create its own repository on the fly. However it is clearer and more consistent.
Sun, 05 Feb 2023 16:54:26 +0100 locking: grab the wlock before touching the dirstate in `perfdirstatewrite`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 05 Feb 2023 16:54:26 +0100] rev 50064
locking: grab the wlock before touching the dirstate in `perfdirstatewrite` If we touch the dirstate, we should hold the `wlock`.
Tue, 13 Dec 2022 04:22:19 +0100 locking: take the `wlock` for the full `hg addremove` duration
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Dec 2022 04:22:19 +0100] rev 50063
locking: take the `wlock` for the full `hg addremove` duration Otherwise, there is a race condition window between the time we resolve the file to addremove with the matcher and the time we lock the repo and modify the dirstate. For example, the working copy might have been updated away, or purged, and the matched files would no longer be correct.
Tue, 13 Dec 2022 16:26:13 +0100 locking: take the `wlock` for the full `hg forget` duration
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Dec 2022 16:26:13 +0100] rev 50062
locking: take the `wlock` for the full `hg forget` duration Otherwise, there is a race condition window between the time we resolve the file to forget with the matcher and the time we lock the repo and modify the dirstate. For example, the working copy might have been updated away, or purged, and the matched files would no longer be correct.
Tue, 13 Dec 2022 04:22:46 +0100 locking: take the `wlock` for the full `hg remove` duration
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Dec 2022 04:22:46 +0100] rev 50061
locking: take the `wlock` for the full `hg remove` duration Otherwise, there is a race condition window between the time we resolve the file to remove with the matcher and the time we lock the repo and modify the dirstate. For example, the working copy might have been updated away, or purged, and the matched files would no longer be correct.
Tue, 13 Dec 2022 04:21:27 +0100 locking: take the `wlock` for the full `hg add` duration
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Dec 2022 04:21:27 +0100] rev 50060
locking: take the `wlock` for the full `hg add` duration Otherwise, there is a race condition window between the time we resolve the file to add with the matcher and the time we lock the repo and modify the dirstate. For example, the working copy might have been updated away, or purged, and the matched files would no longer be correct.
Mon, 06 Feb 2023 01:22:01 +0100 dirstate: drop some very fishy looking piece of code
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Feb 2023 01:22:01 +0100] rev 50059
dirstate: drop some very fishy looking piece of code This piece of code is marking the **real** dirstate file as a temporary transaction file. This means it get deleted on transaction rollback. This this quite wrong, especially as the comment points out some `dirstate.pending` motivation and the `.pending` file should already be fully managed by the transaction. The only ready I can think of this behavior not having awful results right now is because other transaction logic restore backed up content above the one that got wrongfully deleted. Let us stop doing this anyway, All tests seems happy.
Tue, 14 Feb 2023 23:05:18 +0100 dirstate: do not write an empty dirstate just for backup
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Feb 2023 23:05:18 +0100] rev 50058
dirstate: do not write an empty dirstate just for backup This will get in the way when we get more strict about holding the lock when writing the dirstate. Instead, we simply don't copy dirstate files around if there are None at backup time. A couple of tests are impacted they no longer need to backup such "empty" dirstate.
Tue, 14 Feb 2023 22:46:26 +0100 dirstate: pre-indent some of the backup code
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Feb 2023 22:46:26 +0100] rev 50057
dirstate: pre-indent some of the backup code This will make the next changeset clearer.
Tue, 14 Feb 2023 22:27:24 +0100 debugrebuilddirstate: double check that no transaction is open
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Feb 2023 22:27:24 +0100] rev 50056
debugrebuilddirstate: double check that no transaction is open Since transaction impact dirstate write, we make sure nobody is trying anything strange with this internal command.
Tue, 14 Feb 2023 22:26:23 +0100 dirstate: explicitly write the dirstate after `debugrebuilddirstate`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Feb 2023 22:26:23 +0100] rev 50055
dirstate: explicitly write the dirstate after `debugrebuilddirstate` I am working on making the dirstate write patterns more predictable. This patch is part of a small series of similar patches that adds a explicit dirstate write in a handful of location where the dirstate is updated "a bit in a strange way". With this explicit write, we are no longer relying on implicite write of the dirstate on `wlock` release. This make the world a better place.
Mon, 13 Feb 2023 22:53:54 +0100 dirstate: explicitly write the dirstate after `keyword` "overwrite"
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 13 Feb 2023 22:53:54 +0100] rev 50054
dirstate: explicitly write the dirstate after `keyword` "overwrite" I am working on making the dirstate write patterns more predictable. This patch is part of a small series of similar patches that adds a explicit dirstate write in a handful of location where the dirstate is updated "a bit in a strange way". With this explicit write, we are no longer relying on implicite write of the dirstate on `wlock` release. This make the world a better place.
Mon, 13 Feb 2023 23:33:27 +0100 dirstate: explicitly write the dirstate after `eol` dirstate manipulation
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 13 Feb 2023 23:33:27 +0100] rev 50053
dirstate: explicitly write the dirstate after `eol` dirstate manipulation I am working on making the dirstate write patterns more predictable. This patch is part of a small series of similar patches that adds a explicit dirstate write in a handful of location where the dirstate is updated "a bit in a strange way". With this explicit write, we are no longer relying on implicite write of the dirstate on `wlock` release. This make the world a better place.
Mon, 13 Feb 2023 23:49:52 +0100 dirstate: explicitly write the dirstate after mq dirstate rebuild
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 13 Feb 2023 23:49:52 +0100] rev 50052
dirstate: explicitly write the dirstate after mq dirstate rebuild I am working on making the dirstate write patterns more predictable. This patch is part of a small series of similar patches that adds a explicit dirstate write in a handful of location where the dirstate is updated "a bit in a strange way". With this explicit write, we are no longer relying on implicite write of the dirstate on `wlock` release. This make the world a better place.
Tue, 14 Feb 2023 20:09:39 +0100 transaction: quietly rollback if no other changes than temporary files
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Feb 2023 20:09:39 +0100] rev 50051
transaction: quietly rollback if no other changes than temporary files If no actual change have been made, we don't really need to roll them back. We only have to cleanup some temporary files and it seems reasonable to do that quietly. This will help us to use the transaction in wider context¹ without impacting the user experience. [1] as in Python context managers that lives longer.
Tue, 14 Feb 2023 20:04:17 +0100 transaction: run abort callback in all cases
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Feb 2023 20:04:17 +0100] rev 50050
transaction: run abort callback in all cases Previously, these possibly important callback were "forgotten" when running a quick rollback. This is now fixed, as the tests shown.
Tue, 14 Feb 2023 18:59:04 +0100 transaction: clarify the "quick abort" scenario
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Feb 2023 18:59:04 +0100] rev 50049
transaction: clarify the "quick abort" scenario Right now, the transaction has a code-pass to do a "quick abort" that skip most¹ (too much) of the logic when the right condition are detected² We are about to improve this logic in multiple aspect. We clarify the code first. The conditional return in `_can_quick_abort` looks a bit weird because we are about to make them more complex very soon. [1] actually too much [2] actually not often enough
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -28 +28 +50 +100 +300 +1000 tip