ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib/tests
Ilya Grigoriev 70b517ca64 conflicts.rs: label conflict number and sides next to conflict markers
For example, 

```
<<<<<<< Conflict 1 of 3
+++++++ Contents of side #1
left 3.1
left 3.2
left 3.3
%%%%%%% Changes from base to side #2
-line 3
+right 3.1
>>>>>>>
```

or

```
<<<<<<< Conflict 1 of 1
%%%%%%% Changes from base to side #1
-line 3
+right 3.1
+++++++ Contents of side #2
left 3.1
left 3.2
left 3.3
>>>>>>>
```

Currently, there is no way to disable these, this is TODO for a future
PR. Other TODOs for future PRs: make these labels configurable. After
that, we could support a `diff3/git`-like conflict format as well, in
principle.

Counting conflicts helps with knowing whether you fixed all the
conflicts while you are in the editor.

While labeling "side #1", etc, does not tell you the commit id or
description as requested in #1176, I still think it's an improvement.
Most importantly, I hope this will make `jj`'s conflict format less
scary-looking for new users.

I've used this for a bit, and I like it. Without the labels, I would see
that the two conflicts have a different order of conflict markers, but I
wouldn't be able to remember what that means. For longer diffs, it can
be tricky for me to quickly tell that it's a diff as opposed to one of
the sides. This also creates some hope of being able to navigate a
conflict with more than 2 sides.

Another not-so-secret goal for this is explained in
https://github.com/martinvonz/jj/pull/3109#issuecomment-2014140627. The
idea is a little weird, but I *think* it could be helpful, and I'd like
to experiment with it.
2024-05-05 18:42:14 -07:00
..
runner.rs repo: add method for tranforming descendants, use in rebase_descendants() 2024-04-18 21:06:52 -07:00
test_bad_locking.rs transaction: take description at end instead of start 2023-12-13 08:12:49 -08:00
test_commit_builder.rs object_id: make ObjectId constructors non-trait methods 2024-01-05 23:36:57 +09:00
test_commit_concurrent.rs op_store: add a virtual root operation, similar to root commit 2024-01-14 10:15:14 -08:00
test_conflicts.rs conflicts.rs: label conflict number and sides next to conflict markers 2024-05-05 18:42:14 -07:00
test_default_revset_graph_iterator.rs index: reorganize revset_graph_iterator as private module of default_index 2024-03-14 10:07:19 +09:00
test_diff_summary.rs
test_git.rs git: on fetch, pin visible untracked remote refs 2024-04-14 11:38:21 +09:00
test_git_backend.rs tests: compare git refs loaded from disk, not in-memory cache values 2024-04-22 18:46:28 +09:00
test_gpg.rs gpg_signing: handle early termination of gpg command in verify path 2024-03-03 18:35:10 +09:00
test_id_prefix.rs object_id: move HexPrefix and PrefixResolution from index module 2024-01-05 10:20:57 +09:00
test_index.rs index: turn CompositeIndex into transparent reference type 2024-03-11 17:24:10 +09:00
test_init.rs transaction: take description at end instead of start 2023-12-13 08:12:49 -08:00
test_load_repo.rs transaction: take description at end instead of start 2023-12-13 08:12:49 -08:00
test_local_working_copy.rs merged_tree: propagate errors from TreeEntriesIterator 2024-05-01 06:10:08 -07:00
test_local_working_copy_concurrent.rs
test_local_working_copy_sparse.rs working_copy: use proto file states without rebuilding BTreeMap 2023-11-30 12:09:31 +09:00
test_merge_trees.rs rewrite: pass just IDs of new parents into rewrite::rebase*() 2024-04-17 06:13:54 -07:00
test_merged_tree.rs merged_tree: propagate errors from TreeEntriesIterator 2024-05-01 06:10:08 -07:00
test_mut_repo.rs repo: delete record_rewritten_commit() 2024-03-25 06:53:14 -07:00
test_operations.rs operation: add shorthand for .store_operation().metadata 2024-02-25 09:00:56 +09:00
test_refs.rs transaction: take description at end instead of start 2023-12-13 08:12:49 -08:00
test_revset.rs revset: add a SymbolResolverExtension trait to provide custom resolvers 2024-04-26 10:55:34 -04:00
test_rewrite.rs rewrite: pass CommitRewriter into rebase_commit_with_options() 2024-04-18 08:08:51 -07:00
test_rewrite_transform.rs rewrite: add CommitRewriter::record_abandoned_commit() 2024-04-30 20:03:57 -07:00
test_signing.rs transaction: take description at end instead of start 2023-12-13 08:12:49 -08:00
test_ssh_signing.rs sign: Add SSH backend tests 2024-02-20 00:02:08 +00:00
test_view.rs view: drop tracking of public heads 2024-01-13 22:23:57 -08:00
test_workspace.rs working_copy: add Send supertrait 2024-02-17 15:13:25 +08:00