Skip to content

Commit

Permalink
cli: don't say that we will delete jj checkout/merge in the future
Browse files Browse the repository at this point in the history
I've heard several people say that deleting `jj checkout` is too
extreme. We don't want to scare away potential new users. There's very
little cost involved in keeping the command around indefinitely. So I
think we should at least remove the promise to delete it in the
future.
  • Loading branch information
martinvonz committed Mar 5, 2024
1 parent 59a61a2 commit 97d1cb7
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 18 deletions.
3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
`jj checkout` and `jj merge` will no longer be shown as part of `jj help`, but
will still function for now, emitting a warning about their deprecation.

**Deadline**: `jj checkout` and `jj merge` will be deleted and are expected
become a **hard error later in 2024**.

* `jj init --git` and `jj init --git-repo` are now deprecated and will be removed
in the near future.

Expand Down
4 changes: 0 additions & 4 deletions cli/src/commands/checkout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ pub(crate) fn cmd_checkout(
ui.warning(),
"warning: `jj checkout` is deprecated; use `jj new` instead, which is equivalent"
)?;
writeln!(
ui.warning(),
"warning: `jj checkout` will be removed in a future version, and this will be a hard error"
)?;
let mut workspace_command = command.workspace_helper(ui)?;
let target = workspace_command.resolve_single_rev(&args.revision)?;
let mut tx = workspace_command.start_transaction();
Expand Down
4 changes: 0 additions & 4 deletions cli/src/commands/merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ pub(crate) fn cmd_merge(
ui.warning(),
"warning: `jj merge` is deprecated; use `jj new` instead, which is equivalent"
)?;
writeln!(
ui.warning(),
"warning: `jj merge` will be removed in a future version, and this will be a hard error"
)?;
if args.revisions.len() < 2 {
return Err(CommandError::CliError(String::from(
"Merge requires at least two revisions",
Expand Down
5 changes: 0 additions & 5 deletions cli/tests/test_checkout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ fn test_checkout() {
insta::assert_snapshot!(stdout, @"");
insta::assert_snapshot!(stderr, @r###"
warning: `jj checkout` is deprecated; use `jj new` instead, which is equivalent
warning: `jj checkout` will be removed in a future version, and this will be a hard error
Working copy now at: zsuskuln 05ce7118 (empty) (no description set)
Parent commit : rlvkpnrz 5c52832c (empty) second
"###);
Expand Down Expand Up @@ -67,7 +66,6 @@ fn test_checkout_not_single_rev() {
let stderr = test_env.jj_cmd_failure(&repo_path, &["checkout", "root()..@"]);
insta::assert_snapshot!(stderr, @r###"
warning: `jj checkout` is deprecated; use `jj new` instead, which is equivalent
warning: `jj checkout` will be removed in a future version, and this will be a hard error
Error: Revset "root()..@" resolved to more than one revision
Hint: The revset "root()..@" resolved to these revisions:
royxmykx 2f859371 (empty) (no description set)
Expand All @@ -81,7 +79,6 @@ fn test_checkout_not_single_rev() {
let stderr = test_env.jj_cmd_failure(&repo_path, &["checkout", "root()..@-"]);
insta::assert_snapshot!(stderr, @r###"
warning: `jj checkout` is deprecated; use `jj new` instead, which is equivalent
warning: `jj checkout` will be removed in a future version, and this will be a hard error
Error: Revset "root()..@-" resolved to more than one revision
Hint: The revset "root()..@-" resolved to these revisions:
mzvwutvl 5c1afd8b (empty) fifth
Expand All @@ -94,7 +91,6 @@ fn test_checkout_not_single_rev() {
let stderr = test_env.jj_cmd_failure(&repo_path, &["checkout", "@-|@--"]);
insta::assert_snapshot!(stderr, @r###"
warning: `jj checkout` is deprecated; use `jj new` instead, which is equivalent
warning: `jj checkout` will be removed in a future version, and this will be a hard error
Error: Revset "@-|@--" resolved to more than one revision
Hint: The revset "@-|@--" resolved to these revisions:
mzvwutvl 5c1afd8b (empty) fifth
Expand All @@ -104,7 +100,6 @@ fn test_checkout_not_single_rev() {
let stderr = test_env.jj_cmd_failure(&repo_path, &["checkout", "none()"]);
insta::assert_snapshot!(stderr, @r###"
warning: `jj checkout` is deprecated; use `jj new` instead, which is equivalent
warning: `jj checkout` will be removed in a future version, and this will be a hard error
Error: Revset "none()" didn't resolve to any revisions
"###);
}
Expand Down
2 changes: 0 additions & 2 deletions cli/tests/test_new_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,11 @@ fn test_new_merge() {
let stderr = test_env.jj_cmd_cli_error(&repo_path, &["merge"]);
insta::assert_snapshot!(stderr, @r###"
warning: `jj merge` is deprecated; use `jj new` instead, which is equivalent
warning: `jj merge` will be removed in a future version, and this will be a hard error
Error: Merge requires at least two revisions
"###);
let stderr = test_env.jj_cmd_cli_error(&repo_path, &["merge", "main"]);
insta::assert_snapshot!(stderr, @r###"
warning: `jj merge` is deprecated; use `jj new` instead, which is equivalent
warning: `jj merge` will be removed in a future version, and this will be a hard error
Error: Merge requires at least two revisions
"###);

Expand Down

0 comments on commit 97d1cb7

Please sign in to comment.