Show More
@@ -244,7 +244,7 b" impl<'a, A: Fn(Revision, Revision) -> bo" | |||
|
244 | 244 | } |
|
245 | 245 | |
|
246 | 246 | /// returns `true` if `anc` is an ancestors of `desc`, `false` otherwise |
|
247 |
fn is_ |
|
|
247 | fn is_overwrite(&mut self, anc: Revision, desc: Revision) -> bool { | |
|
248 | 248 | if anc > desc { |
|
249 | 249 | false |
|
250 | 250 | } else if anc == desc { |
@@ -705,7 +705,7 b' fn compare_value<A: Fn(Revision, Revisio' | |||
|
705 | 705 | if src_major.rev == src_minor.rev { |
|
706 | 706 | // If the two entry are identical, they are both valid |
|
707 | 707 | MergePick::Any |
|
708 |
} else if oracle.is_ |
|
|
708 | } else if oracle.is_overwrite(src_major.rev, src_minor.rev) { | |
|
709 | 709 | MergePick::Minor |
|
710 | 710 | } else { |
|
711 | 711 | MergePick::Major |
@@ -733,7 +733,7 b' fn compare_value<A: Fn(Revision, Revisio' | |||
|
733 | 733 | // from each side might conflict. The major side will |
|
734 | 734 | // win such conflict. |
|
735 | 735 | MergePick::Major |
|
736 |
} else if oracle.is_ |
|
|
736 | } else if oracle.is_overwrite(src_major.rev, src_minor.rev) { | |
|
737 | 737 | // If the minor side is strictly newer than the major |
|
738 | 738 | // side, it should be kept. |
|
739 | 739 | MergePick::Minor |
@@ -741,7 +741,7 b' fn compare_value<A: Fn(Revision, Revisio' | |||
|
741 | 741 | // without any special case, the "major" value win |
|
742 | 742 | // other the "minor" one. |
|
743 | 743 | MergePick::Major |
|
744 |
} else if oracle.is_ |
|
|
744 | } else if oracle.is_overwrite(src_minor.rev, src_major.rev) { | |
|
745 | 745 | // the "major" rev is a direct ancestors of "minor", |
|
746 | 746 | // any different value should |
|
747 | 747 | // overwrite |
General Comments 0
You need to be logged in to leave comments.
Login now