diff options
Diffstat (limited to 'crates/mozart-core/src/downloader/svn_downloader.rs')
| -rw-r--r-- | crates/mozart-core/src/downloader/svn_downloader.rs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/crates/mozart-core/src/downloader/svn_downloader.rs b/crates/mozart-core/src/downloader/svn_downloader.rs index c78f9b7..690a090 100644 --- a/crates/mozart-core/src/downloader/svn_downloader.rs +++ b/crates/mozart-core/src/downloader/svn_downloader.rs @@ -1,11 +1,11 @@ +use crate::downloader::{DownloaderInterface, VcsDownloader}; +use crate::vcs::process::ProcessExecutor; +use crate::vcs::util::svn::SvnUtil; use anyhow::Result; use regex::Regex; use std::path::Path; use std::sync::LazyLock; -use crate::downloader::VcsDownloader; -use crate::vcs::util::svn::SvnUtil; - /// Match any non-`X` status line (mirror of Composer's /// `{^ *[^X ] +}m`). Ignores externals (`X` prefix). static SVN_STATUS_RE: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"(?m)^ *[^X ] +").unwrap()); @@ -16,8 +16,10 @@ pub struct SvnDownloader { } impl SvnDownloader { - pub fn new(svn_util: SvnUtil) -> Self { - Self { svn_util } + pub fn new(process: ProcessExecutor) -> Self { + Self { + svn_util: SvnUtil::new(process), + } } } @@ -83,3 +85,9 @@ impl VcsDownloader for SvnDownloader { false } } + +impl DownloaderInterface for SvnDownloader { + fn as_vcs_downloader(&self) -> Option<&dyn VcsDownloader> { + Some(self) + } +} |
