Fri, 05 Mar 2021 11:21:15 +0100 rhg: Add support for --cwd
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
Thu, 04 Mar 2021 13:30:20 +0100 rhg: Align with Python on some more error messages
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
Fri, 12 Mar 2021 22:38:40 +0100 rhg: Add an allow-list of ignored extensions
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
Thu, 04 Mar 2021 10:58:43 +0100 rhg: Fall back to Python if unsupported extensions are enabled
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
Wed, 03 Mar 2021 20:02:07 +0100 rhg: Sort config files when adding a directory
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
Wed, 03 Mar 2021 19:47:48 +0100 rhg: Align config file parse error formatting with Python
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
Wed, 03 Mar 2021 19:08:27 +0100 rhg: Fall back to Python for bundle repositories
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
Wed, 03 Mar 2021 19:02:06 +0100 rhg: Fall back to Python on --repository with an URL
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
Wed, 03 Mar 2021 18:43:05 +0100 rhg: Print non-absolutized path in "repository {} not found" errors
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
Wed, 03 Mar 2021 18:40:17 +0100 rhg: Align "malformed --config" error message with Python
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
Wed, 03 Mar 2021 18:38:22 +0100 rhg: Fall back to Python on unsupported `rhg config <section>`
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
Tue, 02 Mar 2021 23:18:23 +0100 rhg: Fall back to Python for unsupported revset syntax
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
Wed, 03 Mar 2021 18:00:54 +0100 tests: Add `rhg` and `no-rhg` for #require and #if in .t files
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
Tue, 02 Mar 2021 22:42:10 +0100 tests: Enable rhg fallback to Python by default in tests
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
Fri, 12 Mar 2021 18:45:32 +0100 rhg: Add environment variables for fallback configuration
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
Thu, 11 Mar 2021 11:22:54 +0100 paths: add a `*` special path to define default sub option
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
Thu, 11 Mar 2021 17:26:49 +0100 ui: pass a `ui` object to `paths.getpath`
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
Mon, 15 Mar 2021 10:57:02 +0100 configitems: add TODOs blocking the move out of experimental for revlogv2
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
Fri, 19 Feb 2021 11:24:50 +0100 sidedata-exchange: rewrite sidedata on-the-fly whenever possible
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
Mon, 15 Feb 2021 11:08:28 +0100 revlog-index: add `replace_sidedata_info` method
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
Fri, 19 Feb 2021 11:04:17 +0100 revlogv2: temporarily forbid inline revlogs
Raphaël Gomès <rgomes@octobus.net> [Fri, 19 Feb 2021 11:04:17 +0100] rev 46716
revlogv2: temporarily forbid inline revlogs See inline comments. I plan to fix the underlying issue before revlogv2 is stabilized. Differential Revision: https://phab.mercurial-scm.org/D10030
Fri, 19 Feb 2021 11:15:42 +0100 changegroupv4: add sidedata helpers
Raphaël Gomès <rgomes@octobus.net> [Fri, 19 Feb 2021 11:15:42 +0100] rev 46715
changegroupv4: add sidedata helpers These helpers carry the information and computers needed to rewrite sidedata when generating/applying patches. We will be making use of them soon. Differential Revision: https://phab.mercurial-scm.org/D10029
Wed, 10 Mar 2021 19:33:18 +0100 revlog: add attribute on revlogs that specifies its kind
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Mar 2021 19:33:18 +0100] rev 46714
revlog: add attribute on revlogs that specifies its kind The sidedata logic needs to check whether the revlog it's working on is a changelog, a manifest or a filelog. Furthermore, future versions of the revlog format will most likely see a split between the three types (i.e. they will store different information), so having this will be useful for other future endeavors as well. Differential Revision: https://phab.mercurial-scm.org/D10151
Fri, 19 Feb 2021 10:53:27 +0100 sidedata-exchange: add `wanted_sidedata` and `sidedata_computers` to repos
Raphaël Gomès <rgomes@octobus.net> [Fri, 19 Feb 2021 10:53:27 +0100] rev 46713
sidedata-exchange: add `wanted_sidedata` and `sidedata_computers` to repos Each repo will advertise the sidedata categories it requires (categories being unique and canonical), and have a set of "computers", functions to generate sidedata from `(repo, revlog, rev, previous_sidedata)`, for a given category. The set of computers can be a superset of the set of the wanted categories, but not smaller: repos are expected to be coherent in their handling of sidedata. Differential Revision: https://phab.mercurial-scm.org/D10028
Thu, 18 Feb 2021 18:18:35 +0100 delta: add sidedata field to revision delta
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Feb 2021 18:18:35 +0100] rev 46712
delta: add sidedata field to revision delta When emitting revision delta, we need to also emit the sidedata information just added in the revlogv2 format if appropriate. Differential Revision: https://phab.mercurial-scm.org/D10027
Thu, 18 Feb 2021 17:36:52 +0100 changegroup: add v4 changegroup for revlog v2 exchange
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Feb 2021 17:36:52 +0100] rev 46711
changegroup: add v4 changegroup for revlog v2 exchange This change only adds the required infrastructure for the new changegroup format and does not do any actual exchange. This will be done in the next patches. Differential Revision: https://phab.mercurial-scm.org/D10026
Fri, 19 Feb 2021 11:07:10 +0100 revlogv2: don't assume that the sidedata of the last rev is right after data
Raphaël Gomès <rgomes@octobus.net> [Fri, 19 Feb 2021 11:07:10 +0100] rev 46710
revlogv2: don't assume that the sidedata of the last rev is right after data We are going to be rewriting sidedata soon, it's going to be appended to the revlog data file, meaning that the data and the sidedata might not be contiguous. Differential Revision: https://phab.mercurial-scm.org/D10025
Mon, 18 Jan 2021 11:44:51 +0100 sidedata: move to new sidedata storage in revlogv2
Raphaël Gomès <rgomes@octobus.net> [Mon, 18 Jan 2021 11:44:51 +0100] rev 46709
sidedata: move to new sidedata storage in revlogv2 The current (experimental) sidedata system uses flagprocessors to signify the presence and store/retrieve sidedata from the raw revlog data. This proved to be quite fragile from an exchange perspective and a lot more complex than simply having a dedicated space in the new revlog format. This change does not handle exchange (ironically), so the test for amend - that uses a bundle - is broken. This functionality is split into the next patches. Differential Revision: https://phab.mercurial-scm.org/D9993
Wed, 20 Jan 2021 18:35:12 +0100 cext: add support for revlogv2
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Jan 2021 18:35:12 +0100] rev 46708
cext: add support for revlogv2 This enables the C code to retrieve/create entries in the revlog v2 format. This is mainly a matter of taking into account the additional slots for sidedata, etc. Differential Revision: https://phab.mercurial-scm.org/D9846
Mon, 18 Jan 2021 10:43:12 +0100 bitmanipulation: add utils to read/write bigendian 64bit integers
Raphaël Gomès <rgomes@octobus.net> [Mon, 18 Jan 2021 10:43:12 +0100] rev 46707
bitmanipulation: add utils to read/write bigendian 64bit integers Differential Revision: https://phab.mercurial-scm.org/D9845
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 tip