rust/hg-core/src/copy_tracing.rs
changeset 46154 ecbb2fc9418c
parent 46153 0a721fc457bf
child 46155 fce2f20a54ce
--- a/rust/hg-core/src/copy_tracing.rs	Wed Dec 02 11:04:11 2020 +0100
+++ b/rust/hg-core/src/copy_tracing.rs	Wed Dec 02 16:11:35 2020 +0100
@@ -244,7 +244,7 @@
     }
 
     /// returns `true` if `anc` is an ancestors of `desc`, `false` otherwise
-    fn is_ancestor(&mut self, anc: Revision, desc: Revision) -> bool {
+    fn is_overwrite(&mut self, anc: Revision, desc: Revision) -> bool {
         if anc > desc {
             false
         } else if anc == desc {
@@ -705,7 +705,7 @@
         if src_major.rev == src_minor.rev {
             // If the two entry are identical, they are both valid
             MergePick::Any
-        } else if oracle.is_ancestor(src_major.rev, src_minor.rev) {
+        } else if oracle.is_overwrite(src_major.rev, src_minor.rev) {
             MergePick::Minor
         } else {
             MergePick::Major
@@ -733,7 +733,7 @@
             // from each side might conflict.  The major side will
             // win such conflict.
             MergePick::Major
-        } else if oracle.is_ancestor(src_major.rev, src_minor.rev) {
+        } else if oracle.is_overwrite(src_major.rev, src_minor.rev) {
             // If the minor side is strictly newer than the major
             // side, it should be kept.
             MergePick::Minor
@@ -741,7 +741,7 @@
             // without any special case, the "major" value win
             // other the "minor" one.
             MergePick::Major
-        } else if oracle.is_ancestor(src_minor.rev, src_major.rev) {
+        } else if oracle.is_overwrite(src_minor.rev, src_major.rev) {
             // the "major" rev is a direct ancestors of "minor",
             // any different value should
             // overwrite