changeset 6212:1a33b31ad9a3

tests: move publish=false to the top of test-topic-mode.t since it's common
author Anton Shestakov <av6@dwimlabs.net>
date Sun, 12 Dec 2021 17:19:12 +0300
parents ff6ea5afba0e
children ce46b853d10e
files tests/test-topic-mode.t
diffstat 1 files changed, 6 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-topic-mode.t	Sun Mar 27 15:21:12 2022 +0300
+++ b/tests/test-topic-mode.t	Sun Dec 12 17:19:12 2021 +0300
@@ -1,14 +1,15 @@
   $ . "$TESTDIR/testlib/topic_setup.sh"
 
+  $ cat <<EOF >> $HGRCPATH
+  > [phases]
+  > publish = false
+  > EOF
+
 Testing the config knob to forbid untopiced commit
 ======================================================
 
   $ hg init $TESTTMP/untopic-commit
   $ cd $TESTTMP/untopic-commit
-  $ cat <<EOF >> .hg/hgrc
-  > [phases]
-  > publish=false
-  > EOF
   $ cat <<EOF >> $HGRCPATH
   > [experimental]
   > topic-mode = enforce
@@ -40,10 +41,6 @@
 
   $ hg init $TESTTMP/untopic-warn-commit
   $ cd $TESTTMP/untopic-warn-commit
-  $ cat <<EOF >> .hg/hgrc
-  > [phases]
-  > publish=false
-  > EOF
   $ cat <<EOF >> $HGRCPATH
   > [experimental]
   > topic-mode = warning
@@ -91,10 +88,6 @@
 
   $ hg init $TESTTMP/test-untopic-merge-commit
   $ cd $TESTTMP/test-untopic-merge-commit
-  $ cat <<EOF >> .hg/hgrc
-  > [phases]
-  > publish=false
-  > EOF
   $ cat <<EOF >> $HGRCPATH
   > [experimental]
   > topic-mode = enforce
@@ -155,10 +148,6 @@
 
   $ hg init $TESTTMP/test-untopic-merge-commit-abort
   $ cd $TESTTMP/test-untopic-merge-commit-abort
-  $ cat <<EOF >> .hg/hgrc
-  > [phases]
-  > publish=false
-  > EOF
   $ cat <<EOF >> $HGRCPATH
   > [experimental]
   > topic-mode = enforce-all
@@ -212,10 +201,6 @@
 
   $ hg init $TESTTMP/test-untopic-random
   $ cd $TESTTMP/test-untopic-random
-  $ cat <<EOF >> .hg/hgrc
-  > [phases]
-  > publish=false
-  > EOF
   $ cat <<EOF >> $HGRCPATH
   > [experimental]
   > topic-mode = random
@@ -271,15 +256,12 @@
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   $ hg ci -m 'merge'
+
 Testing the config knob to use a random topic for untopic commit (even for merge)
 =================================================================================
 
   $ hg init $TESTTMP/test-untopic-random-all
   $ cd $TESTTMP/test-untopic-random-all
-  $ cat <<EOF >> .hg/hgrc
-  > [phases]
-  > publish=false
-  > EOF
   $ cat <<EOF >> $HGRCPATH
   > [experimental]
   > topic-mode = random-all