diff rust/hg-core/src/errors.rs @ 49209:3f86ee422095

censor: make rhg fall back to python when encountering a censored node This is to make it support censor.policy=ignore without having to duplicate that logic. Also, change the censor test in such a way that it uses rhg now, because extensions are disabled except when we call [hg censor]. Differential Revision: https://phab.mercurial-scm.org/D12607
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Thu, 05 May 2022 15:38:29 +0100
parents abeae090ce67
children 9f14126cfc4c
line wrap: on
line diff
--- a/rust/hg-core/src/errors.rs	Wed May 04 16:01:55 2022 -0400
+++ b/rust/hg-core/src/errors.rs	Thu May 05 15:38:29 2022 +0100
@@ -42,6 +42,9 @@
     /// and syntax of each value.
     #[from]
     ConfigValueParseError(ConfigValueParseError),
+
+    /// Censored revision data.
+    CensoredNodeError,
 }
 
 /// Details about where an I/O error happened
@@ -101,6 +104,9 @@
             HgError::UnsupportedFeature(explanation) => {
                 write!(f, "unsupported feature: {}", explanation)
             }
+            HgError::CensoredNodeError => {
+                write!(f, "encountered a censored node")
+            }
             HgError::ConfigValueParseError(error) => error.fmt(f),
         }
     }