jj/tests
Martin von Zweigbergk 48580ed8b1 revsets: allow :: as synonym for :
The `--allow-large-revsets` flag we have on `jj rebase` and `jj new`
allows the user to do e.g. `jj rebase --allow-large-revsets -b
main.. -d main` to rebase all commits that are not in main onto
main. The reason we don't allow these revsets to resolve to multiple
commits by default is that we think users might specify multiple
commits by mistake. That's probably not much of a problem with `jj
rebase -b` (maybe we should always allow that to resolve to multiple
commits), but the user might want to know if `jj rebase -d @-`
resolves to multiple commits.

One problem with having a flag to allow multiple commits is that it
needs to be added to every command where we want to allow multiple
commits but default to one. Also, it should probably apply to each
revset argument those commands take. For example, even if the user
meant `-b main..` to resolve to multiple commits, they might not have
meant `-d main` to resolve to multiple commits (which it will in case
of a conflicted branch), so we might want separate
`--allow-large-revsets-in-destination` and
`--allow-large-revsets-in-source`, which gets quite cumbersome. It
seems better to have some syntax in the individual revsets for saying
that multiple commits are allowed.

One proposal I had was to use a `multiple()` revset function which
would have no effect in general but would be used as a marker if used
at the top level (e.g. `jj rebase -d 'multiple(@-)'`). After some
discussion on the PR adding that function (#1911), it seems that the
consensus is to instead use a prefix like `many:` or `all:`. That
avoids the problem with having a function that has no effect unless
it's used at the top level (`jj rebase -d 'multiple(x)|y'` would have
no effect).

Since we already have the `:` operator for DAG ranges, we need to
change it to make room for `many:`/`all:` syntax. This commit starts
that by allowing both `:` and `::`.

I have tried to update the documentation in this commit to either
mention both forms, or just the new and preferred `::` form. However,
it's useless to search for `:` in Rust code, so I'm sure I've missed
many instances. We'll have to address those as we notice them. I'll
let most tests use `:` until we deprecate it or delete it.
2023-07-28 22:30:40 -07: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: preserve original parents order 2023-07-29 05:36:09 +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: preserve original parents order 2023-07-29 05:36:09 +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 simple_op_store: serialize RefTarget in new format (breaks downgrades) 2023-07-27 15:32:48 +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 simple_op_store: serialize RefTarget in new format (breaks downgrades) 2023-07-27 15:32:48 +09: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: preserve original parents order 2023-07-29 05:36:09 +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 revset_graph: preserve original parents order 2023-07-29 05:36:09 +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: preserve original parents order 2023-07-29 05:36:09 +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 simple_op_store: serialize RefTarget in new format (breaks downgrades) 2023-07-27 15:32:48 +09:00
test_rebase_command.rs revset_graph: preserve original parents order 2023-07-29 05:36:09 +09:00
test_resolve_command.rs revset_graph: preserve original parents order 2023-07-29 05:36:09 +09:00
test_restore_command.rs revset_graph: preserve original parents order 2023-07-29 05:36:09 +09:00
test_revset_output.rs revsets: allow :: as synonym for : 2023-07-28 22:30:40 -07: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: preserve original parents order 2023-07-29 05:36:09 +09:00
test_status_command.rs
test_templater.rs revset_graph: place new heads as close to fork point as possible 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: preserve original parents order 2023-07-29 05:36:09 +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 simple_op_store: serialize RefTarget in new format (breaks downgrades) 2023-07-27 15:32:48 +09:00