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.
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.
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.
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.
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.
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`
W
eeeEEeee, less code.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 21 Feb 2023 22:25:20 +0100] rev 50118
dirstate: introduce a check_invalidated decorator
This is a common need, so let us consolidate it to simplify the code.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 19 Feb 2023 03:21:12 +0100] rev 50117
dirstate: warn if dirty when starting an edition
The dirstate should be clean before we start changing it. Otherwise we might
write unrelated changes. Having a dirty dirstate laying around is also
suspicious.
This is similar to what we do when opening a new transaction, but this time
this affect dirstate changes outside of a transaction.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 21 Feb 2023 03:22:51 +0100] rev 50116
large-files: make sure we write newly initialized standin file early
Any changing context will have to initialized it before anything else. Not
flushing the default (pre-change) content mean we would enter the changing
context with a dirty dirstate, which is odd.
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 14:06:15 +0100] rev 50115
dirstate: mark `clear` and `rebuild` as `require_changing_parents`
Yeah, more scoping!