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:
parent
cde8ea8985
commit
6bfd09009f
2 changed files with 5 additions and 3 deletions
|
@ -113,9 +113,10 @@ from the source will be moved into the destination.
|
||||||
// rewritten source. Otherwise it will likely already have the content
|
// rewritten source. Otherwise it will likely already have the content
|
||||||
// changes we're moving, so applying them will have no effect and the
|
// changes we're moving, so applying them will have no effect and the
|
||||||
// changes will disappear.
|
// changes will disappear.
|
||||||
let mut rebaser = tx.mut_repo().create_descendant_rebaser(command.settings());
|
let rebase_map = tx
|
||||||
rebaser.rebase_all()?;
|
.mut_repo()
|
||||||
let rebased_destination_id = rebaser.rebased().get(destination.id()).unwrap().clone();
|
.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)?;
|
destination = tx.mut_repo().store().get_commit(&rebased_destination_id)?;
|
||||||
}
|
}
|
||||||
// Apply the selected changes onto the destination
|
// Apply the selected changes onto the destination
|
||||||
|
|
|
@ -849,6 +849,7 @@ impl MutableRepo {
|
||||||
|
|
||||||
/// Creates a `DescendantRebaser` to rebase descendants of the recorded
|
/// Creates a `DescendantRebaser` to rebase descendants of the recorded
|
||||||
/// rewritten and abandoned commits.
|
/// rewritten and abandoned commits.
|
||||||
|
// TODO(ilyagr): Inline this. It's only used in tests.
|
||||||
pub fn create_descendant_rebaser<'settings, 'repo>(
|
pub fn create_descendant_rebaser<'settings, 'repo>(
|
||||||
&'repo mut self,
|
&'repo mut self,
|
||||||
settings: &'settings UserSettings,
|
settings: &'settings UserSettings,
|
||||||
|
|
Loading…
Reference in a new issue