test-copies: test that copies' sidedata does not get corrupted during push
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 19 Apr 2021 11:22:24 +0200
changeset 47103 fa5bc416b413
parent 47102 573d817bcc1f
child 47104 f506adbe5ac1
test-copies: test that copies' sidedata does not get corrupted during push This is an important usecase. Differential Revision: https://phab.mercurial-scm.org/D10348
tests/test-copies-chain-merge.t
--- a/tests/test-copies-chain-merge.t	Mon Apr 19 11:22:24 2021 +0200
+++ b/tests/test-copies-chain-merge.t	Mon Apr 19 11:22:24 2021 +0200
@@ -1,4 +1,4 @@
-#testcases filelog compatibility changeset sidedata upgraded upgraded-parallel pull
+#testcases filelog compatibility changeset sidedata upgraded upgraded-parallel pull push
 
 =====================================================
 Test Copy tracing for chain of copies involving merge
@@ -65,6 +65,14 @@
   > EOF
 #endif
 
+#if push
+  $ cat >> $HGRCPATH << EOF
+  > [format]
+  > exp-use-side-data = yes
+  > exp-use-copies-side-data-changeset = yes
+  > EOF
+#endif
+
 
   $ cat > same-content.txt << EOF
   > Here is some content that will be the same accros multiple file.
@@ -1714,6 +1722,21 @@
   (run 'hg heads' to see heads, 'hg merge' to merge)
 #endif
 
+#if push
+  $ cd ..
+  $ mv repo-chain repo-source
+  $ hg init repo-chain
+  $ cd repo-source
+  $ hg push ../repo-chain
+  pushing to ../repo-chain
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 80 changesets with 44 changes to 25 files (+39 heads)
+  $ cd ../repo-chain
+#endif
+
 #if no-compatibility no-filelog no-changeset
 
   $ hg debugchangedfiles --compute 0