changeset 46157:021925827c60

copies-rust: record overwrite when merging When detecting fresh value (from current rev) overwriting older ones during merges, we also record this overwrite for to help potential future comparison. This does really have any performance effect right now, but it get use closer to be able to drop all `is_ancestors` when merging. Differential Revision: https://phab.mercurial-scm.org/D9499
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 02 Dec 2020 15:37:54 +0100
parents 7d99614b7b77
children 1fcfff09cac5
files rust/hg-core/src/copy_tracing.rs
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/copy_tracing.rs	Wed Dec 02 15:24:10 2020 +0100
+++ b/rust/hg-core/src/copy_tracing.rs	Wed Dec 02 15:37:54 2020 +0100
@@ -731,11 +731,13 @@
         } else {
             // The last value comes the current merge, this value -will- win
             // eventually.
+            oracle.record_overwrite(src_minor.rev, src_major.rev);
             MergePick::Major
         }
     } else if src_minor.rev == current_merge {
         // The last value comes the current merge, this value -will- win
         // eventually.
+        oracle.record_overwrite(src_major.rev, src_minor.rev);
         MergePick::Minor
     } else if src_major.path == src_minor.path {
         // we have the same value, but from other source;