annotate rust/rhg/src/exitcode.rs @ 46734:1a036d33bc18

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
author Simon Sapin <simon.sapin@octobus.net>
date Fri, 12 Mar 2021 22:38:40 +0100
parents ca3f73cc3cf4
children b1f2c2b336ec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
44981
cf04f62d1579 rhg: add rhg crate
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
1 pub type ExitCode = i32;
cf04f62d1579 rhg: add rhg crate
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
2
45049
513b3ef277a3 rhg: add RootCommand using hg-core FindRoot operation to prepare `hg root`
Antoine Cezar <antoine.cezar@octobus.net>
parents: 44981
diff changeset
3 /// Successful exit
513b3ef277a3 rhg: add RootCommand using hg-core FindRoot operation to prepare `hg root`
Antoine Cezar <antoine.cezar@octobus.net>
parents: 44981
diff changeset
4 pub const OK: ExitCode = 0;
513b3ef277a3 rhg: add RootCommand using hg-core FindRoot operation to prepare `hg root`
Antoine Cezar <antoine.cezar@octobus.net>
parents: 44981
diff changeset
5
513b3ef277a3 rhg: add RootCommand using hg-core FindRoot operation to prepare `hg root`
Antoine Cezar <antoine.cezar@octobus.net>
parents: 44981
diff changeset
6 /// Generic abort
513b3ef277a3 rhg: add RootCommand using hg-core FindRoot operation to prepare `hg root`
Antoine Cezar <antoine.cezar@octobus.net>
parents: 44981
diff changeset
7 pub const ABORT: ExitCode = 255;
513b3ef277a3 rhg: add RootCommand using hg-core FindRoot operation to prepare `hg root`
Antoine Cezar <antoine.cezar@octobus.net>
parents: 44981
diff changeset
8
46445
ca3f73cc3cf4 rhg: Simplify CommandError based on its use
Simon Sapin <simon.sapin@octobus.net>
parents: 45049
diff changeset
9 /// Command or feature not implemented by rhg
ca3f73cc3cf4 rhg: Simplify CommandError based on its use
Simon Sapin <simon.sapin@octobus.net>
parents: 45049
diff changeset
10 pub const UNIMPLEMENTED: ExitCode = 252;