rust/chg/Cargo.toml
author Georges Racinet <georges.racinet@octobus.net>
Fri, 30 Nov 2018 20:05:34 +0100
changeset 41188 006c9ce486fa
parent 40287 7623199def92
child 44670 1c385b99a360
permissions -rw-r--r--
rust-cpython: bindings for MissingAncestors The exposition is rather straightforward, except for the remove_ancestors_from() method, which forces us to an inefficient conversion between Python sets and Rust HashSets. Two alternatives are proposed in comments: - changing the inner API to "emit" the revision numbers to discard this would be a substantial change, and it would be better only in the cases where there are more to retain than to discard - mutating the Python set directly: this would force us to define an abstract `RevisionSet` trait, and implement it both for plain `HashSet` and for a struct enclosing a Python set with the GIL marker `Python<'p>`, also a non trivial effort. The main (and seemingly only) caller of this method being `mercurial.setdiscovery`, which is currently undergoing serious refactoring, it's not clear whether these improvements would be worth the effort right now, so we're leaving it as-is. Also, in `get_bases()` (will also be used by `setdiscovery`), we'd prefer to build a Python set directly, but we resort to returning a tuple, waiting to hear back from our PR onto rust-cpython about that Differential Revision: https://phab.mercurial-scm.org/D5550
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39968
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
     1
[package]
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
     2
name = "chg"
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
     3
version = "0.1.0"
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
     4
authors = ["Yuya Nishihara <yuya@tcha.org>"]
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
     5
description = "Client for Mercurial command server with cHg extension"
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
     6
license = "GPL-2.0+"
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
     7
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
     8
[dependencies]
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
     9
bytes = "0.4"
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
    10
futures = "0.1"
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
    11
libc = "0.2"
40287
7623199def92 rust-chg: depend on log and tokio_timer
Yuya Nishihara <yuya@tcha.org>
parents: 39968
diff changeset
    12
log = { version = "0.4", features = ["std"] }
39968
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
    13
tokio = "0.1"
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
    14
tokio-hglib = "0.2"
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
    15
# TODO: "^0.2.3" once released. we need AsRawFd support.
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
    16
tokio-process = { git = "https://github.com/alexcrichton/tokio-process" }
40287
7623199def92 rust-chg: depend on log and tokio_timer
Yuya Nishihara <yuya@tcha.org>
parents: 39968
diff changeset
    17
tokio-timer = "0.2"
39968
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
    18
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
    19
[build-dependencies]
aab43d5861bb rust-chg: add project skeleton
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
    20
cc = "1.0"