ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib/tests
Martin von Zweigbergk 38180555de working_copy: keep track of operation ID (#13)
When there are concurrent operations that want to update the working
copy, it's useful to know which operation was the last to successfully
update the working copy. That can help use decide how to resolve a
mismatch between the repo view's record and the working copy's
record. If we detect such a difference, we can look at the working
copy's operation ID to see if it was updated by an operation before or
after we loaded the repo.

If the working copy's record says that it was updated at operation A
and we have loaded the repo at operation B (after A), we know that the
working copy is stale, so we can automatically update it (or tell the
user to run some command to update it if we think that's more
user-friendly).

Conversely, if we have loaded the repo at operation A and the working
copy's record says that it was updated at operation B, we know that
there was some concurrent operation that updated it. We can then
decide to print a warning telling the user that we skipped updating
because of the conflict. We already have logic for not updating the
working copy if the repo is loaded at an earlier operation, but maybe
we can drop that if we record the operation in the working copy (as
this patch does).
2022-01-19 19:15:29 -08:00
..
test_bad_locking.rs workspace: move search for .jj/ directory from Repo to Workspace 2021-11-25 21:08:43 -08:00
test_commit_builder.rs transaction: remove Drop implementation 2021-12-01 10:31:35 -08:00
test_commit_concurrent.rs workspace: move search for .jj/ directory from Repo to Workspace 2021-11-25 21:08:43 -08:00
test_conflicts.rs
test_diff_summary.rs
test_git.rs git: on import, only add ref target as head if target changed (#44) 2021-12-11 11:03:40 -08:00
test_index.rs transaction: remove Drop implementation 2021-12-01 10:31:35 -08:00
test_init.rs transaction: remove Drop implementation 2021-12-01 10:31:35 -08:00
test_load_repo.rs workspace: move search for .jj/ directory from Repo to Workspace 2021-11-25 21:08:43 -08:00
test_merge_trees.rs
test_mut_repo.rs repo: don't use stale view when checking for changes 2021-12-05 22:01:48 -08:00
test_operations.rs
test_refs.rs
test_revset.rs revsets: add author() and committer() functions (#46) 2021-12-15 22:50:29 -08:00
test_revset_graph_iterator.rs
test_rewrite.rs transaction: remove Drop implementation 2021-12-01 10:31:35 -08:00
test_view.rs
test_working_copy.rs working_copy: keep track of operation ID (#13) 2022-01-19 19:15:29 -08:00
test_working_copy_concurrent.rs working_copy: keep track of operation ID (#13) 2022-01-19 19:15:29 -08:00
test_workspace.rs workspace: move search for .jj/ directory from Repo to Workspace 2021-11-25 21:08:43 -08:00