diff --git a/rust/hg-core/src/copy_tracing.rs b/rust/hg-core/src/copy_tracing.rs --- a/rust/hg-core/src/copy_tracing.rs +++ b/rust/hg-core/src/copy_tracing.rs @@ -25,7 +25,7 @@ struct TimeStampedPathCopy { } /// maps CopyDestination to Copy Source (+ a "timestamp" for the operation) -type TimeStampedPathCopies = OrdMap; +type InternalPathCopies = OrdMap; /// hold parent 1, parent 2 and relevant files actions. pub type RevInfo<'a> = (Revision, Revision, ChangedFiles<'a>); @@ -382,7 +382,7 @@ pub fn combine_changeset_copies = None; + let mut copies: Option = None; if p1 != NULL_REVISION { // Retrieve data computed in a previous iteration let parent_copies = get_and_clean_parent_copies( @@ -471,21 +471,21 @@ pub fn combine_changeset_copies, + all_copies: &mut HashMap, children_count: &mut HashMap, parent_rev: Revision, -) -> Option { +) -> Option { let count = children_count.get_mut(&parent_rev)?; *count -= 1; if *count == 0 { match all_copies.remove(&parent_rev) { Some(c) => Some(c), - None => Some(TimeStampedPathCopies::default()), + None => Some(InternalPathCopies::default()), } } else { match all_copies.get(&parent_rev) { Some(c) => Some(c.clone()), - None => Some(TimeStampedPathCopies::default()), + None => Some(InternalPathCopies::default()), } } } @@ -495,11 +495,11 @@ fn get_and_clean_parent_copies( fn add_from_changes bool>( path_map: &mut TwoWayPathMap, oracle: &mut AncestorOracle, - base_copies: &TimeStampedPathCopies, + base_copies: &InternalPathCopies, changes: &ChangedFiles, parent: Parent, current_rev: Revision, -) -> TimeStampedPathCopies { +) -> InternalPathCopies { let mut copies = base_copies.clone(); for action in changes.iter_actions(parent) { match action { @@ -540,7 +540,7 @@ fn add_from_changes bool>( path_map: &TwoWayPathMap, current_merge: Revision, - mut minor: TimeStampedPathCopies, - mut major: TimeStampedPathCopies, + mut minor: InternalPathCopies, + mut major: InternalPathCopies, changes: &ChangedFiles, oracle: &mut AncestorOracle, -) -> TimeStampedPathCopies { +) -> InternalPathCopies { // This closure exist as temporary help while multiple developper are // actively working on this code. Feel free to re-inline it once this // code is more settled. @@ -587,7 +587,7 @@ fn merge_copies_dict