- Mar 20, 2023
-
-
Raphaël Gomès authored
-
- Mar 07, 2023
-
-
kiilerix authored
test-profile.t failed with errors like: TypeError: %d format: a real number is required, not NoneType statprof.py already handled None values as -1 in some cases. Do the same in more cases.
-
kiilerix authored
Mercurial became very noisy after https://github.com/python/cpython/commit/a60ddd31be7ff96a8189e7483bf1eb2071d2bddf , for example: $ python3.12 mercurial/store.py mercurial/store.py:406: SyntaxWarning: invalid escape sequence '\.' EXCLUDED = re.compile(b'.*undo\.[^/]+\.(nd?|i)$') This verbosity made some tests fail. The problems were mostly insufficiently escaped regexps, relying on the Python parser/scanner preserving invalid escape sequences.
-
kiilerix authored
Compiling Mercurial with Python 3.12 a5 would fail with: mercurial/cext/dirs.c: In function '_addpath': mercurial/cext/dirs.c:19:44: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 19 | #define PYLONG_VALUE(o) ((PyLongObject *)o)->ob_digit[0] | ^~ mercurial/cext/dirs.c:97:25: note: in expansion of macro 'PYLONG_VALUE' 97 | PYLONG_VALUE(val) += 1; | ^~~~~~~~~~~~ mercurial/cext/dirs.c:19:44: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 19 | #define PYLONG_VALUE(o) ((PyLongObject *)o)->ob_digit[0] | ^~ mercurial/cext/dirs.c:108:17: note: in expansion of macro 'PYLONG_VALUE' 108 | PYLONG_VALUE(val) = 1; | ^~~~~~~~~~~~ mercurial/cext/dirs.c: In function '_delpath': mercurial/cext/dirs.c:19:44: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 19 | #define PYLONG_VALUE(o) ((PyLongObject *)o)->ob_digit[0] | ^~ mercurial/cext/dirs.c:145:23: note: in expansion of macro 'PYLONG_VALUE' 145 | if (--PYLONG_VALUE(val) <= 0) { | ^~~~~~~~~~~~ This was caused by https://github.com/python/cpython/commit/c1b1f51cd1632f0b77dacd43092fb44ed5e053a9 .
-
- Oct 27, 2022
-
-
Jordi Gutiérrez Hermoso authored
The problem here is that indexing a bytestring gives you integers, not chars, so the comparison to b'+' ends up being wrong. We don't really have a way to test curses output, so no tests to verify the correctness of this behaviour.
-
- Mar 15, 2023
-
-
Pierre-Yves David authored
Before this changes, calling `hg copy` or `hg rename` could trigger a traceback about using an invalidated dirstate. This wasn't caught by the test as it needed the blackbox extension to preload the dirstate first in a way "refresh" invalidates it. Changing the context creation patterns fixes it.
-
- Mar 14, 2023
-
-
Arseniy Alekseyev authored
In particular, these directories can "infect" their sibling directories with ignored status due to using a shared memoization cell by accident. This fixes bug #6795.
-
Arseniy Alekseyev authored
-
- Mar 06, 2023
-
-
Raphaël Gomès authored
We've migrated to a newer version of Rust, so it doesn't make sense anymore.
-
Raphaël Gomès authored
This includes a potential soundness fix as well as some improvements to performance which should be helpful.
-
Raphaël Gomès authored
Let's try to be the most up-to-date for this cycle. Fedora already has this version packaged, it's an added bonus.
-
- Mar 09, 2023
-
-
Felipe Contreras authored
Newlines should only be added when otherwise the stream would look weird without them (on blobs), therefore they are the exception. Flip the logic so they are added, not skipped.
-
- Mar 13, 2023
-
-
Arseniy Alekseyev authored
-
Arseniy Alekseyev authored
Make sure not to cache the results of a failed readdir call.
-
- Mar 10, 2023
-
-
Arseniy Alekseyev authored
-
Arseniy Alekseyev authored
-
- Mar 06, 2023
-
-
Arseniy Alekseyev authored
Apparently the code uses "+=" with a bytes object, which is linear-time, so the whole encoding is quadratic-time. This patch makes us use a bytearray object, instead, which has a(n amortized-)constant-time append operation. The encoding is still not particularly fast, but at least a 10MB file takes tens of seconds, not many hours to encode.
-
- Mar 08, 2023
-
-
Pierre-Yves David authored
Now that the two mains source of on-disk bundle are preventing the inclusion of internal changesets in their bundling. We can add a lower level check that would prevent any other leakage of internal-phase changesets. We keep the door open to some usage, like the temporary bundle using during strip for example.
-
- Mar 10, 2023
-
-
Pierre-Yves David authored
See inline comments for details.
-
Pierre-Yves David authored
See inline comment for details.
-
- Mar 08, 2023
-
-
Pierre-Yves David authored
This predicate help core code to select internal changeset (in the internal phase).
-
- Mar 10, 2023
-
-
Pierre-Yves David authored
This is working well, so no need for extract computation. See the previous changeset for the rationnal of still have these assert around for a short interval.
-
- Mar 09, 2023
-
-
Pierre-Yves David authored
We want to make change to the set of backed up revision in a future changeset, we start with a change of the computation without any changes in the semantic to clarify later changeset. The could of costly assert are here to testify that the result is still correct. They will be removed in the next changesets, but I wanted them in this changeset to help in case someone bisect a regression to this changeset in the future.
-
- Mar 10, 2023
-
-
Pierre-Yves David authored
When initializing a `outgoing` object, the `common set` can be defined explicitly (with the `commonheads` argument`) or implicitly (with the missingroots arguments). It turns out the logic to compute `commonheads` from `missingroots` is buggy, as it does not consider the parents of enough changesets. Previously, it only considered parents of "missingroots` items, while it need to consider all parents of missing. Here is an example: F |\ C E | | B D |/ A If we use [E] as missing-roots, the missing set is [E, F], and the common-heads are [C, D]. However you cannot only consider the parent of [E] to find them, as [C] is not a parent of [E]. This already fix the bundle generated in one test, and it would prevent many other to misbehave with future change from this series.
-
- Mar 09, 2023
-
-
Jason R. Coombs authored
We now properly computes and includes phases above secret in bundle, previously, they would be skipped, and then the code computing them would crash. Note that from this changeset, we also include the heads associated with the changegroup's "target" phase. This turned out to be necessary to ensure the movement of changeset included in the bundle, but already known locally. This explain why lines for "secret" heads appears in multiple tests.
-
- Mar 08, 2023
-
-
Pierre-Yves David authored
Having this test highlight that phase bundling above secret is significantly broken. Fixes coming in the next changesets.
-
Pierre-Yves David authored
This is a small update from "v2", we use the freshly out of experimental changelog version "03' format (alignment with bundle version is a coincidence) and we now bundle phases by default. We shall use v3 as the default bundle type later, when changegroup version '03' is a bit more established
-
Pierre-Yves David authored
Same logic as the previous one, we want the tests to cover richer cases. It actually reveal a bug in `hg bundle foo.hg REMOTE` involving secret. So this is definitly not a bad idea.
-
Pierre-Yves David authored
We are about to test more things, especially phase bundling, so we need a graph a bit more complex than a single node. The test "code" was a bit simplified in the process, but no test-semantic changes were made.
-
- Mar 07, 2023
-
-
Pierre-Yves David authored
We forgot up to update this when new phases were added.
-
- Mar 02, 2023
-
-
Pierre-Yves David authored
This is dead-code
-
- Mar 07, 2023
-
-
Pierre-Yves David authored
The "journal" code is much more compact in 6.4, and so is the "undo" files as a result. However the previous version were much noisier, so let us cleanup undo files from older version too.
-
- Mar 06, 2023
-
-
Pierre-Yves David authored
the in the initial design of journal/undo interaction, ages ago, new file always overwrote previous files. This is no longer the case for a long while, so it is time to properly clean things up before writing new ones. Otherwise, inconsistent "undo" state might exist on disk, leading `hg rollback` to misbehave (more that intended).
-
- Mar 07, 2023
-
-
Pierre-Yves David authored
The transaction is configuration undo prefix, so we "need" it too.
-
- Mar 06, 2023
-
-
Pierre-Yves David authored
As foretold in the previous changesets, we no longer need a full repository object here.
-
Pierre-Yves David authored
Instead of infering the list of undo files from the `_journalfiles` method on `localrepository`, we explicitly have the list of file in a constant next to the cleanup code. In practice this does not change much as `_journalfiles` is already returning the same "static" list and no internal or extensions extensions seems to actually wrap that. In addition, that list is not "too short" for cleanup, in case we need to cleanup undo files from older version of Mercurial that used to use more of them. this will be dealt with in a later changesets. This change is a step toward our goal to use the `cleanup_undo_files` within the transaction. The transaction has no reference to the `repo` object, so we need to move toward `cleanup_undo_files` not having one either.
-
Pierre-Yves David authored
Now that undo creation is gathered in the transaction module, let us move the code cleaning them up there too. This will be useful to better clean previous undo files up before creating new ones.
-
Pierre-Yves David authored
It is no longer necessary I am not changing the transaction.__init__ signature since we are on stable right now.
-
Pierre-Yves David authored
This is much simpler this way.
-
Pierre-Yves David authored
We will also needs it when the transaction will take care of the other journal files, which is soon™.
-