jj/lib/tests
Ilya Grigoriev d439de073d rewrite.rs: revert commits cfcc7c5e and becbc889
This mostly reverts https://github.com/martinvonz/jj/pull/2901 as well as its
fixup https://github.com/martinvonz/jj/pull/2903. The related bug is reopened,
see https://github.com/martinvonz/jj/issues/2869#issuecomment-1920367932.

The problem is that while the fix did fix #2869 in most cases, it did
reintroduce the more severe bug https://github.com/martinvonz/jj/issues/2760
in one case, if the working copy is the commit being rebased.

For example, suppose you have the tree

```
root -> A -> B -> @ (empty) -> C
```

### Before this commit

#### Case 1

`jj rebase -s B -d root --skip-empty` would work perfectly before this
commit, resulting in

```
root -> A
  \-------B -> C
           \- @ (new, empty)
```

#### Case 2

Unfortunately, if you run `jj rebase -s @ -d A --skip-empty`, you'd have the
following result (before this commit), which shows the reintroduction of #2760:

```
root -> A @ -> C
         \-- B
```

with the working copy at `A`. The reason for this is explained in
https://github.com/martinvonz/jj/pull/2901#issuecomment-1920043560.

### After this commit

After this commit, both case 1 and case 2 will be wrong in the sense of #2869,
but it will no longer exhibit the worse bug #2760 in the second case.

Case 1 would result in:

```
root -> A
  \-------B -> @ (empty) -> C
```

Case 2 would result in:

```
root -> A -> @ -> C
         \-- B
```

with the working copy remaining a descendant of A
2024-02-03 15:56:44 -08:00
..
test_bad_locking.rs
test_commit_builder.rs
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: test materialization with with negative snapshots 2024-01-23 07:18:54 -08:00
test_default_revset_graph_iterator.rs
test_diff_summary.rs
test_git.rs git: extract Git HEAD handling bits from import_some_refs() 2024-01-27 00:01:59 +09:00
test_git_backend.rs git_backend: on gc(), remove unreachable no-gc refs and compact them 2024-01-27 10:18:11 +09:00
test_id_prefix.rs
test_index.rs index: fix reindexing to scan all referenced commits such as hidden remote refs 2024-01-12 12:53:16 +09:00
test_init.rs
test_load_repo.rs
test_local_working_copy.rs working_copy: don't follow symlinks when visiting files in gitignored directory 2024-01-24 16:38:48 +09:00
test_local_working_copy_concurrent.rs
test_local_working_copy_sparse.rs
test_merge_trees.rs
test_merged_tree.rs
test_mut_repo.rs view: drop tracking of public heads 2024-01-13 22:23:57 -08:00
test_operations.rs op_store: add special case for root id resolution 2024-01-16 21:46:54 +09:00
test_refs.rs
test_revset.rs
test_rewrite.rs rewrite.rs: revert commits cfcc7c5e and becbc889 2024-02-03 15:56:44 -08:00
test_signing.rs
test_view.rs view: drop tracking of public heads 2024-01-13 22:23:57 -08:00
test_workspace.rs workspace: combine working copy functions into a trait 2024-01-25 11:46:07 -08:00