Show More
@@ -16,7 +16,7 b' pub type PathCopies = HashMap<HgPathBuf,' | |||
|
16 | 16 | type PathToken = usize; |
|
17 | 17 | |
|
18 | 18 | #[derive(Clone, Debug, PartialEq, Copy)] |
|
19 | struct TimeStampedPathCopy { | |
|
19 | struct CopySource { | |
|
20 | 20 | /// revision at which the copy information was added |
|
21 | 21 | rev: Revision, |
|
22 | 22 | /// the copy source, (Set to None in case of deletion of the associated |
@@ -25,7 +25,7 b' struct TimeStampedPathCopy {' | |||
|
25 | 25 | } |
|
26 | 26 | |
|
27 | 27 | /// maps CopyDestination to Copy Source (+ a "timestamp" for the operation) |
|
28 |
type InternalPathCopies = OrdMap<PathToken, |
|
|
28 | type InternalPathCopies = OrdMap<PathToken, CopySource>; | |
|
29 | 29 | |
|
30 | 30 | /// hold parent 1, parent 2 and relevant files actions. |
|
31 | 31 | pub type RevInfo<'a> = (Revision, Revision, ChangedFiles<'a>); |
@@ -521,7 +521,7 b' fn add_from_changes<A: Fn(Revision, Revi' | |||
|
521 | 521 | // information. See merge_copies_dict for details. |
|
522 | 522 | match copies.entry(dest) { |
|
523 | 523 | Entry::Vacant(slot) => { |
|
524 |
let ttpc = |
|
|
524 | let ttpc = CopySource { | |
|
525 | 525 | rev: current_rev, |
|
526 | 526 | path: entry, |
|
527 | 527 | }; |
@@ -570,8 +570,8 b' fn merge_copies_dict<A: Fn(Revision, Rev' | |||
|
570 | 570 | // code is more settled. |
|
571 | 571 | let cmp_value = |oracle: &mut AncestorOracle<A>, |
|
572 | 572 | dest: &PathToken, |
|
573 |
src_minor: & |
|
|
574 |
src_major: & |
|
|
573 | src_minor: &CopySource, | |
|
574 | src_major: &CopySource| { | |
|
575 | 575 | compare_value( |
|
576 | 576 | path_map, |
|
577 | 577 | current_merge, |
@@ -619,7 +619,7 b' fn merge_copies_dict<A: Fn(Revision, Rev' | |||
|
619 | 619 | MergePick::Minor => src_minor.path, |
|
620 | 620 | MergePick::Any => src_major.path, |
|
621 | 621 | }; |
|
622 |
let src = |
|
|
622 | let src = CopySource { | |
|
623 | 623 | rev: current_merge, |
|
624 | 624 | path, |
|
625 | 625 | }; |
@@ -654,7 +654,7 b' fn merge_copies_dict<A: Fn(Revision, Rev' | |||
|
654 | 654 | MergePick::Minor => src_major.path, |
|
655 | 655 | MergePick::Any => src_major.path, |
|
656 | 656 | }; |
|
657 |
let src = |
|
|
657 | let src = CopySource { | |
|
658 | 658 | rev: current_merge, |
|
659 | 659 | path, |
|
660 | 660 | }; |
@@ -673,10 +673,10 b' fn merge_copies_dict<A: Fn(Revision, Rev' | |||
|
673 | 673 | let mut override_minor = Vec::new(); |
|
674 | 674 | let mut override_major = Vec::new(); |
|
675 | 675 | |
|
676 |
let mut to_major = |k: &PathToken, v: & |
|
|
676 | let mut to_major = |k: &PathToken, v: &CopySource| { | |
|
677 | 677 | override_major.push((k.clone(), v.clone())) |
|
678 | 678 | }; |
|
679 |
let mut to_minor = |k: &PathToken, v: & |
|
|
679 | let mut to_minor = |k: &PathToken, v: &CopySource| { | |
|
680 | 680 | override_minor.push((k.clone(), v.clone())) |
|
681 | 681 | }; |
|
682 | 682 | |
@@ -713,7 +713,7 b' fn merge_copies_dict<A: Fn(Revision, Rev' | |||
|
713 | 713 | // anything (but diff should not have yield them) |
|
714 | 714 | MergePick::Any => src_major.path, |
|
715 | 715 | }; |
|
716 |
let src = |
|
|
716 | let src = CopySource { | |
|
717 | 717 | rev: current_merge, |
|
718 | 718 | path, |
|
719 | 719 | }; |
@@ -773,8 +773,8 b' fn compare_value<A: Fn(Revision, Revisio' | |||
|
773 | 773 | changes: &ChangedFiles, |
|
774 | 774 | oracle: &mut AncestorOracle<A>, |
|
775 | 775 | dest: &PathToken, |
|
776 |
src_minor: & |
|
|
777 |
src_major: & |
|
|
776 | src_minor: &CopySource, | |
|
777 | src_major: &CopySource, | |
|
778 | 778 | ) -> (MergePick, bool) { |
|
779 | 779 | if src_major.rev == current_merge { |
|
780 | 780 | if src_minor.rev == current_merge { |
General Comments 0
You need to be logged in to leave comments.
Login now