changeset 46566:3c5a8b13206a

copies-rust: fix reverted argument when merging tiny minor or major The argument where not passed in the right other. This is not caught by the test (yet) because it is a sub case of a special case. Am I adding this to my list of things to test. Using test directly in Rust would be appropriate here. However we don't have the ability to test this code that way yet, and I am focussing on other part of that work right now. Differential Revision: https://phab.mercurial-scm.org/D9657
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 23 Dec 2020 03:04:33 +0100
parents 2bd069788367
children b6f65d90e8af
files rust/hg-core/src/copy_tracing.rs
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/copy_tracing.rs	Mon Dec 21 08:42:30 2020 +0100
+++ b/rust/hg-core/src/copy_tracing.rs	Wed Dec 23 03:04:33 2020 +0100
@@ -645,7 +645,7 @@
                 }
                 Some(src_minor) => {
                     let (pick, overwrite) =
-                        cmp_value(oracle, &dest, &src_major, src_minor);
+                        cmp_value(oracle, &dest, src_minor, &src_major);
                     if overwrite {
                         oracle.record_overwrite(src_minor.rev, current_merge);
                         oracle.record_overwrite(src_major.rev, current_merge);
@@ -661,8 +661,8 @@
                         minor.insert(dest, src);
                     } else {
                         match pick {
-                            MergePick::Any | MergePick::Major => None,
-                            MergePick::Minor => minor.insert(dest, src_major),
+                            MergePick::Any | MergePick::Minor => None,
+                            MergePick::Major => minor.insert(dest, src_major),
                         };
                     }
                 }