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
|
||||
// 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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue