Tue, 18 May 2021 17:15:49 -0700 errors: let each Abort subclass define its error code
Martin von Zweigbergk <martinvonz@google.com> [Tue, 18 May 2021 17:15:49 -0700] rev 47300
errors: let each Abort subclass define its error code It's more flexible to have the error codes defined on the error types themselves. That way extensions can easily set their own exit code. It also means that we can reduce a bit of duplication betwen `scmutil.callcatch()` and `chgserver.chgcmdserver.validate()`. Differential Revision: https://phab.mercurial-scm.org/D10735
Wed, 19 May 2021 15:10:49 +0200 rust: Fix "panic message is not a string literal" warnings
Simon Sapin <simon.sapin@octobus.net> [Wed, 19 May 2021 15:10:49 +0200] rev 47299
rust: Fix "panic message is not a string literal" warnings These deprecation warnings would not become errors until we actively port crates to the (not yet released) Rust 2021 edition, but fixing them anyway reduces console output noise. Differential Revision: https://phab.mercurial-scm.org/D10743
Wed, 19 May 2021 15:08:27 +0200 rust: Add type annotation to fix inference on Rust Nightly
Simon Sapin <simon.sapin@octobus.net> [Wed, 19 May 2021 15:08:27 +0200] rev 47298
rust: Add type annotation to fix inference on Rust Nightly When compiling with Rust Nightly, the im-rs crate silently makes use of the experimental language feature for trait impl specialization. This apperently changes public its APIs in subtle ways such that type inference of some user code can fail where it succeeds when specialization is disabled. This made Mercurial’s Rust unit tests have compilation errors on Nightly. I have not managed to find the exactl root cause, but I wrote down my findings so far at https://github.com/bodil/im-rs/issues/188 This adds type annotation to make unit tests rely less on type inference and work around the issue. Differential Revision: https://phab.mercurial-scm.org/D10742
Wed, 19 May 2021 13:45:34 +0200 recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de> [Wed, 19 May 2021 13:45:34 +0200] rev 47297
recover: only apply last journal record per file (issue6423) This got broken in 2019 when the size check was introduced. It is most noticable when dealing with transactions that involve an inline to non-inline revlog storage transaction. It wasn't seen as much at the time because the in-memory journal actually de-duplicated the entry implicity, but since 63edc384d3b7 the on-disk journal is used for rollback as well as recover. Differential Revision: https://phab.mercurial-scm.org/D10726
Wed, 19 May 2021 13:46:19 +0200 revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de> [Wed, 19 May 2021 13:46:19 +0200] rev 47296
revlog: update data file record before index rename When migrating from inline to non-inline data storage, the data file is recorded initially as zero sized so that it is removed on failure. But the record has to be updated before the index is renamed, otherwise data is lost on rollback. Differential Revision: https://phab.mercurial-scm.org/D10725
Tue, 18 May 2021 02:35:27 +0200 revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de> [Tue, 18 May 2021 02:35:27 +0200] rev 47295
revlog: fix index computation during inline->non-inline transition The computation in 63edc384d3b7 failed to factor in the index entries themselve as revlog.start() doesn't count them. Found by Valtenin Gatienbaron with a more precise test case from me. Differential Revision: https://phab.mercurial-scm.org/D10724
Wed, 19 May 2021 13:15:00 +0200 dirstate-v2: Change the on-disk format to be tree-shaped
Simon Sapin <simon.sapin@octobus.net> [Wed, 19 May 2021 13:15:00 +0200] rev 47294
dirstate-v2: Change the on-disk format to be tree-shaped Nodes are stored not only for tracked files but also for their ancestor directories. A node has "pointers" (byte count from the start of the file) to its direct child nodes. Everything can be accessed with zero copy. Differential Revision: https://phab.mercurial-scm.org/D10722
Wed, 19 May 2021 13:15:00 +0200 dirstate-tree: Extract into a method sorting children of a given node
Simon Sapin <simon.sapin@octobus.net> [Wed, 19 May 2021 13:15:00 +0200] rev 47293
dirstate-tree: Extract into a method sorting children of a given node A later changset will use this in another place. This is an associated function (that Python would call static method) instead of a free function so it doesn’t need to be imported separately. It’s on `Node` rather than `ChildNodes` because the latter is a type alias to an external type (`HashMap`) so that would require an extension trait which needs to be imported separately. Differential Revision: https://phab.mercurial-scm.org/D10721
Wed, 19 May 2021 13:15:00 +0200 dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net> [Wed, 19 May 2021 13:15:00 +0200] rev 47292
dirstate-v2: Add a variant of some tests, that uses the new format With this, the new format receives some testing every time someone runs tests with Rust extensions enabled, including on CI. Differential Revision: https://phab.mercurial-scm.org/D10720
Wed, 19 May 2021 13:15:00 +0200 dirstate-v2: Change the on-disk format when the requirement is enabled
Simon Sapin <simon.sapin@octobus.net> [Wed, 19 May 2021 13:15:00 +0200] rev 47291
dirstate-v2: Change the on-disk format when the requirement is enabled For now, the format is the same except with an additional marker at the start. This marker is redundant: for existing repositories it is `.hg/requires` that determines which format to use. For new repositories, it is the new `format.exp-dirstate-v2` config. There is no upgrade or downgrade so far. Most of the changes are about plumbing a boolean through layers of APIs to indicate which format should be used. Differential Revision: https://phab.mercurial-scm.org/D10719
Wed, 19 May 2021 13:15:00 +0200 dirstate-v2: Update the expected output of some tests for new requirement
Simon Sapin <simon.sapin@octobus.net> [Wed, 19 May 2021 13:15:00 +0200] rev 47290
dirstate-v2: Update the expected output of some tests for new requirement Fix most test failures (except in test-narrow-debugrebuilddirstate.t and test-upgrade-repo.t) caused by the new entry in config or in .hg/requires when running `run-tests.py --extra-config-opt format.exp-dirstate-v2=1` There is no CI so far for this configuration. Differential Revision: https://phab.mercurial-scm.org/D10718
Wed, 19 May 2021 13:14:59 +0200 tests: More cleanly separate expected hexdump output
Simon Sapin <simon.sapin@octobus.net> [Wed, 19 May 2021 13:14:59 +0200] rev 47289
tests: More cleanly separate expected hexdump output There are more lines that differ than are in common, and dirstate-v2 will complicate that further. Differential Revision: https://phab.mercurial-scm.org/D10717
Wed, 19 May 2021 13:14:59 +0200 dirstate-v2: Add a new experimental `exp-dirstate-v2` repository requirement
Simon Sapin <simon.sapin@octobus.net> [Wed, 19 May 2021 13:14:59 +0200] rev 47288
dirstate-v2: Add a new experimental `exp-dirstate-v2` repository requirement This requirement is added to `.hg/requires` when creating a new repository if Rust extensions are enabled and the `format.exp-dirstate-v2` config is set. Nothing yet changes based on this requirement, but its mere presence affects some tests (for example if they print `.hg/requires`). The next two changesets update tests’ expected outputs accordingly. There is no CI so far that enables this configuration. Differential Revision: https://phab.mercurial-scm.org/D10716
Fri, 16 Apr 2021 00:16:43 +0200 urlutil: provide some information about "bad url" when processing `pushurl`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Apr 2021 00:16:43 +0200] rev 47287
urlutil: provide some information about "bad url" when processing `pushurl` It appears pushurl only support `<proto>://` entries. This is not obvious and can lead to obscure error. We make the error less obscure as a start.. Differential Revision: https://phab.mercurial-scm.org/D10455
Sun, 11 Apr 2021 19:19:34 +0200 revset: document the `outgoing` behavior if the path resolve to multiple urls
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 11 Apr 2021 19:19:34 +0200] rev 47286
revset: document the `outgoing` behavior if the path resolve to multiple urls Differential Revision: https://phab.mercurial-scm.org/D10454
Fri, 16 Apr 2021 00:19:04 +0200 multi-urls: document the feature
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Apr 2021 00:19:04 +0200] rev 47285
multi-urls: document the feature We have a feature lets make it visible to people. Differential Revision: https://phab.mercurial-scm.org/D10453
Fri, 16 Apr 2021 00:16:47 +0200 multi-urls: add a boolean suboption that unlock path specification as list
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Apr 2021 00:16:47 +0200] rev 47284
multi-urls: add a boolean suboption that unlock path specification as list When this option is set, a list of patch can be specifed as value for `[paths]` entries. For the command who support it, this behave the same as providing multiple destination of the command line. Differential Revision: https://phab.mercurial-scm.org/D10452
Thu, 15 Apr 2021 20:13:29 +0200 urlutil: move url "fixing" at the time of `ui.paths` initialization
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 20:13:29 +0200] rev 47283
urlutil: move url "fixing" at the time of `ui.paths` initialization Doing such fixing at the time is simpler and will be necessary to deal with urls list in a sane manner. It also reduce the size of fix-config which is always better. I wish we could get ride of the hackish way to pass the root around, I suspect that the `root` variable could be stored as part of the config value, along side the source. However getting to the end of this `root` business is a far too large detours to make now. The test change to `tests/test-hgrc.t` and `test-config.t` are expectied since we are not longer altering the config itself, but the way it is interpreted when building path. This seems more correct. I also added a couple of test call to `test-config.t` and `test-globalopts.t` to clarify that the expanding process is properly happening a the right time. Differential Revision: https://phab.mercurial-scm.org/D10451
Mon, 17 May 2021 15:15:44 -0700 rewriteutil: add pointer to help text when rewrite would cause divergence
Martin von Zweigbergk <martinvonz@google.com> [Mon, 17 May 2021 15:15:44 -0700] rev 47282
rewriteutil: add pointer to help text when rewrite would cause divergence The evolve extension's version of the hint has this pointer. I missed it when I moved it to core. Differential Revision: https://phab.mercurial-scm.org/D10723
Tue, 04 May 2021 11:20:10 +0200 changelogv2: use a dedicated on disk format for changelogv2
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 04 May 2021 11:20:10 +0200] rev 47281
changelogv2: use a dedicated on disk format for changelogv2 We drop two unused entry. This is mostly a proof of concept before starting to actually rework the format. Differential Revision: https://phab.mercurial-scm.org/D10667
Tue, 04 May 2021 14:18:06 +0200 revlog: do not call Rust code if the index is not compatible with it
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 04 May 2021 14:18:06 +0200] rev 47280
revlog: do not call Rust code if the index is not compatible with it This will avoid hitting the TypeError we defined in the previous changesets. This is the simplest fix but not the most elegant. Ideally we would teach the Rust code to use any kind of revlog. However this is an adventure for another time. Differential Revision: https://phab.mercurial-scm.org/D10666
Tue, 04 May 2021 14:16:26 +0200 revlog: signal which revlog index are compatible with Rust
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 04 May 2021 14:16:26 +0200] rev 47279
revlog: signal which revlog index are compatible with Rust Otherwise, Rust may treat python object like `cindex` object, leading to trouble. The new attribute is an integer because I expect we might need a flag field in the future. As a start we get the rust code to raise a clear TypeError. We will use the information in a smarter way in the next changesets. Differential Revision: https://phab.mercurial-scm.org/D10665
Tue, 04 May 2021 11:19:48 +0200 revlog: pass around the `rev` we deal with when packing/unpacking entry
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 04 May 2021 11:19:48 +0200] rev 47278
revlog: pass around the `rev` we deal with when packing/unpacking entry This will help code to compute some flag on the fly. Differential Revision: https://phab.mercurial-scm.org/D10664
Mon, 29 Mar 2021 20:46:56 +0200 changelogv2: use a dedicated version number
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 Mar 2021 20:46:56 +0200] rev 47277
changelogv2: use a dedicated version number If we want to change the format, we need a new version number. We start with that. Differential Revision: https://phab.mercurial-scm.org/D10663
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -24 +24 +50 +100 +300 +1000 +3000 tip