jj/cli/tests
Yuya Nishihara 6286cde543 index: import commits in chronological order
This basically means that heads in a filtered graph appear in reverse
chronological order. Before, "jj log -r 'tags()'" in linux-stable repo would
look randomly sorted once you ran "jj debug reindex" in it.

With this change, indexing is more like breadth-first search, and BFS is
known to be bad at rendering nice graph (because branches run in parallel.)
However, we have a post process to group topological branches, so we don't
have this problem. For serialization formats like Mercurial's revlog iirc,
BFS leads to bad compression ratio, but our index isn't that kind of data.

Reindexing gets slightly slower, but I think this is negligible.

  (in Git repository)
  % hyperfine --warmup 3 --runs 10 "jj debug reindex --ignore-working-copy"
  (original)
  Time (mean ± σ):      1.521 s ±  0.027 s    [User: 1.307 s, System: 0.211 s]
  Range (min … max):    1.486 s …  1.573 s    10 runs
  (new)
  Time (mean ± σ):      1.568 s ±  0.027 s    [User: 1.368 s, System: 0.197 s]
  Range (min … max):    1.531 s …  1.625 s    10 runs

Another idea is to sort heads chronologically and run DFS-based topological
sorting. It's ad-hoc, but worked surprisingly well for my local repositories.
For repositories with lots of long-running branches, this commit will provide
more predictable result than DFS-based one.
2023-08-15 15:03:45 +09:00
..
common
test_abandon_command.rs
test_alias.rs
test_branch_command.rs index: import commits in chronological order 2023-08-15 15:03:45 +09:00
test_cat_command.rs
test_checkout.rs
test_chmod_command.rs
test_commit_command.rs
test_commit_template.rs
test_concurrent_operations.rs
test_config_command.rs
test_debug_command.rs
test_describe_command.rs
test_diff_command.rs
test_diffedit_command.rs
test_duplicate_command.rs
test_edit_command.rs
test_git_clone.rs
test_git_colocated.rs
test_git_fetch.rs
test_git_import_export.rs
test_git_push.rs
test_git_remotes.rs
test_git_submodule.rs
test_gitignores.rs
test_global_opts.rs
test_init_command.rs
test_interdiff_command.rs
test_log_command.rs
test_move_command.rs
test_new_command.rs
test_obslog_command.rs
test_operations.rs
test_rebase_command.rs
test_resolve_command.rs
test_restore_command.rs
test_revset_output.rs
test_show_command.rs
test_sparse_command.rs
test_split_command.rs
test_squash_command.rs
test_status_command.rs
test_templater.rs
test_undo.rs
test_unsquash_command.rs
test_untrack_command.rs
test_util_command.rs
test_workspaces.rs