rust/rhg/src/commands.rs
author Simon Sapin <simon.sapin@octobus.net>
Thu, 04 Feb 2021 13:17:55 +0100
changeset 46484 a6e4e4650bac
parent 45923 ead435aa5294
child 46500 184e46550dc8
permissions -rw-r--r--
rhg: Parse system and user configuration at program start ? and pass it around up to `Repo::find` Differential Revision: https://phab.mercurial-scm.org/D9962

pub mod cat;
pub mod debugdata;
pub mod debugrequirements;
pub mod files;
pub mod root;
use crate::error::CommandError;
use crate::ui::Ui;
use hg::config::Config;

/// The common trait for rhg commands
///
/// Normalize the interface of the commands provided by rhg
pub trait Command {
    fn run(&self, ui: &Ui, config: &Config) -> Result<(), CommandError>;
}