- May 06, 2024
-
-
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
-
- Mar 28, 2024
-
-
Raphaël Gomès authored
-
Pierre-Yves David authored
This bundle2 part is about helping the client to warms its cache. There is no reason for it to be mandatory. So we mark it advisory.
-
- Mar 25, 2024
-
-
Pierre-Yves David authored
Apparently iterating over the `changed_revs` dictionary is very expensive. On mozilla-try-2019-02-18, a perf::unbundle call with a 10 000 changesets bundle gives give use the following timing. e57d4b868a3e: 4.6 seconds ac1c75188440: 102.5 seconds prev-changeset: 30.0 seconds this-changeset: 4.6 seconds So, the performance regression is gone. Once again: thanks to marvelous Python!
-
Pierre-Yves David authored
If we retract for the draft phase, there is not non-public item to be retracted and we can skip this part. This part is was apparently super costly thanks to Python. On mozilla-try-2019-02-18, a perf::unbundle call with a 10 000 changesets bundle gives give use the following timing. e57d4b868a3e: 4.6 seconds ac1c75188440: 102.5 seconds this-changeset: 30.0 seconds So we recovered about ⅔ of the regression, the next changeset will give us the rest back.
-
- Mar 21, 2024
-
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
- Mar 17, 2024
-
-
Felipe Resende authored
After revision 0afe96e374a7, subrepo paths were normalized using posixpath.normpath and that resulted in ssh paths being wrongly converted from ssh://host/path to ssh:/host/path This fix applies the same logic used in urlutil.url to split the path scheme from the rest and only use posixpath.normpath to the string after scheme://
-
- Mar 16, 2024
-
-
Felipe Resende authored
In 73ed1d13c0bf the code was refactored but the error handling seems to have been missed (or maybe the object shoud have implemented __bytes__)
-
- Mar 18, 2024
-
-
Raphaël Gomès authored
This code path was apparently not tested. This fixes a crash when cloning the Tryton repo.
-
- Mar 15, 2024
-
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-