ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib/tests
Yuya Nishihara a697175674 view: add tracking state to RemoteRef
The state field isn't saved yet. git import/export code paths are migrated,
but new tracking state is always calculated based on git.auto-local-branch
setting. So the tracking state is effectively a global flag.

As we don't know whether the existing remote branches have been merged in to
local branches, we assume that remote branches are "tracking" so long as the
local counterparts exist. This means existing locally-deleted branch won't
be pushed without re-tracking it. I think it's rare to leave locally-deleted
branches for long. For "git.auto-local-branch = false" setup, users might have
to untrack branches if they've manually "merged" remote branches and want to
continue that workflow. I considered using git.auto-local-branch setting in the
migration path, but I don't think that would give a better result. The setting
may be toggled after the branches got merged, and I'm planning to change it
default off for better Git interop.

Implementation-wise, the state enum can be a simple bool. It's enum just
because I originally considered to pack "forgotten" concept into it. I have
no idea which will be better for future extension.
2023-10-16 23:21:05 +09:00
..
test_bad_locking.rs testutils: delete bool-typed init() in favor of enum-typed version 2023-09-18 07:15:37 -07:00
test_commit_builder.rs testutils: delete bool-typed init() in favor of enum-typed version 2023-09-18 07:15:37 -07:00
test_commit_concurrent.rs testutils: delete bool-typed init() in favor of enum-typed version 2023-09-18 07:15:37 -07:00
test_conflicts.rs tests: wherever we test with only one backend, use the test backend 2023-09-19 20:49:41 -07:00
test_default_revset_graph_iterator.rs test: use test backend in most remaining tests too 2023-09-24 21:24:01 -07:00
test_diff_summary.rs test: use test backend in most remaining tests too 2023-09-24 21:24:01 -07:00
test_git.rs view: add tracking state to RemoteRef 2023-10-16 23:21:05 +09:00
test_id_prefix.rs testutils: delete bool-typed init() in favor of enum-typed version 2023-09-18 07:15:37 -07:00
test_index.rs test: use test backend in most remaining tests too 2023-09-24 21:24:01 -07:00
test_init.rs testutils: delete bool-typed init() in favor of enum-typed version 2023-09-18 07:15:37 -07:00
test_load_repo.rs test: use test backend in most remaining tests too 2023-09-24 21:24:01 -07:00
test_local_working_copy.rs working copy: return Box<dyn LockedWorkingCopy> from start_mutation() 2023-10-15 16:13:19 -07:00
test_local_working_copy_concurrent.rs working copy: return Box<dyn LockedWorkingCopy> from start_mutation() 2023-10-15 16:13:19 -07:00
test_local_working_copy_sparse.rs working copy: return Box<dyn LockedWorkingCopy> from start_mutation() 2023-10-15 16:13:19 -07:00
test_merge_trees.rs test: use test backend in most remaining tests too 2023-09-24 21:24:01 -07:00
test_merged_tree.rs tree: simplify conflict before resolving at hunk level 2023-09-27 22:14:39 -07:00
test_mut_repo.rs view: add tracking state to RemoteRef 2023-10-16 23:21:05 +09:00
test_operations.rs tests: test views, operations, and mutable repos only with test backend 2023-09-20 07:47:30 -07:00
test_refs.rs tests: wherever we test with only one backend, use the test backend 2023-09-19 20:49:41 -07:00
test_revset.rs view: add tracking state to RemoteRef 2023-10-16 23:21:05 +09:00
test_rewrite.rs view: add tracking state to RemoteRef 2023-10-16 23:21:05 +09:00
test_view.rs view: add tracking state to RemoteRef 2023-10-16 23:21:05 +09:00
test_workspace.rs test: use test backend in most remaining tests too 2023-09-24 21:24:01 -07:00