rust/rhg/src/exitcode.rs
author Simon Sapin <simon.sapin@octobus.net>
Fri, 12 Mar 2021 21:44:07 +0100
changeset 46748 bde90e9b4507
parent 46744 b1f2c2b336ec
child 46820 821929d59e01
permissions -rw-r--r--
rhg: Remove `rhg.fallback-executable=hg` default configuration When `rhg.on-unsupported` is configured to `fallback` and an unsupported feature is encountered, the previous default was to look for an `hg` executable in `$PATH`. This default was fragile since it was easy to end up accidentally using an older version of Mercurial installed system-wide, when a local (perhaps patched) installation was intended. Instead, it is now an error to have `rhg.on-unsupported=fallback` without also configuring an explicit path or the fallback executable. Differential Revision: https://phab.mercurial-scm.org/D10189

pub type ExitCode = i32;

/// Successful exit
pub const OK: ExitCode = 0;

/// Generic abort
pub const ABORT: ExitCode = 255;

/// Generic something completed but did not succeed
pub const UNSUCCESSFUL: ExitCode = 1;

/// Command or feature not implemented by rhg
pub const UNIMPLEMENTED: ExitCode = 252;