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