mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-12 23:23:20 +00:00
repo: group MutableRepo::rebase_descendants_*
functions together
This commit is contained in:
parent
18faaf72a3
commit
d7f929fefb
1 changed files with 18 additions and 17 deletions
|
@ -1274,16 +1274,6 @@ impl MutableRepo {
|
||||||
// TODO(ilyagr): Either document that this also moves bookmarks (rename the
|
// TODO(ilyagr): Either document that this also moves bookmarks (rename the
|
||||||
// function and the related functions?) or change things so that this only
|
// function and the related functions?) or change things so that this only
|
||||||
// rebases descendants.
|
// rebases descendants.
|
||||||
pub fn rebase_descendants_with_options(
|
|
||||||
&mut self,
|
|
||||||
settings: &UserSettings,
|
|
||||||
options: RebaseOptions,
|
|
||||||
) -> BackendResult<usize> {
|
|
||||||
let num_rebased = self
|
|
||||||
.rebase_descendants_with_options_return_map(settings, options)?
|
|
||||||
.len();
|
|
||||||
Ok(num_rebased)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// This is similar to `rebase_descendants_return_map`, but the return value
|
/// This is similar to `rebase_descendants_return_map`, but the return value
|
||||||
/// needs more explaining.
|
/// needs more explaining.
|
||||||
|
@ -1322,6 +1312,24 @@ impl MutableRepo {
|
||||||
Ok(rebased)
|
Ok(rebased)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn rebase_descendants_return_map(
|
||||||
|
&mut self,
|
||||||
|
settings: &UserSettings,
|
||||||
|
) -> BackendResult<HashMap<CommitId, CommitId>> {
|
||||||
|
self.rebase_descendants_with_options_return_map(settings, Default::default())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn rebase_descendants_with_options(
|
||||||
|
&mut self,
|
||||||
|
settings: &UserSettings,
|
||||||
|
options: RebaseOptions,
|
||||||
|
) -> BackendResult<usize> {
|
||||||
|
let num_rebased = self
|
||||||
|
.rebase_descendants_with_options_return_map(settings, options)?
|
||||||
|
.len();
|
||||||
|
Ok(num_rebased)
|
||||||
|
}
|
||||||
|
|
||||||
/// Rebase descendants of the rewritten commits.
|
/// Rebase descendants of the rewritten commits.
|
||||||
///
|
///
|
||||||
/// The descendants of the commits registered in `self.parent_mappings` will
|
/// The descendants of the commits registered in `self.parent_mappings` will
|
||||||
|
@ -1363,13 +1371,6 @@ impl MutableRepo {
|
||||||
Ok(num_reparented)
|
Ok(num_reparented)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn rebase_descendants_return_map(
|
|
||||||
&mut self,
|
|
||||||
settings: &UserSettings,
|
|
||||||
) -> BackendResult<HashMap<CommitId, CommitId>> {
|
|
||||||
self.rebase_descendants_with_options_return_map(settings, Default::default())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn set_wc_commit(
|
pub fn set_wc_commit(
|
||||||
&mut self,
|
&mut self,
|
||||||
workspace_id: WorkspaceId,
|
workspace_id: WorkspaceId,
|
||||||
|
|
Loading…
Reference in a new issue