diff options
Diffstat (limited to 'crates/mozart-vcs/src/util/hg.rs')
| -rw-r--r-- | crates/mozart-vcs/src/util/hg.rs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/crates/mozart-vcs/src/util/hg.rs b/crates/mozart-vcs/src/util/hg.rs deleted file mode 100644 index 7f5abcc..0000000 --- a/crates/mozart-vcs/src/util/hg.rs +++ /dev/null @@ -1,30 +0,0 @@ -use std::path::Path; - -use anyhow::Result; - -use crate::process::{ProcessExecutor, ProcessOutput}; - -/// Mercurial utility for command execution. -pub struct HgUtil { - process: ProcessExecutor, -} - -impl HgUtil { - pub fn new(process: ProcessExecutor) -> Self { - Self { process } - } - - /// Execute a Mercurial command. - pub fn execute(&self, args: &[&str], cwd: Option<&Path>) -> Result<ProcessOutput> { - let mut full_args = vec!["hg"]; - full_args.extend_from_slice(args); - self.process.execute_checked(&full_args, cwd) - } - - /// Execute a Mercurial command, not erroring on non-zero exit. - pub fn execute_unchecked(&self, args: &[&str], cwd: Option<&Path>) -> Result<ProcessOutput> { - let mut full_args = vec!["hg"]; - full_args.extend_from_slice(args); - self.process.execute(&full_args, cwd) - } -} |
