diff tests/test-topic-push.t @ 5374:6f7a2dcc8c7a

tests: add the concurrent test case to test-topic-push.t We can use #testcase syntax that was introduced around hg 4.3 to remove the duplication. test-topic-push-concurrent-on.t was a complete copy of test-topic-push.t except the line that sets server.concurrent-push-mode and a push --topic block. So push --topic now gets tested with a different concurrent mode as well. Also, hg 5.4 now defaults to check-related, so we need to explicitly set the mode to strict when we need it to be strict.
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 11 Jun 2020 17:58:04 +0800
parents cbfd36046969
children bed4fc158fc9
line wrap: on
line diff
--- a/tests/test-topic-push.t	Mon Jun 22 01:03:22 2020 +0200
+++ b/tests/test-topic-push.t	Thu Jun 11 17:58:04 2020 +0800
@@ -1,3 +1,5 @@
+#testcases concurrent-strict concurrent-check-related
+
   $ . "$TESTDIR/testlib/topic_setup.sh"
 
   $ cat << EOF >> $HGRCPATH
@@ -6,6 +8,20 @@
   > ssh = "$PYTHON" "$RUNTESTDIR/dummyssh"
   > EOF
 
+#if concurrent-strict
+  $ cat << EOF >> $HGRCPATH
+  > [server]
+  > concurrent-push-mode = strict
+  > EOF
+#endif
+
+#if concurrent-check-related
+  $ cat << EOF >> $HGRCPATH
+  > [server]
+  > concurrent-push-mode = check-related
+  > EOF
+#endif
+
   $ hg init main
   $ hg init draft
   $ cat << EOF >> draft/.hg/hgrc