- Feb 28, 2023
-
-
Matt Harbison authored
The LFS extension requires this, and if it isn't enabled on the client (or the LFS extension isn't loaded), a web client gets a 500 instead of a sensible error message. Now it gets a different (client) error, but maybe it can be handled more gracefully. c0f11347b107 indicates that treemanifest repos have this issue too. 29cfc474c5fd mentions gating this behind `experimental` so that the format could change, but that was 7 years ago and we now have an experimental `changegroup4` as well. We can keep this as a config for the next cycle in case someone runs into an unexpected problem, and then jettison it if the infinitepush bundle name changes are either acceptable as-is or can be created differently.
-
Matt Harbison authored
This is currently a no-op, as changegroup3 is disabled by default. But when it is enabled, it changes the hash names of the bundle files. As I don't use this extension, I have no idea if that's OK or not. So keep the current default behavior until we can get more info from actual users, while allowing them to opt-in for testing purposes.
-
- Mar 01, 2023
-
-
Matt Harbison authored
Builtin errors generally want str messages.
-
Matt Harbison authored
Flagged by PyCharm. The superclass implementation raised NotImplementedError.
-
Matt Harbison authored
This is a subclass of OSError, which wants str instead of bytes.
-
Matt Harbison authored
I didn't look into when this changed, but it was flagged by PyCharm.
-
Matt Harbison authored
-
Matt Harbison authored
PyCharm flagged each of these `get()` calls with bytes. We still pass the bytes form to the formatter to avoid changing the API, until all callers can be changed.
-
Matt Harbison authored
PyCharm seems to stick with the type at the initial assignment, so it flagged the `get()` with a bytes key since the method argument has str keys. It wasn't a bug, but then the bytes form is otherwise unused, and converted back to str.
-
- 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
-
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.
-