diff --git a/dvc/repo/trie.py b/dvc/repo/trie.py index d0826d0b9..ca54a5fba 100644 --- a/dvc/repo/trie.py +++ b/dvc/repo/trie.py @@ -25,9 +25,10 @@ def build_outs_trie(stages): overlapping = out if parent and overlapping: msg = ( - "Paths for outs:\n'{}'('{}')\n'{}'('{}')\n" - "overlap. To avoid unpredictable behaviour, " - "rerun command with non overlapping outs paths." + "The output paths:\n'{}'('{}')\n'{}'('{}')\n" + "overlap and are thus in the same tracked directory.\n" + "To keep reproducibility, outputs should be in separate " + "tracked directories or tracked individually." ).format( str(parent), parent.stage.addressing, diff --git a/tests/func/test_run_single_stage.py b/tests/func/test_run_single_stage.py index 24969570e..3db7b0f3e 100644 --- a/tests/func/test_run_single_stage.py +++ b/tests/func/test_run_single_stage.py @@ -830,14 +830,15 @@ class TestShouldRaiseOnOverlappingOutputPaths(TestDvc): data_dir_stage = self.DATA_DIR + DVC_FILE_SUFFIX data_stage = os.path.basename(self.DATA) + DVC_FILE_SUFFIX - self.assertIn("Paths for outs:\n", error_output) + self.assertIn("The output paths:\n", error_output) self.assertIn( f"\n'{self.DATA_DIR}'('{data_dir_stage}')\n", error_output, ) self.assertIn(f"\n'{self.DATA}'('{data_stage}')\n", error_output) self.assertIn( - "\noverlap. To avoid unpredictable behaviour, rerun " - "command with non overlapping outs paths.", + "overlap and are thus in the same tracked directory.\n" + "To keep reproducibility, outputs should be in separate " + "tracked directories or tracked individually.", error_output, )