diff tests/test-copies-chain-merge.t @ 46159:929054848d6c

copies: properly match result during changeset centric copy tracing By filtering "during" the iteration we were excluding rename information that were not in the matched set but that file served as base information for the matched set. We now do all copy tracing matching at the end of the process to ensure we raise proper result. If we were aggregating information top down instead of bottom up we could do filtering during processing. However, we don't. Differential Revision: https://phab.mercurial-scm.org/D9585
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 13 Dec 2020 20:16:34 +0100
parents 6c960b708ac4
children 1d6aac94e6d5
line wrap: on
line diff
--- a/tests/test-copies-chain-merge.t	Sun Dec 13 20:26:27 2020 +0100
+++ b/tests/test-copies-chain-merge.t	Sun Dec 13 20:16:34 2020 +0100
@@ -872,6 +872,19 @@
 Test copy information chaining
 ==============================
 
+Check that matching only affect the destination and not intermediate path
+-------------------------------------------------------------------------
+
+The two status call should give the same value for f
+
+  $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")'
+  A f
+    a
+  R a
+  $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f
+  A f
+    a (no-changeset no-compatibility !)
+
 merging with unrelated change does not interfere with the renames
 ---------------------------------------------------------------