jj/tests
Yuya Nishihara fb33620f9e revset_graph: group commits topologically
The original idea was similar to Mercurial's "topo" sorting, but it was bad
at handling merge-heavy history. In order to render merges of topic branches
nicely, we need to prioritize branches at merge point, not at fork point.
OTOH, we do also want to place unmerged branches as close to the fork point
as possible. This commit implements the former requirement, and the latter
will be addressed by the next commit.

I think this is similar to Git's sorting logic described in the following blog
post. In our case, the in-degree walk can be dumb since topological order is
guaranteed by the index. We keep HashSet<CommitId> instead of an in-degree
integer value, which will be used in the next commit to resolve new heads as
late as possible.

https://github.blog/2022-08-30-gits-database-internals-ii-commit-history-queries/#topological-sorting

Compared to Sapling's beautify_graph(), this is lazy, and can roughly preserve
the index (or chronological) order. I tried beautify_graph() with prioritizing
the @ commit, but the result seemed too aggressively reordered. Perhaps, for
more complex history, beautify_graph() would produce a better result. For my
wip branches (~30 branches, a couple of commits per branch), this works pretty
well.

#242
2023-07-25 01:45:37 +09:00
..
common test utilities: advance_test_rng_seed_to_multiple_of function 2023-07-03 12:28:06 -07:00
test_abandon_command.rs revset_graph: group commits topologically 2023-07-25 01:45:37 +09:00
test_alias.rs cargo: upgrade clap from to 4.1.11 to 4.3.0 2023-05-31 12:32:26 -07:00
test_branch_command.rs revset: include pseudo @git remote in suggestion 2023-07-10 06:17:44 +09:00
test_cat_command.rs
test_checkout.rs cli: print parent commit summary on checkout 2023-05-02 15:04:13 +09:00
test_chmod_command.rs revset_graph: group commits topologically 2023-07-25 01:45:37 +09:00
test_commit_command.rs Switch graph node to use for commit instead of 2023-04-02 23:15:37 -07:00
test_commit_template.rs cli: render HEAD@git in green instead of bright green 2023-07-11 08:04:46 -05:00
test_concurrent_operations.rs cli: reload both repo and wc commit if working copy was updated 2023-05-22 08:36:38 +09:00
test_config_command.rs tests: add helper method to capture both stdout/stderr outputs 2023-07-03 22:03:05 +09:00
test_debug_command.rs jj debug operation --display id option to show current operation id for tests 2023-06-07 13:42:48 -07:00
test_describe_command.rs cli: print parent commit summary on checkout 2023-05-02 15:04:13 +09:00
test_diff_command.rs Fix warnings in tests on non-Unix platforms 2023-05-01 13:37:31 +09:00
test_diffedit_command.rs cli: print parent commit summary on checkout 2023-05-02 15:04:13 +09:00
test_duplicate_command.rs revset_graph: group commits topologically 2023-07-25 01:45:37 +09:00
test_edit_command.rs tests: avoid hardcoding commit/operation ids when possible 2023-05-22 07:02:32 -07:00
test_git_clone.rs cli: print parent commit summary on checkout 2023-05-02 15:04:13 +09:00
test_git_colocated.rs revset_graph: group commits topologically 2023-07-25 01:45:37 +09:00
test_git_fetch.rs undo: options to preserve git refs and/or remote-tracking branches on undo or restore 2023-07-03 12:28:06 -07:00
test_git_import_export.rs cargo: rename crates from jujutsu/jujutsu-lib to jj-cli/jj-lib 2023-07-09 06:40:43 +02:00
test_git_push.rs cli: warn if loosely selected push targets include conflicted branches 2023-07-08 10:23:21 +09:00
test_git_remotes.rs
test_git_submodule.rs git: add a hidden submodule subcommand 2023-06-27 10:07:00 -07:00
test_gitignores.rs
test_global_opts.rs cargo: rename crates from jujutsu/jujutsu-lib to jj-cli/jj-lib 2023-07-09 06:40:43 +02:00
test_init_command.rs backend: introduce error types specific to init/load phases 2023-07-06 20:48:46 +09:00
test_interdiff_command.rs
test_log_command.rs tests: add helper method to capture both stdout/stderr outputs 2023-07-03 22:03:05 +09:00
test_move_command.rs cli: print parent commit summary on checkout 2023-05-02 15:04:13 +09:00
test_new_command.rs revset_graph: group commits topologically 2023-07-25 01:45:37 +09:00
test_obslog_command.rs cli: allow resolving shorter ids within a configured revset 2023-05-11 23:41:24 -07:00
test_operations.rs tests: avoid hardcoding commit/operation ids when possible 2023-05-22 07:02:32 -07:00
test_rebase_command.rs revset_graph: group commits topologically 2023-07-25 01:45:37 +09:00
test_resolve_command.rs revset_graph: group commits topologically 2023-07-25 01:45:37 +09:00
test_restore_command.rs revset_graph: group commits topologically 2023-07-25 01:45:37 +09:00
test_revset_output.rs tests: add helper method to capture both stdout/stderr outputs 2023-07-03 22:03:05 +09:00
test_show_command.rs
test_sparse_command.rs add --edit option to jj sparse set 2023-06-27 22:56:46 +09:00
test_split_command.rs tests: add helper method to capture both stdout/stderr outputs 2023-07-03 22:03:05 +09:00
test_squash_command.rs revset_graph: group commits topologically 2023-07-25 01:45:37 +09:00
test_status_command.rs
test_templater.rs revset_graph: group commits topologically 2023-07-25 01:45:37 +09:00
test_undo.rs undo: preserve git-tracking refs in colocated repos by default 2023-07-03 12:28:06 -07:00
test_unsquash_command.rs revset_graph: group commits topologically 2023-07-25 01:45:37 +09:00
test_untrack_command.rs cli: make jj sparse --list a subcommand 2023-05-22 09:49:38 -07:00
test_util_command.rs cli: rename jj support to jj util 2023-04-12 21:34:47 -07:00
test_workspaces.rs cli: add pointer from error message to docs about stale working copy 2023-05-31 06:32:40 -07:00