jj/Cargo.toml
Martin von Zweigbergk b820eddde3 commands: add an interactive mode for jj restore
This adds an interactive mode for `jj restore`. It works by first
creating two temporary directories with the contents of the subset of
files that differ between the two trees, and then letting the user
edit the directory representing the right/after side. This has some
advantages compared to the interactive modes in Git and Mercurial:

 * It lets the user edit the final state as opposed to the diff itself
   (depending on the diff tool, of course). I think most users find it
   easier to edit the file contents than to edit the patch
   format.

 * It delegates the hard work to a tool that is already written (this
   is a big advantage for an immature tool like Jujube, but it is not
   an advantage from the user's point of view).

Almost all of the work in this commit went into adding a function that
takes two trees, lets the user edit the diff, and returns a new tree
id. I plan to reuse that function for other interactive commands. One
planned command is `jj edit`, which will let the user edit the changes
in a commit. `jj edit -r abc123` will be mostly about providing a more
intuitive name for `jj restore --source abc123^ --destination abc123`,
plus it will be different for merge commits (it will edit only the
changes in the merge commit). I also plan to add `jj split` by letting
the user edit the full diff, leaving only the parts that should go
into the first commit. Perhaps there will also be commands for moving
part of a commit out of or into a parent commit.
2020-12-26 01:16:19 -08:00

38 lines
695 B
TOML

[workspace]
members = ["lib"]
[package]
name = "jj"
version = "0.1.0"
authors = ["Martin von Zweigbergk <martinvonz@google.com>"]
edition = "2018"
[dependencies.jj-lib]
path = "lib"
[dependencies]
blake2 = "0.9.1"
bytes = "1.0.0"
chrono = "0.4.19"
clap = "2.33.3"
config = "0.10.1"
criterion = "0.3.3"
diff = "0.1.12"
dirs = "3.0.1"
git2 = "0.13.14"
hex = "0.4.2"
indoc = "1.0.3"
pest = "2.1.3"
pest_derive = "2.1.0"
protobuf = { version = "2.18.1", features = ["with-bytes"] }
protobuf-codegen-pure = "2.18.1"
serde_json = "1.0.60"
tempfile = "3.1.0"
thiserror = "1.0.22"
uuid = { version = "0.8.1", features = ["v4"] }
zstd = "0.6.0"
[dev-dependencies]
test-case = "1.0.0"
regex = "1.4.2"