ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib/src
Martin von Zweigbergk 006c764694 backend: learn to store tree-level conflicts
Tree-level conflicts (#1624) will be stored as multiple trees
associated with a single commit. This patch adds support for that in
`backend::Commit` and in the backends.

When the Git backend writes a tree conflict, it creates a special root
tree for the commit. That tree has only the individual trees from the
conflict as subtrees. That way we prevent the trees from getting
GC'd. We also write the tree ids to the extra metadata table
(i.e. outside of the Git repo) so we don't need to load the tree
object to determine if there are conflicts.

I also added new flag to `backend::Commit` indicating whether the
commit is a new-style commit (with support for tree-level
conflicts). That will help with the migration. We will remove it once
we no longer care about old repos. When the flag is set, we know that
a commit with a single tree cannot have conflicts. When the flag is
not set, it's an old-style commit where we have to walk the whole tree
to find conflicts.
2023-07-19 22:04:16 -07:00
..
lock docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
protos backend: learn to store tree-level conflicts 2023-07-19 22:04:16 -07:00
backend.rs backend: learn to store tree-level conflicts 2023-07-19 22:04:16 -07:00
commit.rs backend: learn to store tree-level conflicts 2023-07-19 22:04:16 -07:00
commit_builder.rs backend: learn to store tree-level conflicts 2023-07-19 22:04:16 -07:00
conflicts.rs backend: learn to store tree-level conflicts 2023-07-19 22:04:16 -07:00
content_hash.rs
dag_walk.rs cleanup: use let-else now that we're on Rust 1.65+ 2023-07-18 09:50:22 +01:00
default_index_store.rs refactor(jj-lib): remove nightly_shims gunk 2023-07-17 18:38:26 -05:00
default_revset_engine.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
default_revset_graph_iterator.rs refactor(jj-lib): remove nightly_shims gunk 2023-07-17 18:38:26 -05:00
default_submodule_store.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
diff.rs refactor(jj-lib): remove nightly_shims gunk 2023-07-17 18:38:26 -05:00
file_util.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
files.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
fsmonitor.rs feat(fsmonitor): Watchman filesystem monitor implementation 2023-07-08 18:48:14 +03:00
git.rs view: replace .git_refs().get(name) with .get_git_ref(name) 2023-07-19 08:27:42 +09:00
git_backend.rs backend: learn to store tree-level conflicts 2023-07-19 22:04:16 -07:00
gitignore.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
hex_util.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
id_prefix.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
index.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
lib.rs merged_tree: introduce a type for a set of trees to merge on the fly 2023-07-19 22:04:16 -07:00
local_backend.rs backend: learn to store tree-level conflicts 2023-07-19 22:04:16 -07:00
lock.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
matchers.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
merge.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
merged_tree.rs merged_tree: add an iterator over conflicts 2023-07-19 22:04:16 -07:00
op_heads_store.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
op_store.rs refs: reimplement RefTarget as Conflict<Option<CommitId>> wrapper 2023-07-18 18:12:09 +09:00
operation.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
refs.rs refs: reimplement RefTarget as Conflict<Option<CommitId>> wrapper 2023-07-18 18:12:09 +09:00
repo.rs view: replace .branches().get(name) with .get_branch(name) 2023-07-19 08:27:42 +09:00
repo_path.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
revset.pest revset: ignore all ascii whitespace characters 2023-03-04 00:01:54 +09:00
revset.rs view: replace .git_refs().get(name) with .get_git_ref(name) 2023-07-19 08:27:42 +09:00
rewrite.rs refs: reimplement RefTarget as Conflict<Option<CommitId>> wrapper 2023-07-18 18:12:09 +09:00
settings.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
simple_op_heads_store.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
simple_op_store.rs refs: reimplement RefTarget as Conflict<Option<CommitId>> wrapper 2023-07-18 18:12:09 +09:00
stacked_table.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
store.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
submodule_store.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
transaction.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
tree.rs merged_tree: add a function for resolving conflicts 2023-07-19 22:04:16 -07:00
tree_builder.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
view.rs view: return RefTarget by reference, clone() by caller 2023-07-19 08:27:42 +09:00
working_copy.rs working_copy: return Result from WorkingCopy::tree_state/WorkingCopy::tree_state_mut 2023-07-14 13:45:40 -07:00
workspace.rs working_copy: create and propagate TreeStateError 2023-07-14 13:03:57 -07:00