Commit graph

13 commits

Author SHA1 Message Date
Ilya Grigoriev
fc9795e902 jj resolve --list: make output colorful
The description is usually in yellow, which looks nice and neutral. If the
conflict has more than 2 sides or has special files, that's marked in red.
2023-01-07 15:29:19 -08:00
Ilya Grigoriev
89de9aeae1 jj resolve --list: Replace separator with \t
The `:` was a bit noisy. With upcoming color support, it seems unnecessary.

This should also be a little better for any tools that want to parse the
output.

Finally, `insta` also seems to want to rewrite test snapshots to be shorter.
They seem equivalent.
2023-01-07 15:29:19 -08:00
Ilya Grigoriev
621293d7c6 jj resolve --list: Add descriptions of conflict complexity
The descriptions focus on adds, not the deletions. The deletions are used
to compute the number of deleted files that must be sides of the conflict.
2023-01-05 10:59:14 -08:00
Ilya Grigoriev
5ecac4fc44 jj resolve: List remaining conflicts (if any) on success
This can be prevented by the new `--quiet` option.
2023-01-04 21:48:33 -08:00
Ilya Grigoriev
b8ba78b996 Extract resolve_list from cmd_resolve, tests, minor refactoring
This is all in preparation for follow-up commit, which will change
some of the new tests. The extracted function will be further expanded
later.
2023-01-04 21:48:33 -08:00
Yuya Nishihara
5076622598 tests: use insta to test editor contents
It's tedious to update editor expectation manually. Let's dump the actual
content and test it after each command invocation.
2022-12-23 00:47:22 +09:00
Ilya Grigoriev
9e334de7d6 Remove insta::assert_snapshot that causes a failure with insta 1.22 2022-12-05 22:29:05 -08:00
Ilya Grigoriev
e9952bcf76 Minimal version of resolve --list
Simply lists conflicted files
2022-12-04 22:58:12 -08:00
Ilya Grigoriev
ea1395ad95 Make optional the path argument to resolve, allow partial paths
Also allows several paths to be specified. By default, `jj resolve`
will find the first conflict that matches provided paths (if any)
and try to resolve it.
2022-12-04 22:39:45 -08:00
Ilya Grigoriev
b58be8d7a4 Mention path in message for ConflictResolveError::NotNormalFilesError. 2022-12-04 22:39:45 -08:00
Martin von Zweigbergk
48c44344bf cli: make jj status not just care about the first parent
It seems like I forgot to update the `jj status` output when I decided
(years ago?) that the changes in a commit should always be compared to
the auto-merged parents. I was very confused before I realized that
`jj status` was showing the diff summary against the first parent. I
suppose the fact that `jj status` lists only one parent should have
been a hint. Thanks to ilyagr@ for finding this odd behavior. This
patch fixes it by making the command list all parents, and changes the
diff summary to be against the auto-merged parents.
2022-12-04 22:29:12 -08:00
Ilya Grigoriev
d6c1b0bc9c jj resolve: option to parse conflict markers + tests
If this new option is not specified, we start with empty output
file and trust the merge tool did a complete merge no matter
what the file contains.

Includes tests.
2022-12-03 15:12:40 -08:00
Ilya Grigoriev
3e86baa7f1 Test basic jj resolve functionality 2022-12-03 15:12:40 -08:00