From 6bfd09009fbc94533f31c01eeff00303453c6392 Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Sat, 16 Dec 2023 21:08:49 -0800 Subject: [PATCH] `move.rs`: remove use of `MutRepo::create_descenant_rebaser`. After this, the internal function is only used in tests. --- cli/src/commands/move.rs | 7 ++++--- lib/src/repo.rs | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cli/src/commands/move.rs b/cli/src/commands/move.rs index ff65ed40e..c32107464 100644 --- a/cli/src/commands/move.rs +++ b/cli/src/commands/move.rs @@ -113,9 +113,10 @@ from the source will be moved into the destination. // rewritten source. Otherwise it will likely already have the content // changes we're moving, so applying them will have no effect and the // changes will disappear. - let mut rebaser = tx.mut_repo().create_descendant_rebaser(command.settings()); - rebaser.rebase_all()?; - let rebased_destination_id = rebaser.rebased().get(destination.id()).unwrap().clone(); + let rebase_map = tx + .mut_repo() + .rebase_descendants_return_map(command.settings())?; + let rebased_destination_id = rebase_map.get(destination.id()).unwrap().clone(); destination = tx.mut_repo().store().get_commit(&rebased_destination_id)?; } // Apply the selected changes onto the destination diff --git a/lib/src/repo.rs b/lib/src/repo.rs index bfe88867d..9e6e0306c 100644 --- a/lib/src/repo.rs +++ b/lib/src/repo.rs @@ -849,6 +849,7 @@ impl MutableRepo { /// Creates a `DescendantRebaser` to rebase descendants of the recorded /// rewritten and abandoned commits. + // TODO(ilyagr): Inline this. It's only used in tests. pub fn create_descendant_rebaser<'settings, 'repo>( &'repo mut self, settings: &'settings UserSettings,