Mercurial > hg
diff rust/rhg/src/commands/cat.rs @ 45937:2ad2745e0be9
rhg: exit with relevant code for unsupported requirements
Differential Revision: https://phab.mercurial-scm.org/D9399
author | Simon Sapin <simon-commits@exyr.org> |
---|---|
date | Tue, 24 Nov 2020 18:52:38 +0100 |
parents | db11f8f39caf |
children | 904647f7d983 |
line wrap: on
line diff
--- a/rust/rhg/src/commands/cat.rs Tue Oct 06 03:25:15 2020 +0200 +++ b/rust/rhg/src/commands/cat.rs Tue Nov 24 18:52:38 2020 +0100 @@ -4,6 +4,7 @@ use crate::ui::Ui; use hg::operations::FindRoot; use hg::operations::{CatRev, CatRevError, CatRevErrorKind}; +use hg::requirements; use hg::utils::hg_path::HgPathBuf; use micro_timer::timed; use std::convert::TryFrom; @@ -32,6 +33,7 @@ #[timed] fn run(&self, ui: &Ui) -> Result<(), CommandError> { let root = FindRoot::new().run()?; + requirements::check(&root)?; let cwd = std::env::current_dir() .or_else(|e| Err(CommandErrorKind::CurrentDirNotFound(e)))?;