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
--- 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;