Mon, 17 May 2021 14:41:09 +0200 updatecaches: introduce a set of constants to control which are updated
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 17 May 2021 14:41:09 +0200] rev 47296
updatecaches: introduce a set of constants to control which are updated Passing around a set of constant to select what need warming will be cleaner and more flexible. We did not changed the API yet, as this changes is already large enough. In the rest of the rest we will change more code to actually use this constants (or more realistically pre-defined set of constant directly) Differential Revision: https://phab.mercurial-scm.org/D10727
Tue, 18 May 2021 21:50:09 -0700 errors: make StorageError subclass Error, attaching an exit code to it
Martin von Zweigbergk <martinvonz@google.com> [Tue, 18 May 2021 21:50:09 -0700] rev 47295
errors: make StorageError subclass Error, attaching an exit code to it Differential Revision: https://phab.mercurial-scm.org/D10741
Tue, 18 May 2021 19:33:09 -0700 revlog: avoid raising no-arg RevlogError for internal flow control
Martin von Zweigbergk <martinvonz@google.com> [Tue, 18 May 2021 19:33:09 -0700] rev 47294
revlog: avoid raising no-arg RevlogError for internal flow control I'm about to make RevlogError require a `message` argument and this code was failing. This patch refactors it to not raise an exception for intra-function flow control. Differential Revision: https://phab.mercurial-scm.org/D10740
Tue, 18 May 2021 21:45:59 -0700 errors: catch the new Error class in scmutil and chgserver
Martin von Zweigbergk <martinvonz@google.com> [Tue, 18 May 2021 21:45:59 -0700] rev 47293
errors: catch the new Error class in scmutil and chgserver Differential Revision: https://phab.mercurial-scm.org/D10739
Tue, 18 May 2021 21:32:12 -0700 errors: create superclass for Abort exception
Martin von Zweigbergk <martinvonz@google.com> [Tue, 18 May 2021 21:32:12 -0700] rev 47292
errors: create superclass for Abort exception I'd like to let extensions subclass `StorageError` to define a custom exit code. However, `StorageError` does not extend `Abort` (which is where the exit code currently lives), and it seems that it's not supposed to either (`StorageError` seems to be for lower-level errors and `Abort` is for command-level errors). This patch therefore extracts all the code from `Abort` into a new `Error` class, which I'll soon make `StorageError` also extend. Differential Revision: https://phab.mercurial-scm.org/D10738
Tue, 18 May 2021 22:07:16 -0700 errors: make InterventionRequired subclass Abort
Martin von Zweigbergk <martinvonz@google.com> [Tue, 18 May 2021 22:07:16 -0700] rev 47291
errors: make InterventionRequired subclass Abort The docstring for `Abort` says that it's for errors raised by commands and `InterventionRequired` is definitely something raised by commands, so it seems that it should be an `Abort`. This patch makes it so. It adds a `coarse_exit_code` (in addition to the already existing `detailed_exit_code`) to `Abort` to achieve that, since `InterventionRequired` should result in a special exit code even when the `ui.detailed-exit-code` config is not set. Differential Revision: https://phab.mercurial-scm.org/D10737
Tue, 18 May 2021 21:58:12 -0700 errors: move Abort earlier, so more exceptions can subclass it
Martin von Zweigbergk <martinvonz@google.com> [Tue, 18 May 2021 21:58:12 -0700] rev 47290
errors: move Abort earlier, so more exceptions can subclass it I'd like to make at least `InterventionRequired` subclass `Abort` and Python requires the superclass to be defined before the subtype. Differential Revision: https://phab.mercurial-scm.org/D10736
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 47289
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 47288
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 47287
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
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip