jj/lib
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
..
protos protobuf: generate code at build-time 2020-12-24 01:05:17 -08:00
src commands: add an interactive mode for jj restore 2020-12-26 01:16:19 -08:00
tests evolution: fix it so pruned commits can be divergent 2020-12-23 18:01:01 -08:00
build.rs protobuf: generate code at build-time 2020-12-24 01:05:17 -08:00
Cargo.toml git_store: use exponential backoff when retrying note-writing 2020-12-24 23:22:07 -08:00