Mercurial > public > mercurial-scm > hg-stable
diff rust/rhg/src/commands/files.rs @ 45952: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 | 2f8227a12592 |
children | 904647f7d983 |
line wrap: on
line diff
--- a/rust/rhg/src/commands/files.rs Tue Oct 06 03:25:15 2020 +0200 +++ b/rust/rhg/src/commands/files.rs Tue Nov 24 18:52:38 2020 +0100 @@ -11,6 +11,7 @@ ListRevTrackedFiles, ListRevTrackedFilesError, ListRevTrackedFilesErrorKind, }; +use hg::requirements; use hg::utils::files::{get_bytes_from_path, relativize_path}; use hg::utils::hg_path::{HgPath, HgPathBuf}; use std::path::PathBuf; @@ -57,6 +58,7 @@ impl<'a> Command for FilesCommand<'a> { fn run(&self, ui: &Ui) -> Result<(), CommandError> { let root = FindRoot::new().run()?; + requirements::check(&root)?; if let Some(rev) = self.rev { let mut operation = ListRevTrackedFiles::new(&root, rev) .map_err(|e| map_rev_error(rev, e))?;