Show More
@@ -847,49 +847,31 b' fn compare_value(' | |||
|
847 | 847 | src_minor: &CopySource, |
|
848 | 848 | src_major: &CopySource, |
|
849 | 849 | ) -> (MergePick, bool) { |
|
850 |
if src_major |
|
|
851 | if src_minor.rev == current_merge { | |
|
852 | if src_major.path.is_none() { | |
|
853 | // We cannot get different copy information for both p1 and p2 | |
|
854 | // from the same revision. Unless this was a | |
|
855 | // deletion. | |
|
856 | // | |
|
857 | // However the deletion might come over different data on each | |
|
858 | // branch. | |
|
859 | let need_over = src_major.overwritten != src_minor.overwritten; | |
|
860 | (MergePick::Any, need_over) | |
|
861 | } else { | |
|
862 | unreachable!(); | |
|
863 | } | |
|
864 | } else { | |
|
865 | // The last value comes the current merge, this value -will- win | |
|
866 | // eventually. | |
|
867 | (MergePick::Major, true) | |
|
868 | } | |
|
850 | if src_major == src_minor { | |
|
851 | (MergePick::Any, false) | |
|
852 | } else if src_major.rev == current_merge { | |
|
853 | // minor is different according to per minor == major check earlier | |
|
854 | debug_assert!(src_minor.rev != current_merge); | |
|
855 | ||
|
856 | // The last value comes the current merge, this value -will- win | |
|
857 | // eventually. | |
|
858 | (MergePick::Major, true) | |
|
869 | 859 | } else if src_minor.rev == current_merge { |
|
870 | 860 | // The last value comes the current merge, this value -will- win |
|
871 | 861 | // eventually. |
|
872 | 862 | (MergePick::Minor, true) |
|
873 | 863 | } else if src_major.path == src_minor.path { |
|
864 | debug_assert!(src_major.rev != src_major.rev); | |
|
874 | 865 | // we have the same value, but from other source; |
|
875 |
if src_major. |
|
|
876 | // If the two entry are identical, they are both valid | |
|
877 | debug_assert!(src_minor.overwritten == src_minor.overwritten); | |
|
878 | (MergePick::Any, false) | |
|
879 | } else if src_major.is_overwritten_by(src_minor) { | |
|
866 | if src_major.is_overwritten_by(src_minor) { | |
|
880 | 867 | (MergePick::Minor, false) |
|
881 | 868 | } else if src_minor.is_overwritten_by(src_major) { |
|
882 | 869 | (MergePick::Major, false) |
|
883 | 870 | } else { |
|
884 | 871 | (MergePick::Any, true) |
|
885 | 872 | } |
|
886 | } else if src_major.rev == src_minor.rev { | |
|
887 | // We cannot get copy information for both p1 and p2 in the | |
|
888 | // same rev. So this is the same value. | |
|
889 | unreachable!( | |
|
890 | "conflicting information from p1 and p2 in the same revision" | |
|
891 | ); | |
|
892 | 873 | } else { |
|
874 | debug_assert!(src_major.rev != src_major.rev); | |
|
893 | 875 | let dest_path = path_map.untokenize(*dest); |
|
894 | 876 | let action = changes.get_merge_case(dest_path); |
|
895 | 877 | if src_minor.path.is_some() |
General Comments 0
You need to be logged in to leave comments.
Login now