- Jun 12, 2024
-
-
Raphaël Gomès authored
-
Pierre-Yves David authored
We move the name back to the expected name of `changelog.i.a`.
-
Pierre-Yves David authored
Since a93e52f0b6ff we no longer use inline-revlog for the changelog. The goal there was to solve the lack of testing for the two variants (inline vs split) and reduce the complexity of the interaction with "diverted-write" on the changelog level. However many existing repository still have inline-changelog and we automatically move them to normal revlog as soon as we have the chances. Unfortunately This conversion is buggy and can result in the destruction of the changelog.i if hook triggers the "write pending" mechanism. The bugs comes from the "revlog splitting" logic and the "write_pending" logic stepping over each other. Ironically the change in a93e52f0b6ff aims at no longer having this kind of problem. This changesets fix this issue and add associated tests. Fixing this reveal that the transaction hooks end up not seeing the pending transaction content, because the name is not right ("changelog.i.s.a" instead of "changelog.i.s") we fix this in the next changeset.
-
- Jun 11, 2024
-
-
Pierre-Yves David authored
Before this patch, running `hg push -B book` to push the `book` bookmark sideway at the same time as a commit making it moving forward might result in the removal of the bookmark remotely. After this changeset, the push can still be raced, but to remove deletion happens. This is progress.
-
Pierre-Yves David authored
This is useful for testing.
-
Pierre-Yves David authored
The previous code was taking locks before entering with statements, so exception before the with statement would not release the lock (except for garbage collection). We need to move to a try except here because the logic is more complicated.
-
Pierre-Yves David authored
The previous code was taking locks before entering with statements, so exception before the with statement would not release the lock (except for garbage collection).
-
- Jun 10, 2024
-
-
Raphaël Gomès authored
This was making the tests flaky after the recent patch¹ that opened up more of the code to the Rust-augmented status. [1] 865efc020c33
-
- May 07, 2024
-
-
Anton Shestakov authored
We have an experimental config histedit.later-commits-first from c820866c52f9, and when it's true, the order of commits in histedit UI is reversed, both in text mode and in curses mode. But before this patch key presses in curses mode would change histedit actions in the same old order, i.e. trying to edit the latest commit (which would be first now) would put "edit" action on the last commit in the list. This wasn't a cosmetic issue, histedit would actually proceed to edit the first commit in the list. Let's map rules to display items (hopefully now correctly).
-
- May 06, 2024
-
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
- Apr 22, 2024
-
-
Georges Racinet authored
The need comes from the fact that `AncestorsIterator` and many Graph-related algorithms take ownership of the `Graph` they work with. This, in turn is due to them needing to accept the `Index` instances that are provided by the Python layers (that neither rhg nor `RHGitaly` use, of course): the fact that nowadays the Python layer holds an object that is itself implemented in Rust does not change the core problem that they cannot be tracked by the borrow checker. Even though it looks like cloning `Changelog` would be cheap, it seems hard to guarantee that on the long run. The object is already too rich for us to be comfortable with it, when using references is the most natural and guaranteed way of proceeding. The added test seems a bit superfleous, but it will act as a reminder that this feature is really useful until something in the Mercurial code base actually uses it.
-
- May 06, 2024
-
-
Raphaël Gomès authored
In case we do get a dirstate error, we want to get the full error message and not just an opaque `Dirstate error`.
-
Raphaël Gomès authored
More explanations in the previous changeset.
-
Raphaël Gomès authored
This stems from a corruption seen in a private repository. We're not sure of the source of the corruption, and it's very possible that we're seeing compounded effects of multiple writes on a corrupted dirstate. Adding this check is not expensive in itself and large writes of the dirstate are not common. This change does not catch this problem at the root node, the next one will.
-
Raphaël Gomès authored
It's the responsibility of the check to handle errors, we only care about the total count to sum up the check's work. We use `admin::verify -c dirstate` to test this path at least somewhat.
-
Raphaël Gomès authored
`dirstate.verify` used to return tuples but does not anymore, it returns the pre-formatted error message, which is a nicer interface anyway.
-
Raphaël Gomès authored
This was forgotten and can break with certain kinds of corruption.
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
- May 02, 2024
-
-
Pierre-Yves David authored
By default, the re2 library will output error on its own instead of keeping the error in an exception. This make re2 printing spurious error before fallback to the stdlib remodule that may accept the pattern or also fails to parse it and raise a proper error that will be handled by Mercurial. So we also pass an Option object that changes this default.
-
Pierre-Yves David authored
This does the same things but with a narrower wrapping.
-
- Mar 31, 2024
-
-
Felipe Resende authored
There was already a fix made in 5dbff89cf107 for pull and push commands. I did the same for the outgoing command. The problem I identified is that when the parent repository has multiple paths, the outgoing command was not respecting the parent path used and was always using the default path for subrepositories.
-
- Apr 04, 2024
-
-
Arseniy Alekseyev authored
Previously flush was happening due to Python finalizer being run on `BufferedWriter`. With upgrade to Python 3.11 this started randomly failing. My guess is that the finalizer on the raw `FileIO` object may be running before the finalizer of `BufferedWriter` has a chance to run. At any rate, since we're not relying on finalizers in the happy case we should also not rely on them in case of exception.
-
- Apr 15, 2024
-
-
Arseniy Alekseyev authored
My previous interpretation of "Recursive" was too relaxed: I thought it instructed the caller to do something like this: > you can stop calling `visit_children_set` because you'll need to descend into > every directory recursively, but you should still check every file if it > matches or not Whereas the real instruction seems to be: > I guarantee that everything in this subtree matches, you can stop > querying the matcher for all files and dirs altogether. The evidence to support this: - the test actually passes with the stronger invariant, revealing no exceptions from this rule - the implementation of `visit_children_set` for `DifferenceMatcher` clearly relies on this requirement, so it must hold for that not to lead to bugs.
-
- Apr 12, 2024
-
-
Arseniy Alekseyev authored
The fix is checked by `test_pattern_matcher_visit_children_set` test, which is what caught the bug in the first place, but also by an end-to-end test that I made for this purpose. Accept the new results of Cargo tests Many of these were already annotated with "FIXME", which is a good sign.
-
Arseniy Alekseyev authored
This fixes just the Python side, the fix for the rust side will follow shortly.
-
Arseniy Alekseyev authored
-
Arseniy Alekseyev authored
This makes it a bit more efficient (avoid a computation in case of early return), and in my opinion clearer.
-
Arseniy Alekseyev authored
This brings the rust output in line with the Python output.
-
Arseniy Alekseyev authored
Concretely, `rootfilesin` is completely broken with respect to `visit_children_set` optimization.
-
- Apr 11, 2024
-
-
Arseniy Alekseyev authored
The tests this patch are adding have the form of formal spec in invariants::visit_children_set::holds, and then a series of checks that all examples must satisfy this formal spec. I tried to make the spec consistent with how this function is used and how it was originally conceived. This is in conflict with how it's documented in Rust. Some of the implementations also fail to implement this spec, which leads to bugs, in particular when complicated patterns are used with `hg status`.
-
Arseniy Alekseyev authored
The bug is in [visit_children_set], will be elaborated on in follow-up changes.
-
- Apr 04, 2024
-
-
Pierre-Yves David authored
Before this changesets "v2;revbranchcache=no" would actually request the addition for a revbranchcache part as the non-empty string `"0"` is `True`
-
Pierre-Yves David authored
It is possible to produce a bundle without changegroup. For example if we want to only send phases or obsolescence information. However that lead to crash for command that identifies bundle content. So we fix that. The test will come in the next changesets, when we fix another bug preventing to generate such bundle by hand.
-
- Apr 03, 2024
-
-
Pierre-Yves David authored
This help to understand what is going wrong when things goes wrong.
-
- Mar 29, 2024
-
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-