- Mar 02, 2023
-
-
Pierre-Yves David authored
shoo shoo shoo shoo. Happy to remove this awful special case (that I introduced myself last week…)
-
Pierre-Yves David authored
We can now back it up at the end of the transaction as we do for the rest of the dirstate.
-
Pierre-Yves David authored
The new way is now enforced.
-
Pierre-Yves David authored
This will requires more change soon (as we can simplify this backup). This will be done in later changesets.
-
Pierre-Yves David authored
-
Pierre-Yves David authored
-
Pierre-Yves David authored
-
Pierre-Yves David authored
-
Pierre-Yves David authored
-
Pierre-Yves David authored
-
Pierre-Yves David authored
-
Pierre-Yves David authored
-
Pierre-Yves David authored
Bypassing the transaction means we could get out of sync with the dirstatemap content. The branch is stil written right away if no transaction is around, but at least it no longer bypass the transaction. Actual caller of this still need to be updated.
-
Pierre-Yves David authored
We will need it in more occasion if the branch is to be written as part of the transaction.
-
Pierre-Yves David authored
This is more modern.
-
Pierre-Yves David authored
This get easier to read, especially with the type annotation.
-
Pierre-Yves David authored
The clippy god had to be appeased on some aspect.
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
Pierre-Yves David authored
Now that this is part of the transaction, this is necessary to make sure we read the right data in hooks (if any).
- Feb 28, 2023
-
-
Matt Harbison authored
Lack of typehints here caused the fact that TortoiseHg was passing str instead of bytes as the key in `opts` to be missed, resulting in shelf corruption in cases where `diff.git` is required.
-
Matt Harbison authored
I *think* this is the only diffopt exposed on the command line. TortoiseHg had a similar issue creating diffopts, and this was caught by type hints in the next commit.
-
- Mar 01, 2023
-
-
Raphaël Gomès authored
This allows us to detect changes of `.hg/dirstate`, which is either the full dirstate (in dirstate-v1) or the docket file (v2) without relying on data inside the file. It only works on UNIX systems. This fixes a race condition for dirstate-v1 (as demonstrated by the test changes) and adds a confortable layer of sanity for dirstate-v2.
-
- Feb 28, 2023
-
-
Raphaël Gomès authored
This fixes the following race: - process A reads the dirstate - process B reads and writes the dirstate - process A writes the dirstate This either resulted in losing what process B had just written or a crash because the `uuid` had changed and we were trying to write to a file that doesn't exist. More explanations inside. This doesn't fix the issue for dirstate-v1, a later patch addresses it.
-
- Dec 12, 2022
-
-
Raphaël Gomès authored
This will be used in the next patch to fix a race condition.
-
- Mar 01, 2023
-
-
Pierre-Yves David authored
The docket can be loaded outside of a full read (for exemple when pre-fetching parents), so the current code would read/set the identity after loading the data, opening a race condition: A0: first process docket is read B0: other process appends new data to the dirstate (and changes the docket) A1: first process sets the identity (based on pre-B content, but with post-B identity) A1: first process loads the dirstatemap from the data file A1: first process does not detect the race and overwrites the update from B.
-
- Feb 21, 2023
-
-
Pierre-Yves David authored
We need it in more locations, so let us start factoring thing out first to make sure the same code is called everywhere. This bears some similarity with 85746485a4dd on default, but at a smaller scope and for a different purpose.
-
- Feb 28, 2023
-
-
Pierre-Yves David authored
Now that most code behaves properly, we can simplify the expected matching.
-
Pierre-Yves David authored
If we cannot read the dirstate data, this is probably because a writing process wrote it under our feet. So refresh the docket and try again a handful of time.
-
Pierre-Yves David authored
If we cannot read the dirstate data, this is probably because a writing process wrote it under our feet. So refresh the docket and try again a handful of time.
-
Pierre-Yves David authored
If we cannot read the dirstate data, this is probably because a writing process wrote it under our feet. So refresh the docket and try again a handful of time.
-
- Mar 01, 2023
-
-
Pierre-Yves David authored
We will need more changes to avoid some race conditions during read, so we first isolate the simple logic before making it more complicated.
-
- Feb 27, 2023
-
-
Pierre-Yves David authored
This covers more ground and finds more bugs. At that point I gave up on making things as `known-bad-output` / `missing-correct-output` as this gets too messy.
-
- Dec 13, 2022
-
-
Raphaël Gomès authored
This will be useful to test some more race conditions around dirstate.
-
- Feb 26, 2023
-
-
Pierre-Yves David authored
More cases mean different issues.
-
Pierre-Yves David authored
More problems to solve.
-
Pierre-Yves David authored
More problems to solve.
-
Pierre-Yves David authored
Once in a while, rhg is the only one to behave right here.
-