ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib/tests
Martin von Zweigbergk 70073b94a8 repo: stop keeping a WorkingCopy instance
The `Repo` doesn't do anything with the `WorkingCopy` except keeping a
reference to it for its users to use. In fact, the entire lib crate
doesn't do antyhing with the `WorkingCopy`. It therefore seems simpler
to have the users of the crate manage the `WorkingCopy` instance. This
patch does that by letting `Workspace` own it. By not keeping an
instance in `Repo`, which is `Sync`, we can also drop the
`Arc<Mutex<>>` wrapping.

I left `Repo::working_copy()` for convenience for now, but now it
creates a new instance every time. It's only used in tests.

This further decoupling should help us add support for multiple
working copies (#13).
2021-11-25 21:04:56 -08:00
..
test_bad_locking.rs store: rename Store to Backend and StoreWrapper to Store 2021-09-12 12:02:10 -07:00
test_commit_builder.rs evolution: don't create pruned commits (#32) 2021-10-06 23:20:23 -07:00
test_commit_concurrent.rs store: rename Store to Backend and StoreWrapper to Store 2021-09-12 12:02:10 -07:00
test_conflicts.rs working_copy: preserve conflicts in the working copy until markers are removed 2021-11-07 15:17:51 -08:00
test_diff_summary.rs store: rename Store to Backend and StoreWrapper to Store 2021-09-12 12:02:10 -07:00
test_git.rs backend: make Vec inside CommitId non-public 2021-11-19 23:19:00 -08:00
test_index.rs tests: avoid accessing working copy just to get its commit ID 2021-11-17 12:45:18 -08:00
test_init.rs tests: avoid accessing working copy just to get its commit ID 2021-11-17 12:45:18 -08:00
test_load_repo.rs MutableRepo: accept just CommitId instead of whole Commit where possible 2021-09-29 10:13:32 -07:00
test_merge_trees.rs cleanup: replace some as_slice() by & 2021-11-10 10:55:58 -08:00
test_mut_repo.rs repo: don't materialize conflicts on checkout 2021-11-07 15:17:51 -08:00
test_operations.rs tests: avoid accessing working copy just to get its commit ID 2021-11-17 12:45:18 -08:00
test_refs.rs tests: use CommitGraphBuilder in test_refs.rs 2021-08-18 09:58:44 -07:00
test_revset.rs backend: make Vec inside CommitId non-public 2021-11-19 23:19:00 -08:00
test_revset_graph_iterator.rs revset graph: make order of edges stable 2021-10-23 20:33:59 -07:00
test_rewrite.rs view: don't force commits pointed to by refs to be current heads 2021-10-23 09:15:05 -07:00
test_view.rs tests: avoid accessing working copy just to get its commit ID 2021-11-17 12:45:18 -08:00
test_working_copy.rs repo: stop keeping a WorkingCopy instance 2021-11-25 21:04:56 -08:00
test_working_copy_concurrent.rs repo: stop keeping a WorkingCopy instance 2021-11-25 21:04:56 -08:00