diff rust/rhg/src/exitcode.rs @ 45049:513b3ef277a3

rhg: add RootCommand using hg-core FindRoot operation to prepare `hg root` The println macro is not used to avoid string usage. Dealing only with bytes allows us to be compatible with any encoding and not just UTF8. Later on, format macro will be made to have more readable code. Differential Revision: https://phab.mercurial-scm.org/D8612
author Antoine Cezar <antoine.cezar@octobus.net>
date Fri, 05 Jun 2020 09:01:35 +0200
parents cf04f62d1579
children ca3f73cc3cf4
line wrap: on
line diff
--- a/rust/rhg/src/exitcode.rs	Mon Jul 06 22:02:50 2020 -0400
+++ b/rust/rhg/src/exitcode.rs	Fri Jun 05 09:01:35 2020 +0200
@@ -1,4 +1,10 @@
 pub type ExitCode = i32;
 
+/// Successful exit
+pub const OK: ExitCode = 0;
+
+/// Generic abort
+pub const ABORT: ExitCode = 255;
+
 /// Command not implemented by rhg
 pub const UNIMPLEMENTED_COMMAND: ExitCode = 252;