ok/jj
1
0
Fork 0
forked from mirrors/jj

move.rs: remove use of MutRepo::create_descenant_rebaser.

After this, the internal function is only used in tests.
This commit is contained in:
Ilya Grigoriev 2023-12-16 21:08:49 -08:00
parent cde8ea8985
commit 6bfd09009f
2 changed files with 5 additions and 3 deletions

View file

@ -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

View file

@ -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,