Wed, 22 Feb 2023 01:08:25 +0100 dirstate: only reload the dirstate when it may have changed
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Feb 2023 01:08:25 +0100] rev 50128
dirstate: only reload the dirstate when it may have changed This reinstall the equivalent of what the `filecache` was doing. However it does it at the dirstate level. There is a double motivation for this: - This avoid duplicating logic with the dirstate "identity" logic. - This increase the lifetime of the `dirstate` object, helping to implement change scoping.
Wed, 22 Feb 2023 01:04:55 +0100 dirstate: directly manage the dirstate property on localrepo
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Feb 2023 01:04:55 +0100] rev 50127
dirstate: directly manage the dirstate property on localrepo Before we had: * the filecache layer on `localrepo` doing some caching * the dirstate having some internal invalidation/refresh machanism * the status code doing some identity validation. To clean this up, we are dropping the first item "localrepo `filecache`" from the equation in a favor of an approach integrated into the dirstate (second item) in the next changesets. This changeset will be a small windows where some things will be a bit slower. This will be fixed in the next changesets.
Tue, 21 Feb 2023 15:10:12 +0100 dirstate: factor the identity getting/setting code in the dirstate map
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 21 Feb 2023 15:10:12 +0100] rev 50126
dirstate: factor the identity getting/setting code in the dirstate map We are doing the same things twice and we will add more logic in the next changesets. So lets start factoring things out now.
Wed, 22 Feb 2023 00:53:51 +0100 dirstate: use `cachestat` object for dirstatemap identity
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Feb 2023 00:53:51 +0100] rev 50125
dirstate: use `cachestat` object for dirstatemap identity There is a class dedicated to this kind of cache check, let us use it. We will generalize this code in the next changesets, but we do the "behavior changing" pass on our own.
Tue, 21 Feb 2023 22:17:33 +0100 automv: lock the repository before searching for renames
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 21 Feb 2023 22:17:33 +0100] rev 50124
automv: lock the repository before searching for renames I detected this while debugging something else.
Mon, 20 Feb 2023 23:46:20 +0100 dirstate: distinct transaction callback from largefile
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 23:46:20 +0100] rev 50123
dirstate: distinct transaction callback from largefile This has not caused any issue so far because the large-files dirstate bypass the transaction logic. We might want to change that. In anyway, let us disarm this bug nest before it actually explode.
Mon, 20 Feb 2023 16:31:36 +0100 dirstate: track that changes are pending in a transaction
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 16:31:36 +0100] rev 50122
dirstate: track that changes are pending in a transaction Nothing is currently broken because if this, but this make the `_invalidated_context` attribute more accurate. Being more accurate here will help us later, when dealing with `status` call.
Tue, 21 Feb 2023 17:43:43 +0100 dirstate: add small asserts for double security
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 21 Feb 2023 17:43:43 +0100] rev 50121
dirstate: add small asserts for double security We don't need this, but it does not hurt.
Mon, 20 Feb 2023 15:58:17 +0100 dirstate: simplify the invalidation management on context exit
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 15:58:17 +0100] rev 50120
dirstate: simplify the invalidation management on context exit Since the `invalidate` call will directly reset the `_invalidated_context` attribut, we can simplify the code. In the same go, we move most of the logic out of the `finally` clause. It seems cleaner and safer. If we are handling an exception, we don't need the `write` code anyway.
Mon, 20 Feb 2023 15:52:55 +0100 dirstate: use the new `check_invalidated` decorator for `_changing`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 15:52:55 +0100] rev 50119
dirstate: use the new `check_invalidated` decorator for `_changing` WeeeEEeee, less code.
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 tip