Read about our upcoming Code of Conduct on this issue

Commit e75347f7 authored by Antoine Cezar's avatar Antoine Cezar
Browse files

hg-core: add Operation interface for high-level hg operations

A distinction is made between operations and commands.
An operation is a high-level function of mercurial whereas a command is what is exposed by the cli.
A single command can use several operations to achieve its goal.

Differential Revision: https://phab.mercurial-scm.org/D8608
parent 26114bd6ec60
Pipeline #7013 failed with stage
in 24 minutes and 27 seconds
......@@ -23,6 +23,7 @@ mod filepatterns;
pub mod matchers;
pub mod revlog;
pub use revlog::*;
pub mod operations;
pub mod utils;
// Remove this to see (potential) non-artificial compile failures. MacOS
......
/// An interface for high-level hg operations.
///
/// A distinction is made between operation and commands.
/// An operation is what can be done whereas a command is what is exposed by
/// the cli. A single command can use several operations to achieve its goal.
pub trait Operation<T> {
type Error;
fn run(&self) -> Result<T, Self::Error>;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment