2023-08-04 22:59:19 +00:00
|
|
|
[package]
|
|
|
|
name = "jj-cli"
|
2023-08-05 22:14:11 +00:00
|
|
|
description = "Jujutsu - an experimental version control system"
|
2023-08-04 22:59:19 +00:00
|
|
|
default-run = "jj"
|
2024-02-02 07:55:24 +00:00
|
|
|
autotests = false
|
2023-08-04 22:59:19 +00:00
|
|
|
|
2023-08-22 16:41:42 +00:00
|
|
|
version = { workspace = true }
|
|
|
|
edition = { workspace = true }
|
|
|
|
rust-version = { workspace = true }
|
|
|
|
license = { workspace = true }
|
|
|
|
homepage = { workspace = true }
|
|
|
|
repository = { workspace = true }
|
|
|
|
documentation = { workspace = true }
|
|
|
|
keywords = { workspace = true }
|
2023-08-05 22:14:11 +00:00
|
|
|
|
2023-08-04 22:59:19 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "jj"
|
|
|
|
path = "src/main.rs"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "fake-editor"
|
|
|
|
path = "testing/fake-editor.rs"
|
2023-09-20 05:30:34 +00:00
|
|
|
required-features = ["test-fakes"]
|
2023-08-04 22:59:19 +00:00
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "fake-diff-editor"
|
|
|
|
path = "testing/fake-diff-editor.rs"
|
2023-09-20 05:30:34 +00:00
|
|
|
required-features = ["test-fakes"]
|
2023-08-04 22:59:19 +00:00
|
|
|
|
2024-02-02 07:55:24 +00:00
|
|
|
[[test]]
|
|
|
|
name = "runner"
|
|
|
|
|
2023-08-04 22:59:19 +00:00
|
|
|
[build-dependencies]
|
2023-08-22 16:41:42 +00:00
|
|
|
cargo_metadata = { workspace = true }
|
2023-08-04 22:59:19 +00:00
|
|
|
|
|
|
|
[dependencies]
|
2023-08-22 16:41:42 +00:00
|
|
|
chrono = { workspace = true }
|
|
|
|
clap = { workspace = true }
|
2024-01-26 02:35:28 +00:00
|
|
|
clap-markdown = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
clap_complete = { workspace = true }
|
2024-02-16 20:23:41 +00:00
|
|
|
clap_complete_nushell = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
clap_mangen = { workspace = true }
|
|
|
|
config = { workspace = true }
|
2023-08-05 16:14:11 +00:00
|
|
|
criterion = { workspace = true, optional = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
crossterm = { workspace = true }
|
|
|
|
dirs = { workspace = true }
|
|
|
|
esl01-renderdag = { workspace = true }
|
2023-10-18 23:57:19 +00:00
|
|
|
futures = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
git2 = { workspace = true }
|
2023-10-31 00:50:10 +00:00
|
|
|
gix = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
hex = { workspace = true }
|
|
|
|
indexmap = { workspace = true }
|
|
|
|
itertools = { workspace = true }
|
|
|
|
jj-lib = { workspace = true }
|
|
|
|
maplit = { workspace = true }
|
2024-02-11 02:55:02 +00:00
|
|
|
minus = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
once_cell = { workspace = true }
|
|
|
|
pest = { workspace = true }
|
|
|
|
pest_derive = { workspace = true }
|
2023-10-28 23:15:01 +00:00
|
|
|
pollster = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
regex = { workspace = true }
|
|
|
|
rpassword = { workspace = true }
|
2023-08-29 21:13:35 +00:00
|
|
|
scm-record = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
serde = { workspace = true }
|
|
|
|
slab = { workspace = true }
|
2024-02-26 05:49:46 +00:00
|
|
|
strsim = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
tempfile = { workspace = true }
|
|
|
|
textwrap = { workspace = true }
|
|
|
|
thiserror = { workspace = true }
|
|
|
|
timeago = { workspace = true }
|
|
|
|
toml_edit = { workspace = true }
|
|
|
|
tracing = { workspace = true }
|
|
|
|
tracing-chrome = { workspace = true }
|
|
|
|
tracing-subscriber = { workspace = true }
|
2023-08-31 07:42:42 +00:00
|
|
|
unicode-width = { workspace = true }
|
2023-08-04 22:59:19 +00:00
|
|
|
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
2023-08-22 16:41:42 +00:00
|
|
|
libc = { workspace = true }
|
2023-08-04 22:59:19 +00:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2023-08-22 16:41:42 +00:00
|
|
|
anyhow = { workspace = true }
|
|
|
|
assert_cmd = { workspace = true }
|
|
|
|
assert_matches = { workspace = true }
|
2023-11-07 07:15:31 +00:00
|
|
|
async-trait = { workspace = true }
|
2024-03-23 02:34:28 +00:00
|
|
|
indoc = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
insta = { workspace = true }
|
|
|
|
test-case = { workspace = true }
|
|
|
|
testutils = { workspace = true }
|
2023-09-20 05:30:34 +00:00
|
|
|
# https://github.com/rust-lang/cargo/issues/2911#issuecomment-1483256987
|
|
|
|
jj-cli = { path = ".", features = ["test-fakes"], default-features = false }
|
2023-08-04 22:59:19 +00:00
|
|
|
|
|
|
|
[features]
|
2023-09-07 16:09:59 +00:00
|
|
|
default = ["watchman"]
|
2023-09-07 16:19:33 +00:00
|
|
|
bench = ["dep:criterion"]
|
2023-09-07 16:09:59 +00:00
|
|
|
packaging = []
|
revset: add count_estimate() to Revset trait
The count() function in this trait is used by "jj branch" to determine
(and then report) how many commits a certain branch is ahead/behind
another branch. This is currently implemented by walking all commits
in the revset, counting how many were encountered. But this could be
improved: if the number is large, it is probably sufficient to report
"at least N" (instead of walking all the way), and this does not scale
well to jj backends that may not have all commits present locally (which
may prefer to return an estimate, rather than access the network).
Therefore, add a function that is explicitly documented to be O(1)
and that can return a range of values if the backend so chooses.
Also remove count(), as it is not immediately obvious that it is an
expensive call, and callers that are willing to pay the cost can obtain
the exact same functionality through iter().count() anyway. (In this
commit, all users of count() are migrated to iter().count() to preserve
all existing functionality; they will be migrated to count_estimate() in
a subsequent commit.)
"branch" needed to be updated due to this change. Although jj
is currently only available in English, I have attempted to keep
user-visible text from being assembled piece by piece, so that if we
later decide to translate jj into other languages, things will be easier
for translators.
2024-01-16 22:12:02 +00:00
|
|
|
test-fakes = ["jj-lib/testing"]
|
2023-08-04 22:59:19 +00:00
|
|
|
vendored-openssl = ["git2/vendored-openssl", "jj-lib/vendored-openssl"]
|
|
|
|
watchman = ["jj-lib/watchman"]
|
2023-09-20 05:54:42 +00:00
|
|
|
|
|
|
|
[package.metadata.binstall]
|
|
|
|
# The archive name is jj, not jj-cli. Also, `cargo binstall` gets
|
|
|
|
# confused by the `v` before versions in archive name.
|
2023-10-18 23:57:19 +00:00
|
|
|
pkg-url = "{ repo }/releases/download/v{ version }/jj-v{ version }-{ target }.{ archive-format }"
|