changeset 6039:51249e4e9025

tests: port upstream 86f39a89b63e to our version of mkcommit() Now we can use it with --close-branch or --secret, for example.
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 20 Sep 2021 19:48:47 +0300
parents af2fec9b541c
children 29bc269bcc96
files tests/test-topic-flow-publish-bare.t tests/testlib/common.sh
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-topic-flow-publish-bare.t	Sun Sep 12 20:49:21 2021 +0300
+++ b/tests/test-topic-flow-publish-bare.t	Mon Sep 20 19:48:47 2021 +0300
@@ -364,8 +364,7 @@
 
 Trying to push changeset without topic (would publish them)
 
-  $ mkcommit c_aM0
-  $ hg phase --secret --force
+  $ mkcommit c_aM0 --secret
   $ hg push --config experimental.auto-publish=abort -r .
   pushing to $TESTTMP/bare-branch-server
   searching for changes
--- a/tests/testlib/common.sh	Sun Sep 12 20:49:21 2021 +0300
+++ b/tests/testlib/common.sh	Mon Sep 20 19:48:47 2021 +0300
@@ -1,9 +1,11 @@
 . $TESTDIR/testlib/pythonpath.sh
 
 mkcommit() {
-   echo "$1" > "$1"
-   hg add "$1"
-   hg ci -m "$1"
+   name="$1"
+   shift
+   echo "$name" > "$name"
+   hg add "$name"
+   hg ci -m "$name" "$@"
 }
 
 getid() {