[PATCH 2 of 6] rust-chg: depend on log and tokio_timer

Yuya Nishihara yuya at tcha.org
Sun Oct 14 04:18:19 EDT 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1538824031 -32400
#      Sat Oct 06 20:07:11 2018 +0900
# Node ID b46cd0c69558e0aa92871f180d98a167bd108f97
# Parent  4a4f95df41de64fb472cb131d5ff4eeb8e846870
rust-chg: depend on log and tokio_timer

I'll start porting the daemon management functions from chg of C, which
will be difficult to debug without some logging facility. AFAIK, the log
crate is easy-to-use and widely used.

tokio_timer provides sleep() helper to be used while spawning a server
process.

diff --git a/rust/chg/Cargo.lock b/rust/chg/Cargo.lock
--- a/rust/chg/Cargo.lock
+++ b/rust/chg/Cargo.lock
@@ -43,9 +43,11 @@ dependencies = [
  "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-hglib 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-process 0.2.2 (git+https://github.com/alexcrichton/tokio-process)",
+ "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
diff --git a/rust/chg/Cargo.toml b/rust/chg/Cargo.toml
--- a/rust/chg/Cargo.toml
+++ b/rust/chg/Cargo.toml
@@ -9,10 +9,12 @@ license = "GPL-2.0+"
 bytes = "0.4"
 futures = "0.1"
 libc = "0.2"
+log = { version = "0.4", features = ["std"] }
 tokio = "0.1"
 tokio-hglib = "0.2"
 # TODO: "^0.2.3" once released. we need AsRawFd support.
 tokio-process = { git = "https://github.com/alexcrichton/tokio-process" }
+tokio-timer = "0.2"
 
 [build-dependencies]
 cc = "1.0"


More information about the Mercurial-devel mailing list