jj/lib/tests
Martin von Zweigbergk 044f23bc33 view: add support for ref-based branches and tags to model
I've finally decided to copy Git's branching model (issue #21), except
that I'm letting the name identify the branch across
remotes. Actually, now that I think about, that makes them more like
Mercurial's "bookmarks". Each branch will record the commit it points
to locally, as well as the commits it points to on each remote (as far
as the repo knows, of course). Those records are effectively the same
thing as Git's "remote-tracking branches"; the difference is that we
consider them the same branch. Consequently, when you pull a new
branch from a remote, we'll create that branch locally.

For example, if you pull branch "main" from a remote called "origin",
that will result in a local branch called "main", and also a record of
the position on the remote, which we'll show as "main@origin" in the
CLI (not part of this commit). If you then update the branch locally
and also pull a new target for it from "origin", the local "main"
branch will be divergent. I plan to make it so that pushing "main"
will update the remote's "main" iff it was currently at "main@origin"
(i.e. like using Git's `git push --force-with-lease`).

This commit adds a place to store information about branches in the
view model. The existing git_refs field will be used as input for the
branch information. For example, we can use it to tell if
"refs/heads/main" has changed and how it has changed. We will then use
that ref diff to update our own record of the "main" branch. That will
come later. In order to let git_refs take a back seat, I've also added
tags (like Git's lightweight tags) to the model in this commit.

I haven't ruled out *also* having some more persistent type of
branches (like Mercurials branches or topics).
2021-08-04 11:33:57 -07:00
..
test_bad_locking.rs RepoLoader: stop returning Result since the functions cannot currently fail 2021-05-19 14:12:54 -07:00
test_commit_builder.rs tree: support filtering diff by matcher 2021-06-09 16:26:58 -07:00
test_commit_concurrent.rs cleanup: let Clippy fix a bunch of warnings 2021-06-14 00:27:31 -07:00
test_diff_summary.rs cleanup: let Clippy fix a bunch of warnings 2021-06-14 00:27:31 -07:00
test_evolution.rs cleanup: add explicit import of assert_matches, as required by new rustc 2021-07-24 10:48:52 -07:00
test_git.rs view: add tests of merging views 2021-08-04 11:33:57 -07:00
test_index.rs cleanup: let Clippy fix a bunch of warnings 2021-06-14 00:27:31 -07:00
test_init.rs cleanup: commit transactions in tests when it's simpler 2021-07-30 17:47:00 -07:00
test_load_repo.rs cleanup: let Clippy fix a bunch of warnings 2021-06-14 00:27:31 -07:00
test_merge_trees.rs cleanup: let Clippy fix a bunch of warnings 2021-06-14 00:27:31 -07:00
test_mut_repo.rs view: rename insert_git_ref() to set_git_ref() 2021-08-04 08:45:37 -07:00
test_operations.rs RepoLoader: stop returning Result since the functions cannot currently fail 2021-05-19 14:12:54 -07:00
test_refs.rs view: add support for merging git ref targets 2021-07-24 19:01:56 -07:00
test_revset_graph_iterator.rs cleanup: commit transactions in tests when it's simpler 2021-07-30 17:47:00 -07:00
test_revset.rs view: rename insert_git_ref() to set_git_ref() 2021-08-04 08:45:37 -07:00
test_view.rs view: add support for ref-based branches and tags to model 2021-08-04 11:33:57 -07:00
test_working_copy_concurrent.rs repo_path: rename from() to from_internal_{,dir}_string() 2021-05-19 15:11:04 -07:00
test_working_copy.rs cleanup: let Clippy fix a bunch of warnings 2021-06-14 00:27:31 -07:00