Mercurial > hg
diff rust/chg/src/main.rs @ 44681:00ac60658654
rust-chg: collect server flags from command arguments
This is the reimplementation of testsensitiveflag() and setcmdserverargs()
of chg.c.
Differential Revision: https://phab.mercurial-scm.org/D8380
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 07 Oct 2018 16:46:30 +0900 |
parents | 0a2516efc463 |
children | 065048e66f32 |
line wrap: on
line diff
--- a/rust/chg/src/main.rs Sun Oct 07 15:36:34 2018 +0900 +++ b/rust/chg/src/main.rs Sun Oct 07 16:46:30 2018 +0900 @@ -9,7 +9,7 @@ extern crate tokio; extern crate tokio_hglib; -use chg::locator::Locator; +use chg::locator::{self, Locator}; use chg::procutil; use chg::{ChgClientExt, ChgUiHandler}; use futures::sync::oneshot; @@ -73,7 +73,8 @@ } fn run() -> io::Result<i32> { - let loc = Locator::prepare_from_env()?; + let mut loc = Locator::prepare_from_env()?; + loc.set_early_args(locator::collect_early_args(env::args_os().skip(1))); let handler = ChgUiHandler::new(); let (result_tx, result_rx) = oneshot::channel(); let fut = loc