aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--crates/shirabe/src/downloader/hg_downloader.rs8
-rw-r--r--crates/shirabe/src/repository/vcs/hg_driver.rs4
-rw-r--r--crates/shirabe/src/util/hg.rs10
3 files changed, 13 insertions, 9 deletions
diff --git a/crates/shirabe/src/downloader/hg_downloader.rs b/crates/shirabe/src/downloader/hg_downloader.rs
index 59a4473..16a78a0 100644
--- a/crates/shirabe/src/downloader/hg_downloader.rs
+++ b/crates/shirabe/src/downloader/hg_downloader.rs
@@ -85,8 +85,8 @@ impl VcsDownloader for HgDownloader {
) -> Result<Option<PhpMixed>> {
let hg_utils = HgUtils::new(
self.inner.io.clone(),
- &self.inner.config.borrow(),
- &self.inner.process,
+ self.inner.config.clone(),
+ self.inner.process.clone(),
);
let path_clone = path.to_string();
@@ -140,8 +140,8 @@ impl VcsDownloader for HgDownloader {
) -> Result<Option<PhpMixed>> {
let hg_utils = HgUtils::new(
self.inner.io.clone(),
- &self.inner.config.borrow(),
- &self.inner.process,
+ self.inner.config.clone(),
+ self.inner.process.clone(),
);
let ref_ = target
diff --git a/crates/shirabe/src/repository/vcs/hg_driver.rs b/crates/shirabe/src/repository/vcs/hg_driver.rs
index 4a6188e..737443c 100644
--- a/crates/shirabe/src/repository/vcs/hg_driver.rs
+++ b/crates/shirabe/src/repository/vcs/hg_driver.rs
@@ -85,8 +85,8 @@ impl HgDriver {
let hg_utils = HgUtils::new(
self.inner.io.clone(),
- &self.inner.config.borrow(),
- &self.inner.process,
+ self.inner.config.clone(),
+ self.inner.process.clone(),
);
if is_dir(&self.repo_dir)
diff --git a/crates/shirabe/src/util/hg.rs b/crates/shirabe/src/util/hg.rs
index d20cf16..7fbf125 100644
--- a/crates/shirabe/src/util/hg.rs
+++ b/crates/shirabe/src/util/hg.rs
@@ -22,10 +22,14 @@ pub struct Hg {
impl Hg {
pub fn new(
io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>>,
- config: &Config,
- process: &std::rc::Rc<std::cell::RefCell<ProcessExecutor>>,
+ config: std::rc::Rc<std::cell::RefCell<Config>>,
+ process: std::rc::Rc<std::cell::RefCell<ProcessExecutor>>,
) -> Self {
- todo!()
+ Self {
+ io,
+ config,
+ process,
+ }
}
pub fn run_command(