- Sep 06, 2023
-
-
Raphaël Gomès authored
-
- Aug 30, 2023
-
-
Pierre-Yves David authored
Without this, some manual check in tests/test-dirstate.t could get confused by the lack of `rust` in module policy and break the test.
-
Arseniy Alekseyev authored
In particular [RHG_FALLBACK_EXECUTABLE] is being set prematurely, before rhg is built, but probably the rest of the env changes don't help, either.
-
- Sep 04, 2023
-
-
Arseniy Alekseyev authored
The error message now shows the attempted hg commands and their stderr, to make it easier to investigate why things are not working. Here's an example output /!\ /!\ Unable to find a working hg binary /!\ Version cannot be extracted from the repository /!\ Re-run the setup once a first version is built /!\ Attempts: /!\ attempt #0: /!\ cmd: ['hg-missing', 'log', '-r.', '-Ttest'] /!\ exception: [Errno 2] No such file or directory: 'hg-missing': 'hg-missing' /!\ attempt #1: /!\ cmd: ['/usr/bin/python3', 'hg', 'log', '-r.', '-Ttest'] /!\ return code: 255 /!\ std output: /!\ std error: *** failed to import extension "topic": No module named 'topic' *** failed to import extension "evolve": No module named 'evolve' abort: accessing `dirstate-v2` repository without associated fast implementation. (check `hg help config.format.use-dirstate-v2` for details) /!\ /!\ Could not determine the Mercurial version /!\ You need to build a local version first /!\ Run `make local` and try again /!\
-
- Aug 21, 2023
-
-
Matt Harbison authored
This likely was always wrong on py3, since going back to aff5996f3043, these were added as a r-strings. Callers seem to always be supplying bytes, which makes the `b'/'.join(...)` part OK, but then bytes can't be interpolated into str with "%s", so it wouldn't have worked in either case.
-
- Aug 20, 2023
-
-
Matt Harbison authored
It looks like this has been broke for almost a decade, since 9c89ac99690e.
-
- Aug 10, 2023
-
-
Arseniy Alekseyev authored
relglob apparently (in contrast with relpath) matches everywhere in the tree, whereas glob only matches at the root. The python version interprets these patterns as "glob" (see "normalize(include, b'glob', ...)" in match.py)
-
- Aug 07, 2023
-
-
Manuel Jacob authored
The WSGI specification (PEP 3333) specifies that on Python 3 all strings passed by the server must be of type str with code points encodable using the ISO 8859-1 codec. For some reason, I introduced a bug in 2632c1ed8f34 by applying the reverse change. Maybe I got confused because PEP 3333 says that arbitrary operating system environment variables may be contained in the WSGI environment and therefore we need to handle the WSGI environment variables like we would handle operating system environment variables. The bug mentioned in the previous paragraph and fixed by this changeset manifested e.g. in the path of the URL being encoded in the wrong way. Browsers encode non-ASCII bytes with the percent-encoding. WSGI servers will decode the percent-encoded bytes and pass them to the application as strings where each byte is mapped to the corresponding code point with the same ordinal (i.e. it is decoded using the ISO-8859-1 codec). Mercurial uses the bytes type for these strings (which makes much more sense), so we need to encode it again using the ISO-8859-1 codec. If we use another codec, it can result in nonsense.
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
- Jun 22, 2023
-
-
Pierre-Yves David authored
That return is invalid and unnecessary.
-
- Jul 21, 2023
-
-
Pierre-Yves David authored
The `-s` is now added on the first piece only and the `.i` is added to the index. This match the initially intended naming scheme.
-
Pierre-Yves David authored
The `-s` is added on the wrong part and the `.i` is missing.
-
- Jul 13, 2023
-
-
Arseniy Alekseyev authored
-
Arseniy Alekseyev authored
-
- Jul 19, 2023
-
-
Pierre-Yves David authored
This follow POSIX and make things compatible with NetBSD.
-
Pierre-Yves David authored
This follow POSIX and make things compatible with NetBSD.
-
- Jul 12, 2023
-
-
Pierre-Yves David authored
The `name` variable was updated in each interaction of the loop, making all new filters inheriting from the same base (the last one iterated), leading to terrible terrible misbehavior.
-
Pierre-Yves David authored
See new changeset for fix and details.
-
- Jun 28, 2023
-
-
kiilerix authored
imp has been deprecated for a long time, and has finally been removed in Python 3.12 . imp was only used for loading extensions that has been specified with direct .py path or path to a package directory. The same use cases can be achieved quite simple with importlib, , possiby with small changes in corner cases with undefined behaviour, such as extensions without .py source. There might also be corner cases and undefined behaviour around use of sys.modules and reloading.
-
- Jun 27, 2023
-
-
kiilerix authored
imp has been deprecated for a long time, and has finally been removed in Python 3.12 . The successor importlib is using the same internal _imp module as imp, but doesn't expose it's is_frozen. Using the internal function directly seems like the cleanest solution. Another alternative to imp.is_frozen("__main__") is sys.modules['__main__'].__spec__.origin == 'frozen' but that seems even more internal and fragile.
-
kiilerix authored
Tests would fail with: .../mercurial/extensions.py:910: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead if isinstance(a, ast.Str): .../mercurial/extensions.py:912: DeprecationWarning: ast.Bytes is deprecated and will be removed in Python 3.14; use ast.Constant instead elif isinstance(a, ast.Bytes): .../mercurial/extensions.py:913: DeprecationWarning: Attribute s is deprecated and will be removed in Python 3.14; use value instead name = a.s
-
kiilerix authored
Tests would fail with warnings: .../mercurial/vfs.py:289: DeprecationWarning: onerror argument is deprecated, use onexc instead The excinfo changed slightly, but we don't use it anyway.
-
kiilerix authored
The output of OrderedDict changed to use plain dict syntax: $ python3.11 -c "import collections;print(collections.OrderedDict([('a', 0), ('b', 1)]))" OrderedDict([('a', 0), ('b', 1)]) $ python3.12 -c "import collections;print(collections.OrderedDict([('a', 0), ('b', 1)]))" OrderedDict({'a': 0, 'b': 1})
-
kiilerix authored
Python3.12 made tests fail with warnings: DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.fromtimestamp(timestamp, datetime.UTC). Computing the diff while in timestamp seconds seems to preserve to the original intent from ae04af1ce78d. It would be nice to have some doctest coverage of this, with the problematic corner cases that has popped up over time...
-
- Jul 06, 2023
-
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
Georges Racinet authored
Now that the underlying `RevlogEntry` returned for `NULL_REVISION` is viable, it has become pointless to check NULL_REVISION several times, even for performance: the check will be far more frequent than the benefit of bailing earlier in the rare case where the requested revision is `NULL_REVISION`. This case is covered explicitly by the first assertion of `test_data_from_rev_null`.
-
Georges Racinet authored
Before this change, the pseudo-entry returned by `Revlog.get_entry` for `NULL_REVISION` would trigger errors in application code using it. For example, this fixes a crash spotted with changelog data while implementing RHGitaly: `Changelog.data_for_rev(-1)` was already returning the pseudo content as expected, e.g., for `hg log`, but `Changelog.entry_for_rev(-1).data()` would still crash with "corrupted revlog, hash check failed for revision -1". There is an added test for this scenario.
-
Georges Racinet authored
Always better
-
- Mar 30, 2023
-
-
Georges Racinet authored
In case a short hash is a prefix of `NULL_NODE`, the correct revision number lookup is `NULL_REVISION` only if there is no match in the nodemap. Indeed, if there is a single nodemap match, then it is an ambiguity with the always matching `NULL_NODE`. Before this change, using the Mercurial development repository as a testbed (it has public changesets with node ID starting with `0005` and `0009`), this is what `rhg` did (plain `hg` provided for reference) ``` $ rust/target/debug/rhg cat -r 000 README README: no such file in rev 000000000000 $ hg cat -r 000 README abort: ambiguous revision identifier: 000 ``` Here is the expected output for `rhg` on ambiguous prefixes (again, before this change): ``` $ rust/target/debug/rhg cat -r 0001 README abort: ambiguous revision identifier: 0001 ``` The test provided by 8c29af0f6d6e in `test-rhg.t` could become flaky with this change, unless all hashes are fixed. We expect reviewers to be more sure about that than we are.
-
Georges Racinet authored
This will make easier for the bug fix that is about to come.
-
- Jun 08, 2023
-
-
Matt Harbison authored
A crash was reported on the TortoiseHg bug tracker for this[1]. [1] mercurial/tortoisehg/thg#5905
-
- Jul 04, 2023
-
-
Raphaël Gomès authored
These are always duplicated by the external (from the user) push, or internal (from Heptapod itself) push pipeline, so they're entirely redundant.
-
Raphaël Gomès authored
This has no effect on behavior, it's just to make everything obvious.
-
Raphaël Gomès authored
The internal workings of Heptapod cause even fast-forward merges to look like pushes to Gitlab. The only way to run a pipeline on topic-less named branches is not through the web interface. I am probably the only person affected by this, so it's not really a problem. This was confirmed with Georges, the maintainer of Heptapod, though the only way to be *actually* sure, is to merge this and see.
-
- Jul 03, 2023
-
-
Raphaël Gomès authored
There is no easy way for me to test this outside of the actual repo since it would require setting up `heptapod-runner` locally, making a Git repo with the right changes, etc. It's not worth my time at this point. If this fails, I'll try to ask for help from Georges, the maintainer of Heptapod.
-
Raphaël Gomès authored
See inline comment for more details.
-