diff rust/rhg/src/error.rs @ 49489:7c93e38a0bbd

rhg-status: add support for narrow clones
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 25 Jul 2022 15:39:04 +0200
parents 9f14126cfc4c
children 8076298b795a
line wrap: on
line diff
--- a/rust/rhg/src/error.rs	Tue Jul 19 17:07:09 2022 +0200
+++ b/rust/rhg/src/error.rs	Mon Jul 25 15:39:04 2022 +0200
@@ -268,6 +268,19 @@
                     exit_codes::CONFIG_PARSE_ERROR_ABORT,
                 )
             }
+            SparseConfigError::InvalidNarrowPrefix(prefix) => {
+                Self::abort_with_exit_code_bytes(
+                    format_bytes!(
+                        b"invalid prefix on narrow pattern: {}",
+                        &prefix
+                    ),
+                    exit_codes::ABORT,
+                )
+            }
+            SparseConfigError::IncludesInNarrow => Self::abort(
+                "including other spec files using '%include' \
+                    is not supported in narrowspec",
+            ),
             SparseConfigError::HgError(e) => Self::from(e),
             SparseConfigError::PatternError(e) => {
                 Self::unsupported(format!("{}", e))