Simon Sapin <simon.sapin@octobus.net> [Mon, 08 Mar 2021 08:35:43 +0100] rev 46740
rhg: Don’t make repository path absolute too early
Some error messages want to include a relative path,
which affects the output of some tests.
Differential Revision: https://phab.mercurial-scm.org/D10138
Simon Sapin <simon.sapin@octobus.net> [Fri, 05 Mar 2021 13:28:49 +0100] rev 46739
rhg: Fall back to Python if ui.relative-paths is configured
This feature is not supported yet, and affects the output of some tests.
Differential Revision: https://phab.mercurial-scm.org/D10137
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 08 Mar 2021 17:32:22 +0100] rev 46738
tests: clarify some missing output in test-merge-subrepos
This makes the test behavior clearer, especially, why the output are
inconsistent.
Differential Revision: https://phab.mercurial-scm.org/D10136
Simon Sapin <simon.sapin@octobus.net> [Fri, 05 Mar 2021 11:39:21 +0100] rev 46737
tests: Adapt expected output for minor differences with rhg
Differential Revision: https://phab.mercurial-scm.org/D10135
Simon Sapin <simon.sapin@octobus.net> [Fri, 05 Mar 2021 11:21:15 +0100] rev 46736
rhg: Add support for --cwd
This affect the meaning of relative paths in `--repository`,
which are resolved "early" by rhg in order to load config
which is needed before fallback to Python is considered.
An incorrect path could cause errors when loading a non-existent repo,
leading to failing tests even when fallback is enabled.
Differential Revision: https://phab.mercurial-scm.org/D10134
Simon Sapin <simon.sapin@octobus.net> [Thu, 04 Mar 2021 13:30:20 +0100] rev 46735
rhg: Align with Python on some more error messages
Differences can cause some tests to fail
Differential Revision: https://phab.mercurial-scm.org/D10133
Simon Sapin <simon.sapin@octobus.net> [Fri, 12 Mar 2021 22:38:40 +0100] rev 46734
rhg: Add an allow-list of ignored extensions
Because rhg doesn’t know how a Python extension would affect
behavior it implements in Rust, when an unsupported extension
is enabled it conservatively falls back to Python-based hg.
However many users will have unsupported extensions enabled in practice.
Maybe they don’t actually affect rhg behavior, but we don’t know.
This adds a `rhg.ignored-extensions` configuration that lets
users list extensions that rhg can safely ignore and proceed even
if they’re not supported in Rust.
Differential Revision: https://phab.mercurial-scm.org/D10188
Simon Sapin <simon.sapin@octobus.net> [Thu, 04 Mar 2021 10:58:43 +0100] rev 46733
rhg: Fall back to Python if unsupported extensions are enabled
Extensions might affect behavior in ways we can’t anticipate,
so just ignoring them is not correct.
Later we’ll add opt-in configuration to ignore specific extensions.
Differential Revision: https://phab.mercurial-scm.org/D10112
Simon Sapin <simon.sapin@octobus.net> [Wed, 03 Mar 2021 20:02:07 +0100] rev 46732
rhg: Sort config files when adding a directory
For example in `/etc/mercurial/hgrc.d/` or with `HGRCPATH=some-directory`.
Previously files where parsed in the order returned by the filesystem,
which is undefined. But order is significant when multiple files
define the same configuration key: the "last" one wins.
Differential Revision: https://phab.mercurial-scm.org/D10111
Simon Sapin <simon.sapin@octobus.net> [Wed, 03 Mar 2021 19:47:48 +0100] rev 46731
rhg: Align config file parse error formatting with Python
Differences can cause tests to fail
Differential Revision: https://phab.mercurial-scm.org/D10110
Simon Sapin <simon.sapin@octobus.net> [Wed, 03 Mar 2021 19:08:27 +0100] rev 46730
rhg: Fall back to Python for bundle repositories
rhg does not support bundles at all, yet.
Differential Revision: https://phab.mercurial-scm.org/D10102
Simon Sapin <simon.sapin@octobus.net> [Wed, 03 Mar 2021 19:02:06 +0100] rev 46729
rhg: Fall back to Python on --repository with an URL
A low-hanging fruit to improve on this would be to properly parse
and handle `file:` URLs. But other Python-based hg supports
some other URL schemes for features that rhg does not support yet.
Differential Revision: https://phab.mercurial-scm.org/D10101
Simon Sapin <simon.sapin@octobus.net> [Wed, 03 Mar 2021 18:43:05 +0100] rev 46728
rhg: Print non-absolutized path in "repository {} not found" errors
… like Python does. Differences in ouput can cause tests to fail.
Differential Revision: https://phab.mercurial-scm.org/D10100
Simon Sapin <simon.sapin@octobus.net> [Wed, 03 Mar 2021 18:40:17 +0100] rev 46727
rhg: Align "malformed --config" error message with Python
Differences in error message formatting can cause tests to fail.
Differential Revision: https://phab.mercurial-scm.org/D10099
Simon Sapin <simon.sapin@octobus.net> [Wed, 03 Mar 2021 18:38:22 +0100] rev 46726
rhg: Fall back to Python on unsupported `rhg config <section>`
Printing an entire section (as opposed to a single value with
`rhg config foo.bar`) is not supported yet in Rust only.
Differential Revision: https://phab.mercurial-scm.org/D10098
Simon Sapin <simon.sapin@octobus.net> [Tue, 02 Mar 2021 23:18:23 +0100] rev 46725
rhg: Fall back to Python for unsupported revset syntax
rhg only supports a small subset of the syntax.
On parse error, this gives Python a chance instead of aborting immediately.
Differential Revision: https://phab.mercurial-scm.org/D10097
Simon Sapin <simon.sapin@octobus.net> [Wed, 03 Mar 2021 18:00:54 +0100] rev 46724
tests: Add `rhg` and `no-rhg` for #require and #if in .t files
With this we can allow some small differences in expected output
between Rust-based and Python-based code paths.
Differential Revision: https://phab.mercurial-scm.org/D10096
Simon Sapin <simon.sapin@octobus.net> [Tue, 02 Mar 2021 22:42:10 +0100] rev 46723
tests: Enable rhg fallback to Python by default in tests
This premise of `run-tests.py --rhg`: fallback should make
`rhg` behave the same as `hg`, except faster in some cases.
To test run the whole test suite with installed `rhg` as `hg`
and with fallback enabled.
Differential Revision: https://phab.mercurial-scm.org/D10187
Simon Sapin <simon.sapin@octobus.net> [Fri, 12 Mar 2021 18:45:32 +0100] rev 46722
rhg: Add environment variables for fallback configuration
For the `rust-tests.py --rhg` we want every `hg` command in tests
to run `rhg` with fallback enabled, but other methods of setting
configuration are limited or disruptive as discussed in code comment.
Differential Revision: https://phab.mercurial-scm.org/D10186
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 11 Mar 2021 11:22:54 +0100] rev 46721
paths: add a `*` special path to define default sub option
Differential Revision: https://phab.mercurial-scm.org/D10163
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 11 Mar 2021 17:26:49 +0100] rev 46720
ui: pass a `ui` object to `paths.getpath`
I want to introduce more path's suboption and make it possible to use default
value for them. Processing theses sub-options might result in warnings. We
need a `ui` object to issue such warnings.
To make things simpler, we add an helper method on the `ui` object.
Differential Revision: https://phab.mercurial-scm.org/D10162
Raphaël Gomès <rgomes@octobus.net> [Mon, 15 Mar 2021 10:57:02 +0100] rev 46719
configitems: add TODOs blocking the move out of experimental for revlogv2
These are the todos so far, we probably will have more, but we might as well
list them while they're fresh in our minds.
Differential Revision: https://phab.mercurial-scm.org/D10216
Raphaël Gomès <rgomes@octobus.net> [Fri, 19 Feb 2021 11:24:50 +0100] rev 46718
sidedata-exchange: rewrite sidedata on-the-fly whenever possible
When a A exchanges with B, the difference of their supported sidedata categories
is made, and the responsibility is always with the client to generated it:
- If A pushes to B and B requires category `foo` that A does not have, A
will need to generate it when sending it to B.
- If A pulls from B and A needs category `foo`, it will generate `foo`
before the end of the transaction.
- Any category that is not required is removed. If peers are not compatible,
abort.
It is forbidden to rewrite sidedata for a rev that already has sidedata, since
that would introduce unreachable (garbage) data in the data file, something
we're not prepared for yet.
Differential Revision: https://phab.mercurial-scm.org/D10032
Raphaël Gomès <rgomes@octobus.net> [Mon, 15 Feb 2021 11:08:28 +0100] rev 46717
revlog-index: add `replace_sidedata_info` method
During a `pull` operation where the server does not provide sidedata, the client
that requires it should generate them on-the-fly. In the generic case, we need
to wait for the changelog + manifests + filelogs to be added, since we don't
know what the sidedata computers might need: this means rewriting the sidedata
of index entries from within the pull transaction (and no further back) right
after we've added them.
Both Python and C implementations only allow for rewriting the sidedata offset
and length for revs within the transaction where they were created.
Differential Revision: https://phab.mercurial-scm.org/D10031