Mercurial > public > mercurial-scm > hg-stable
comparison rust/hg-core/src/exit_codes.rs @ 48846:006688e36e12 stable
rhg: use `Command::exec` instead of `Command::status`
`rhg` is supposed to be a transparent executable, using a subprocess defeats
that purpose. See inline comments for more details.
This also introduces the `which` crate to check if the fallback executable
actually exists to help debugging (plain `execve` doesn't give much
information).
The error code 253 is used to signify that the fallback is not found, but may
mean in the future that it is otherwise invalid if we start being more
specific.
Differential Revision: https://phab.mercurial-scm.org/D12578
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Tue, 19 Apr 2022 12:27:40 +0200 |
parents | 6e49769b7f97 |
children | 7c93e38a0bbd |
comparison
equal
deleted
inserted
replaced
48845:db3f8e5cc965 | 48846:006688e36e12 |
---|---|
15 /// Generic something completed but did not succeed | 15 /// Generic something completed but did not succeed |
16 pub const UNSUCCESSFUL: ExitCode = 1; | 16 pub const UNSUCCESSFUL: ExitCode = 1; |
17 | 17 |
18 /// Command or feature not implemented by rhg | 18 /// Command or feature not implemented by rhg |
19 pub const UNIMPLEMENTED: ExitCode = 252; | 19 pub const UNIMPLEMENTED: ExitCode = 252; |
20 | |
21 /// The fallback path is not valid | |
22 pub const INVALID_FALLBACK: ExitCode = 253; |