Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: delete the deprecated jj move command #4899

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Breaking changes

* `jj move` has been removed. It was deprecated in 0.16.0.

### Deprecations

### New features
Expand Down
4 changes: 0 additions & 4 deletions cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ mod init;
mod interdiff;
mod log;
mod merge;
mod r#move;
mod new;
mod next;
mod operation;
Expand Down Expand Up @@ -133,8 +132,6 @@ enum Command {
/// arguments.
#[command(hide = true)]
Merge(new::NewArgs),
#[command(hide = true)]
Move(r#move::MoveArgs),
New(new::NewArgs),
Next(next::NextArgs),
#[command(subcommand)]
Expand Down Expand Up @@ -232,7 +229,6 @@ pub fn run_command(ui: &mut Ui, command_helper: &CommandHelper) -> Result<(), Co
Command::Interdiff(args) => interdiff::cmd_interdiff(ui, command_helper, args),
Command::Log(args) => log::cmd_log(ui, command_helper, args),
Command::Merge(args) => merge::cmd_merge(ui, command_helper, args),
Command::Move(args) => r#move::cmd_move(ui, command_helper, args),
Command::New(args) => new::cmd_new(ui, command_helper, args),
Command::Next(args) => next::cmd_next(ui, command_helper, args),
Command::Evolog(args) => evolog::cmd_evolog(ui, command_helper, args),
Expand Down
112 changes: 0 additions & 112 deletions cli/src/commands/move.rs

This file was deleted.

8 changes: 3 additions & 5 deletions cli/src/commands/squash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ pub(crate) fn cmd_squash(
Ok(())
}

// TODO(#2882): Remove public visibility once `jj move` is deleted.
pub(crate) enum SquashedDescription {
enum SquashedDescription {
// Use this exact description.
Exact(String),
// Use the destination's description and discard the descriptions of the
Expand All @@ -173,9 +172,8 @@ pub(crate) enum SquashedDescription {
Combine,
}

// TODO(#2882): Remove public visibility once `jj move` is deleted.
impl SquashedDescription {
pub(crate) fn from_args(args: &SquashArgs) -> Self {
fn from_args(args: &SquashArgs) -> Self {
// These options are incompatible and Clap is configured to prevent this.
assert!(args.message_paragraphs.is_empty() || !args.use_destination_message);

Expand All @@ -191,7 +189,7 @@ impl SquashedDescription {
}

#[allow(clippy::too_many_arguments)]
pub fn move_diff(
fn move_diff(
ui: &mut Ui,
tx: &mut WorkspaceCommandTransaction,
settings: &UserSettings,
Expand Down
1 change: 0 additions & 1 deletion cli/tests/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ mod test_immutable_commits;
mod test_init_command;
mod test_interdiff_command;
mod test_log_command;
mod test_move_command;
mod test_new_command;
mod test_next_prev_commands;
mod test_operations;
Expand Down
18 changes: 0 additions & 18 deletions cli/tests/test_immutable_commits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,24 +247,6 @@ fn test_rewrite_immutable_commands() {
Hint: Could not modify commit: mzvwutvl 1d5af877 main | (conflict) merge
Hint: Pass `--ignore-immutable` or configure the set of immutable commits via `revset-aliases.immutable_heads()`.
"#);
// move --from
let stderr = test_env.jj_cmd_failure(&repo_path, &["move", "--from=main"]);
insta::assert_snapshot!(stderr, @r#"
Warning: `jj move` is deprecated; use `jj squash` instead, which is equivalent
Warning: `jj move` will be removed in a future version, and this will be a hard error
Error: Commit 1d5af877b8bb is immutable
Hint: Could not modify commit: mzvwutvl 1d5af877 main | (conflict) merge
Hint: Pass `--ignore-immutable` or configure the set of immutable commits via `revset-aliases.immutable_heads()`.
"#);
// move --to
let stderr = test_env.jj_cmd_failure(&repo_path, &["move", "--to=main"]);
insta::assert_snapshot!(stderr, @r#"
Warning: `jj move` is deprecated; use `jj squash` instead, which is equivalent
Warning: `jj move` will be removed in a future version, and this will be a hard error
Error: Commit 1d5af877b8bb is immutable
Hint: Could not modify commit: mzvwutvl 1d5af877 main | (conflict) merge
Hint: Pass `--ignore-immutable` or configure the set of immutable commits via `revset-aliases.immutable_heads()`.
"#);
// new --insert-before
let stderr = test_env.jj_cmd_failure(&repo_path, &["new", "--insert-before", "main"]);
insta::assert_snapshot!(stderr, @r#"
Expand Down
Loading