aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util/hg.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-20 02:47:21 +0900
committernsfisis <nsfisis@gmail.com>2026-06-20 02:47:21 +0900
commitf5005fccce818e5d2f33612a4cda90aad7469261 (patch)
tree02568beda0bd8d6e6dcb45f9625c13736ecb5909 /crates/shirabe/src/util/hg.rs
parent98af76dbe2815c95d15c20e0f911c4a420b6d848 (diff)
downloadphp-shirabe-f5005fccce818e5d2f33612a4cda90aad7469261.tar.gz
php-shirabe-f5005fccce818e5d2f33612a4cda90aad7469261.tar.zst
php-shirabe-f5005fccce818e5d2f33612a4cda90aad7469261.zip
feat(hg): implement Hg::new constructor
Take config and process as shared Rc<RefCell<..>> handles matching the struct fields and Util\Git's constructor, assigning them directly. PHP stores the same Config object reference, so sharing the Rc is faithful; update the three call sites to pass cloned handles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/util/hg.rs')
-rw-r--r--crates/shirabe/src/util/hg.rs10
1 files changed, 7 insertions, 3 deletions
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(