test-copies: test that copies' sidedata can get computed during pull
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 19 Apr 2021 11:22:24 +0200
changeset 47090 f506adbe5ac1
parent 47089 fa5bc416b413
child 47091 bc7bdca15e47
test-copies: test that copies' sidedata can get computed during pull If the source does not have the data, the pulling client should compute the necessary side-data while pulling. Differential Revision: https://phab.mercurial-scm.org/D10349
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 push
+#testcases filelog compatibility changeset sidedata upgraded upgraded-parallel pull push pull-upgrade
 
 =====================================================
 Test Copy tracing for chain of copies involving merge
@@ -74,6 +74,16 @@
 #endif
 
 
+#if pull-upgrade
+  $ cat >> $HGRCPATH << EOF
+  > [format]
+  > exp-use-side-data = no
+  > exp-use-copies-side-data-changeset = no
+  > [experimental]
+  > changegroup4 = yes
+  > EOF
+#endif
+
   $ cat > same-content.txt << EOF
   > Here is some content that will be the same accros multiple file.
   > 
@@ -1722,6 +1732,29 @@
   (run 'hg heads' to see heads, 'hg merge' to merge)
 #endif
 
+#if pull-upgrade
+  $ cat >> $HGRCPATH << EOF
+  > [format]
+  > exp-use-side-data = yes
+  > exp-use-copies-side-data-changeset = yes
+  > [experimental]
+  > changegroup4 = yes
+  > EOF
+  $ cd ..
+  $ mv repo-chain repo-source
+  $ hg init repo-chain
+  $ cd repo-chain
+  $ hg pull ../repo-source
+  pulling from ../repo-source
+  requesting all changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 80 changesets with 44 changes to 25 files (+39 heads)
+  new changesets a3a31bbefea6:908ce9259ffa
+  (run 'hg heads' to see heads, 'hg merge' to merge)
+#endif
+
 #if push
   $ cd ..
   $ mv repo-chain repo-source